How to create ActiveX DLL in Visual C++

时光毁灭记忆、已成空白 提交于 2019-12-06 03:36:00

问题


Is there a tutorial/reference for creating an ActiveX DLL in Visual Studio 2008 C++ ?

I've got a DLL built with the DLLRegisterServer/UnregisterServer, and it's registered, but I'm having a little trouble figuring out what name to use to reference it (from a vbscript) and how to make sure my functions are exported correctly. Do I have to put my functions in a special class?

Thanks!


回答1:


There are a lot of details to get right. Best thing to do is to use ATL and the built-in ATL object wizard. It auto-generates a bunch of files so that the IDL, type library, registration script, class wrapper and event proxies are all done correctly.




回答2:


The component's ProgID is normally defined in the project's .rgs file.




回答3:


+1 to nobugz

how to make sure my functions are exported correctly

Visual Studio contains OleView.exe. You can open your dll from it and see the list of props and methods.

As for tutorial, check here: ATL Concepts



来源:https://stackoverflow.com/questions/2600572/how-to-create-activex-dll-in-visual-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!