|
-
November 23rd, 2005, 05:29 AM
#1
Unload a dll
Hi All
Please tell me that how can I unload a dll.
As I need to unload msoe.dll.
Please reply
Thanks
-
November 23rd, 2005, 05:35 AM
#2
Re: Unload a dll
 Originally Posted by hash123
Please tell me that how can I unload a dll.
As I need to unload msoe.dll.
look at ::FreeLibrary(..)
Cheers
-
November 23rd, 2005, 05:38 AM
#3
Re: Unload a dll
Call FreeLibrary() with the module handle of the dll which you wish to unload.
You can get the module handle by calling GetModuleHandle with the name of the module as a parameter.
-
November 23rd, 2005, 05:42 AM
#4
Re: Unload a dll
 Originally Posted by hash123
... I need to unload msoe.dll.
Why do you need it? Are you using LoadLibrary to load this dll?
-
November 23rd, 2005, 06:13 AM
#5
Re: Unload a dll
Infact I am not loading msoe.dll,
I need to unload this dll because if it is not unloaded then it would not change( switch) the identities of Outlook express.
So tell me that without loading how can I unload a dll.
Pls reply
Thanks
-
November 23rd, 2005, 08:08 AM
#6
Re: Unload a dll
If you have not loaded the dll explicitly using loadlibrary it means either
a. You have loaded it implicity - run dumpbin on your binaries and check for references to msoe.dll
b. You are using some other dll that is using msoe.dll
In either case you should not unload msoe.dll by calling unloadlibrary, because there are likely to be live references to exported objects / functions in your process. And if in your process, you try to make use of any exported functions / classes exported by msoe.dll after you have explicitly unloaded it, you will get an exception.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|