To all,
good day!....
this is my 1st time in programming to call a DLL functions in VC++.
pls give me an idea on how to setup the dll file to make visible in my program and to use its available functions.
waiting a reply. thanks.
michael
To all,
good day!....
this is my 1st time in programming to call a DLL functions in VC++.
pls give me an idea on how to setup the dll file to make visible in my program and to use its available functions.
waiting a reply. thanks.
michael
A search is your best bet. There is plenty of advice on DLL's.
First though,
Is it your DLL, ie are you going to implicitly or explicitly link the DLL? (Use a library or load a t runtime)
Do you need to run a dependancy walker to find/check the exported functions?
This tool comes with MSVC, just run Depends.exe and drag the DLL into it to find what functions are available and what the DLL is dependant on.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
thanks you for your reply novocain.
the type of dll am going to use is to load at runtime.
actually, i have the header file .h and .lib of that dll, but i don't know how to link in my program.
thanks.
Well for starters, you'll need LoadLibrary() and FreeLibrary(). Those deal with a HINSTANCE which represents the dll. Second, GetProcAddress() will give you a pointer to the function you need. Search on those functions to get started
If you have the lib can link impilcitly which is slightly easier.
Or expilictly with the GetProcAddress() ect.
Run a search here on 'dll*' (search must be at least 4 letters long) for some more code. Ask again if you have problems.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill