|
-
October 24th, 2002, 01:23 PM
#1
Can I use a COM Interface in VB.NET
As a novice developer someone gave me code and a guide for developing something called a CentralTools module for a product called DrawBrdige Central. It is a COM interface that when compiled to a dll adds a tab to the properties of a DrawBridge Central site. The sample code is all C++ using MFC. I am not ready to conquer C++ programming as I am even still new to VB.NET (I do have over two years experience in VB Scripting for ASP and .VBS files).
Is there a way to bring the interface defined in C++ code over into VB.NET?
Thanks,
Dominic
If anyone is curious, I can zip up the pdf documentation and the sample files and post them here...
-
October 24th, 2002, 02:49 PM
#2
If it's a COM DLL, when you reference it, .NET will automatically create a "wrapper" for it and you can use it just like in VB 6.
-
October 24th, 2002, 03:07 PM
#3
Actually it started as the code for a COM dll. I can compile it using VS Visual C++ 6.0 IDE. I've even registered the .dll with the system. However, I can't seem to get access to it in VB code. I also need to code the property page look and feel and functionality behind them. Then there are the call-back interfaces I need to somehow use. All the code for these are in C++, I need to understand how to do it in VB instead.
-
October 24th, 2002, 03:24 PM
#4
OK, here's some more information I was able to gleem from the documentation.
A CentralTool is an in-porcess COM server packaged as a DLL. CentralTools are implementationsof the ICentralTool interface. A CentralTool communicates with the program using three callback interfaces. The user interface is a standard MFC CPropertyPage (this is what the site admin can use to set specific properties for the add-on).
So I guess that once the interfaces are all defined by code and a CPropertyPage is designed, then it is compiled into a COM based DLL that is access during run-time by the program.
I hope this add'l info helps you understand how to help me.
-
October 24th, 2002, 03:53 PM
#5
Originally posted by DSJ
If it's a COM DLL
It becomes a COM DLL after you write all the code for it. Right now it's a bunch of .h and .cpp files defining an interface.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|