|
-
Aug 2nd, 2001, 08:25 PM
#1
Thread Starter
PowerPoster
How do I free up a library
How do Free up a library at the end of the program, that I have already loaded I am using the code to initialize the library:
HANDLE hrtflib;
hrtflib = LoadLibrary("RICHED32.DLL");
Now, when the window destroys I use this code to free up the library:
FreeLibrary(hrtflib);
hrtflib = NULL;
But I get an error message saying that cannot convert parameter 1 from void * to _HINSTANCE
how do you fix it?
-
Aug 4th, 2001, 01:31 AM
#2
Monday Morning Lunatic
Declare it as HMODULE not HANDLE.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 4th, 2001, 05:08 AM
#3
Thread Starter
PowerPoster
Thanks.
I was just reading "Programming windows 95 user interface" and following the same code, then got this error.
There are lots of other errors too in her book
-
Aug 4th, 2001, 05:40 AM
#4
Monday Morning Lunatic
A lot of things have changed since Windows 95. Microsoft have made the internal structure a lot more logical, which means that the library functions now operate using HMODULE/HINSTANCE rather than pure HANDLE.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 8th, 2001, 07:33 PM
#5
Thread Starter
PowerPoster
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
|