Re: DLL not being released
The app must specifically be shut down to release the file handle lock.
Re: DLL not being released
Do my resources get eaten up if i call the DLL several times from my calling App in the same manner as my example above?
Re: DLL not being released
No. Call it as many times as you like. The way resources get eaten up is by NOT releaseing an object, which you are doing.
Re: DLL not being released
It seems to me the file handle lock is only part of it. My dll starts up by calling mod main, which get's executed the first time i call the DLL, but not the subsequent times. Is that normal?
Re: DLL not being released
Yes, it could be normal, depending on the type of project it is.
Re: DLL not being released
This could be, as has been mentioned, normal behaviour. You are using CreateObject which will invoke the schedule control manager (SCM) to create the instance of your object.
This means the lifetime of the object is controlled by the COM+ runtime, and not by the VB6 runtime.
COM+ can often keep objects active for what seems like for ever (2 minutes) because this improves performance by bypassing the object creation time.
Try using the 'new' operator. This will (sometimes) make sure that the VB6 runtime will handle object creation, and destruction - which is faster. You should be using this anyway if the class is on the local machine.
Let me know if this works.