Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 224
Default Does a standard DLL stay in memory?

If I declare a function in a standard DLL (not an ActiveX DLL) with
"Declare Function" (etc.), and then in the code make a call to that
function in the standard DLL, does the DLL stay in memory until Excel
exits?

Or is the standard DLL unloaded after each call to it?


Thanks,

Greg
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Does a standard DLL stay in memory?

Why not have a look for yourself
xl97-2003 in WinXP
Help, About, System info, Software environment, loaded modules
xl2007
Excel Options, Resources, About, System info, loaded modules

Regards,
Peter T


"Greg Lovern" wrote in message
...
If I declare a function in a standard DLL (not an ActiveX DLL) with
"Declare Function" (etc.), and then in the code make a call to that
function in the standard DLL, does the DLL stay in memory until Excel
exits?

Or is the standard DLL unloaded after each call to it?


Thanks,

Greg



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Does a standard DLL stay in memory?

I believe the DLL goes into swap space like most executables and data. it
will stay in memory until it is not needed any more and will be swapped out
of memory when another program requires the swap space. windows keep track
of the programs that are loaded in memory and will not re-open the dll if it
already is loaded into memory. You cannot guarantee that the file will stay
in memory or get swapped out of memory.

With some DLL's tht require a memory block for input or output you can
declare the required memory in your macro so it doesn't get lost for each DLL
call.

For example if you use Memorycopy. The DLL will copy a block of memory.
You specify the where in memory the input and output will goes. The actuall
DLL is an executable that has no required memory space. The executable part
of the DLL may get swapped out of memeory but the actual data that gets moved
is part of the macro and doesn't get lost.

"Greg Lovern" wrote:

If I declare a function in a standard DLL (not an ActiveX DLL) with
"Declare Function" (etc.), and then in the code make a call to that
function in the standard DLL, does the DLL stay in memory until Excel
exits?

Or is the standard DLL unloaded after each call to it?


Thanks,

Greg

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XL 2007 - Out of Memory - memory leak/bug? PCLIVE Excel Discussion (Misc queries) 0 March 23rd 09 03:31 PM
(reposting) Memory problem: Out of Memory and cannot save WHA Excel Programming 0 November 30th 07 05:09 PM
Memory problem: Out of Memory and cannot save WHA Excel Programming 0 November 30th 07 03:52 AM
Ex 2K Standard Toolbar won't stay hidden Dane Excel Discussion (Misc queries) 0 October 6th 05 11:47 PM
VB Projects stay in memory Tod[_3_] Excel Programming 3 February 2nd 04 10:37 PM


All times are GMT +1. The time now is 11:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"