Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
1.26/5 (5 votes)
See more:
Hello !
I work on vc++ project where i need to call function included in a dll provided by a third part, i would like to avoid to use diassemble tool so what type of additional file i need to call the functions in c code ? thanks a lot for help.
Posted
Comments
PIEBALDconsult 27-Apr-15 21:00pm    
None.
Sascha Lefèvre 27-Apr-15 21:18pm    
Preferably an API documentation.
sashje- 28-Apr-15 5:23am    
a header file and a lib file would help you in your IDE. If you cannot obtain this, you need to find all exports by using "dumpbin /exports" ..
THen you find all the exported methods.. Thereafter you can load the dll using
LoadLibrary(), find the method using GetProcAddress.. and then invoking it.

Reference: https://msdn.microsoft.com/en-us/library/windows/desktop/ms686944%28v=vs.85%29.aspx

1 solution

A document on what public functions are provided by the dll file and a litle knowledge on P/Invoke. The MSDN has some neat tutorial on the topic: https://msdn.microsoft.com/en-us/library/aa288468%28v=vs.71%29.aspx[^]

I should mention that if your DLL file is x86, then in the .NET project settings you will have to set the the platform target to x86.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900