How to create ActiveX DLL in Visual C++

2020-07-16 12:30发布

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!

标签: c++ dll activex
3条回答
叛逆
2楼-- · 2020-07-16 13:10

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.

查看更多
该账号已被封号
3楼-- · 2020-07-16 13:17

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

查看更多
做自己的国王
4楼-- · 2020-07-16 13:21

+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

查看更多
登录 后发表回答