简体   繁体   中英

How do I import classes from a prebuilt DLL in either C++ or C#?

I am wondering what the procedure is for importing classes from a DLL into a C++ program is? It is a prebuilt DLL made by TI so I don't have access to either the .h or .lib files. I looked around on SO and all of the solutions seem to require that you have developer access to the DLL. Which I am not as I don't work for TI. The loadlibrary function doesn't seem to want to open the DLL. The program fails to open it every time. I am at a loss now and any help is appreciated.

To give context its the TI.ZPI.dll which is used by their program called Ztool to run and manage Zigbee networks. I am trying to access the functions so I can write my own version of Ztool that has more functionality. The literature for the ZPI says it can be implemented in Visual Basic, C#, C++, J# and JScript

This blog describes how to create a lib from a DLL.

https://adrianhenke.wordpress.com/2008/12/05/create-lib-file-from-dll/

I also use depends.exe to see what functions are available in the DLL. Depends.exe was distributed in older Windows SDKs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM