How to access DLL methods n variables without .h n .lib file??

R

radishcarrot

Hi, I try to access the QuickTime COM/ActiveX DLL file, QTOControl.dll
in my VC++ codes as follows:

HINSTANCE OTOControlLib = LoadLibrary("QTOControl.dll");

But how do I access the methods in the dll file?? The problem lies in
that QuickTime did not provide the .h or .lib file for the DLL file??

Any solution??
Thanks alot
:)
 
I

Ian Collins

radishcarrot said:
Hi, I try to access the QuickTime COM/ActiveX DLL file, QTOControl.dll
in my VC++ codes as follows:

HINSTANCE OTOControlLib = LoadLibrary("QTOControl.dll");

But how do I access the methods in the dll file?? The problem lies in
that QuickTime did not provide the .h or .lib file for the DLL file??

Any solution??

Try a windows programming group, this it OT here.
 
U

Uday Bidkar

radishcarrot said:
Hi, I try to access the QuickTime COM/ActiveX DLL file, QTOControl.dll
in my VC++ codes as follows:

HINSTANCE OTOControlLib = LoadLibrary("QTOControl.dll");

But how do I access the methods in the dll file?? The problem lies in
that QuickTime did not provide the .h or .lib file for the DLL file??

Any solution??
Thanks alot
:)

Hi
GetProcAddress( OTOControlLib , "FunctionName" ) will return the
address of the function named "FunctionName" inside the DLL if it has
been exported by the DLL. But you must know the prototype of function
"FuncionName" in order to store and/or use the pointer returned by
GetProcAddress.
You can see the functions exported by a DLL using dependancy walker

Regads,
Uday Bidkar
 
A

Alf P. Steinbach

* Uday Bidkar:
[off-topic answer to off-topic posting]

Please read the FAQ on what to post and not to post in this group.

Thank you.
 
R

radishcarrot

Uday said:
Hi
GetProcAddress( OTOControlLib , "FunctionName" ) will return the
address of the function named "FunctionName" inside the DLL if it has
been exported by the DLL. But you must know the prototype of function
"FuncionName" in order to store and/or use the pointer returned by
GetProcAddress.
You can see the functions exported by a DLL using dependancy walker

Regads,
Uday Bidkar

Thanks for the reply.
I tried the GetProcAddress but what if the function name is input
parameter?? then how do I go about doing it?

Anyway I thought this is c++ programming.. m I wrong?? Cos I just
started programming in C++ and thought that LoadLibrary, GetProcAddress
etc are C++ programming syntax.
Sorry
 
I

Ian Collins

radishcarrot said:
Thanks for the reply.
I tried the GetProcAddress but what if the function name is input
parameter?? then how do I go about doing it?

Anyway I thought this is c++ programming.. m I wrong?? Cos I just
started programming in C++ and thought that LoadLibrary, GetProcAddress
etc are C++ programming syntax.
Sorry
It a C++ language group, we discuss the core language as defined by the
standard. Anything platform specific (DLLs for example) is of topic and
you'll get better advice on a platform specific group.
 
A

Alf P. Steinbach

* radishcarrot:
Anyway I thought this is c++ programming.. m I wrong??

Yes.

See this group's FAQ item

"[To] Which newsgroup should I post my questions?"

currently at <url:
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9>

Cos I just
started programming in C++ and thought that LoadLibrary, GetProcAddress
etc are C++ programming syntax.

No, they're Windows API functions, accesible from any language that
supports them.

Try [comp.os.ms-windows.programmer.win32].
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,204
Latest member
LaverneRua

Latest Threads

Top