473,326 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How To Load Dll In Vc++

How To Load Dll In Vc++
May 26 '07 #1
1 2251
weaknessforcats
9,208 Expert Mod 8TB
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

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

Similar topics

3
by: Boris Kuznetsov | last post by:
Hey Gurus!!! Please help me to figure out how to work with images!!!! My project has to be accomplished in pure VC++ (not .NET), and I have ran into troubles doing that!!! Thank you for...
5
by: Pradnyesh Rane | last post by:
Hi, I am encountering the following linker error on VC7. LINK : fatal error LNK1171: unable to load ole32.dll This error is only encountered for the "Debug" configuration. The project...
4
by: Scott Chang | last post by:
Hi all I copied the following VC++ 6.0 code (written by someone in the website) to my VC++ .Net 2002-Windows XP Pro PC ////****Solution 'dyndllclass' (2 projects)***/// ///***dynapp****(1st...
6
by: Steve | last post by:
I'm playing with late binding and trying a very simple test to load an assembly In my "Host" application I have this code: <code> string modulePath =...
0
by: John Bailo | last post by:
When clicking on a form application (some sample code) this error appears in vc#2005 Could not load type 'Microsoft.VisualStudio.Shell.Interop.IVsRunningDocumentTable2' from assembly...
5
by: dotnetchic | last post by:
(Sorry about cross-post to MFC...got no reply so I'm reposting here) Porting my code over from VC++6 to MC++, loading bitmaps from resources broke. This code is in a lib file (previously, it was...
5
by: B. | last post by:
I know there is similar post few years back, but it didn't help solving my problem: We have a big project. Our legacy code is ported to VC++ 2005 recently. We have new feature written in C#.Net....
0
by: meenu | last post by:
HI All, I'm very new to C# and .Net programming. I'm trying to load a VC++ project programmatically. I came across VCProjectEngine interface. I tried using VCProjectEngine.LoadProject...
8
by: Joe Withawk | last post by:
I have a solution consisting of a c# project as win application and a c++ project as classlibrary. Both are .net 2.0 The classlibrary handles some loading of quicktime movies, but that should not...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.