Setting application object to nothing doesn't end the process 
Author Message
 Setting application object to nothing doesn't end the process

Hi...
I have an application that creates and instance of Microsoft Excel and makes
the excel window a child of the main form.  I have code in the main form's
closing event to exit Excel (AppXL.Quit) and to set the Excel Application
variable to nothing prior to closing the application (AppXL = Nothing), but
this doesn't terminate the EXCEL.EXE process.  Consequently, I get an
application error in EXCEL.EXE when I close my main form, saying that some
block of memory could not be 'read'.  Can anyone help me fix this problem???

--
"Programming is 1% inspiration, 99% Help files...."
----------------------------------------------------------------------------
--
Rick Palmer
Systems Developer
W. E. Love and Associates, Inc. C.M.G.A



Mon, 20 Sep 2004 00:38:11 GMT  
 Setting application object to nothing doesn't end the process
As I understand it, there is bug with respect to ReleaseComObject calls. . .
After you set the AppXL = Nothing, call GC.Collect() and it should take care
of it for you. . .

--
Jacob Grass
Microsoft .NET MVP


Quote:
> Hi...
> I have an application that creates and instance of Microsoft Excel and
makes
> the excel window a child of the main form.  I have code in the main form's
> closing event to exit Excel (AppXL.Quit) and to set the Excel Application
> variable to nothing prior to closing the application (AppXL = Nothing),
but
> this doesn't terminate the EXCEL.EXE process.  Consequently, I get an
> application error in EXCEL.EXE when I close my main form, saying that some
> block of memory could not be 'read'.  Can anyone help me fix this
problem???

> --
> "Programming is 1% inspiration, 99% Help files...."
> --------------------------------------------------------------------------
--
> --
> Rick Palmer
> Systems Developer
> W. E. Love and Associates, Inc. C.M.G.A




Mon, 20 Sep 2004 01:06:49 GMT  
 Setting application object to nothing doesn't end the process
Worked like a charm.....gracias!

-rp


Quote:
> As I understand it, there is bug with respect to ReleaseComObject calls. .
.
> After you set the AppXL = Nothing, call GC.Collect() and it should take
care
> of it for you. . .

> --
> Jacob Grass
> Microsoft .NET MVP



> > Hi...
> > I have an application that creates and instance of Microsoft Excel and
> makes
> > the excel window a child of the main form.  I have code in the main
form's
> > closing event to exit Excel (AppXL.Quit) and to set the Excel
Application
> > variable to nothing prior to closing the application (AppXL = Nothing),
> but
> > this doesn't terminate the EXCEL.EXE process.  Consequently, I get an
> > application error in EXCEL.EXE when I close my main form, saying that
some
> > block of memory could not be 'read'.  Can anyone help me fix this
> problem???

> > --
> > "Programming is 1% inspiration, 99% Help files...."

> --------------------------------------------------------------------------
> --
> > --
> > Rick Palmer
> > Systems Developer
> > W. E. Love and Associates, Inc. C.M.G.A




Mon, 20 Sep 2004 02:02:15 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Closing the Application Doesn't End the Process

2. set to nothing doesn't free memory

3. set object = nothing isn't working

4. End doesn't end

5. END Statement doesn't end program!

6. To set = nothing or not to set = nothing...

7. Object doesn't support current locale setting (Error 447)

8. Creating an Excel Application Object doesn't work

9. Setting an object variable to Nothing does not destroy the object

10. Setting Variants to 'Nothing'

11. Setting a collection to 'Nothing'

12. Comparing objects with 'Nothing'

 

 
Powered by phpBB® Forum Software