By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,906 Members | 1,384 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,906 IT Pros & Developers. It's quick & easy.

How To Load Dll In Vc++

P: 1
How To Load Dll In Vc++
May 26 '07 #1
Share this Question
Share on Google+
1 Reply


weaknessforcats
Expert Mod 5K+
P: 9,197
Use LoadLibrary() to load the dll. It wil return a handle that is used in the other functions below.

Then use GetProcAddress() to get the address of your function as a FARPROC.

Typecast the return to a function pointer of thwe correct return type an arguments.

Call the function in the dll using the function pointer.

When you are finished, unload the dll by calling FreeLibrary().
May 26 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.