简体   繁体   中英

How do I include an activeX library in my C++ project?

I would like to add a third party library to my C++ project. The library is ActiveX and I have to admit, that I have no experience with that. I tried to google the solution but could not find one that fits for me. I'm using Visual Studio and my project is not MFC.

From the third party library I have a dll-file, a tlb-file and an idl-file, but no header file. I tried to include the tlb-file but when compiling I got a lot of errors from the kind of missing typedef for default-int and character is not allowed . (just by writing #include "xyz.tlb" )

Is the tlb file incompatible with my project? Is there another way to include the activeX class I need?

One could easily write an entire college course about doing what you're talking about. The simple answer is that you need to use #import not #include , but there is a lot more you'll have to deal with to properly utilize an activex library.

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