Call COM Object by VC++

G

Guest

Dear All,

I am a NewBie in Visual C++. I would like to know how to call a "Active X
Dll" COM Library created by VB 6.0

At this moment, i am using a simple hello world console program and a
customized VB 6 COM as the client.

Should i use something like ?: #import "D:\testing.dll"

http://support.microsoft.com/kb/262450/zh-tw

The point is it can not work!

I am usig Visual C++ in VS 2005 as Client and VB6 as COM Object

If you have any idea please give me a hand

Thank you very much in advance

EricLun
 
B

Brian Muth

EricLun said:
Dear All,

I am a NewBie in Visual C++. I would like to know how to call a "Active X
Dll" COM Library created by VB 6.0

At this moment, i am using a simple hello world console program and a
customized VB 6 COM as the client.

Should i use something like ?: #import "D:\testing.dll"

I would probably add the no_namespace attribute, as in:

#import "D:\testing.dll" no_namespace

This will generate two files in your build directory, with *.tlh and *.tli
extensions. Take a look at the contents. It will show the methods and
properties that can be used to call into your VB6 DLL.

What problems are you encountering?

Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top