Click to See Complete Forum and Search --> : COM-object (DLL) locked after use?!


Tristan McLure
February 6th, 2001, 09:25 AM
Hi there,

I have a big problem with my COM-objects, after I compiled them as a DLL and after running them succesfully in an ASP-script I can't recompile the DLL in VC++ because the file is somehow locked - read: in use, but all my browser windows and server-sessions using this COM-object are closed. The only solution for this problem is to restart the computer, this is really a SLOW process ...
I also tried to unregister the object with the regsvr32-command but this did not really help :-( ... any solution for this problem? Did I oversee a setting in the configuration of my IIS (Win2000) ? Or is the problem COM-related and if so, is there a fix? I think the solution must be very simple but for the moment I'm somehow to blind ... btw. this also happens with other components, so others than mine, the problem seems to be the ASP-script or so ...

I use: set objTest = Server.CreateObject ("ASPTest.myASPtest")
to create the object and
objTest.Testfunc ()
to call a function ... as it is described in every book ...

HELP!?

Thank you in advance!

Tristan McLure

jgauntz
February 7th, 2001, 09:16 AM
IIS has a tendency of holding onto COM objects. So try stopping IIS, upload, and restart IIS. This should do it.

Tristan McLure
February 7th, 2001, 09:33 AM
Thanx ... this did the trick ... I have a lot of books about the IIS and ASP-programming but they didn't mention it at all ... I tried restarting but this didn't work ... but: when I stop the service, then compile and then restart the service it really works ... although the "service-shutdown" cancels at "23 seconds remaining" ... hmm ... funny behavior though ...

jgauntz
February 7th, 2001, 04:35 PM
Glad I could help.

borj
October 10th, 2001, 09:33 AM
Hi,

I had created a dll in VC++ with

extern "C" __declspec(dllexport) CString func(CString par1)
It's a function taking a CString and returning a CString..

the created dll is amdec.dll
How do i call this function in an asp page..

Thank you in advance.
Borj