Re: DLL hosting
- From: "Mark" <swozz_@xxxxxxxxxxx>
- Date: Tue, 20 Dec 2005 21:42:17 -0000
I don't have control over the host application (SQL Server). The DLL is an
OLEDB provider, I can add it into SQL Server, use it, then remove it from
SQL Server - at this point, SQL Server shouldn't have the DLL loaded but for
some reason it has - however, if I wait around 1 minute, then it unloads it
and I am free to recompile my DLL!
I just need to know why it does this, or if I can force an unload without
restarting SQL Server.
--
Best regards
Mark
"William DePalo [MVP VC++]" <willd.no.spam@xxxxxxxx> wrote in message
news:upIjGxaBGHA.2476@xxxxxxxxxxxxxxxxxxxxxxx
> "Mark" <swozz_@xxxxxxxxxxx> wrote in message
> news:OzkpQ6ZBGHA.1180@xxxxxxxxxxxxxxxxxxxxxxx
>>I am developing a DLL using VS2005 with C++.
>>
>> The DLL is loaded within the host application, I then use "Attach to
>> process" to start debugging. Once I stop debugging, I might modify some
>> code and recompile but the compiler can't write out the .EXE file because
>> it is still loaded by the host application. So I have to shut down the
>> host application to force an unload of the DLL.
>>
>> Is there anyway around this problem?
>
> Well, you can't have your cake and it eat, too. :-)
>
> That is, the code sections in the DLL file can not both be loaded into the
> host process' space and be modified, too.
>
> Of course, if your application is such that you use explicit linking and
> call LoadLibrary() to load it, GetProcAddress() to determine DLL export
> addresses in the host's address space, if you call those exports
> indirectly through a pointer and if when you are done you call
> FreeLibrary() then whenever there have been as many calls to FreeLibrary()
> as LoadLibrary() you will be able modify the file.
>
> Of course, don't expect to call the function until the next LoadLibrary(),
> etc.
>
> Regards.
> Will
>
.
- Follow-Ups:
- Re: DLL hosting
- From: Scherbina Vladimir
- Re: DLL hosting
- From: Brian Muth
- Re: DLL hosting
- References:
- DLL hosting
- From: Mark
- Re: DLL hosting
- From: William DePalo [MVP VC++]
- DLL hosting
- Prev by Date: Re: DLL hosting
- Next by Date: Re: DLL hosting
- Previous by thread: Re: DLL hosting
- Next by thread: Re: DLL hosting
- Index(es):
Relevant Pages
|