Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COM DLL with MFC Wizard: no help list (with properties) in VB !!!

Status
Not open for further replies.

micha12

Programmer
Dec 11, 2002
10
RU
Hello everybody,

I have a question on ActiveX (COM) DLLs in C++, created using MFC wizard.

I can create a COM DLL for Visual Basic that works perfectly well, but there is one little problem. In my DLL (more precisely, in one of the classes exposed by the DLL) there is a property that returns a reference to another object (a pointer to its IDISPATCH), of a class in the same DLL.

Let us call this property GetObject. When in the Visual Basic editor I type MainDllClassObject.GetObject. ..., after I type the dot after "GetObject", no list with properties and methods of this object appears. I want the list to appear. What should I do? I guess I should introduce some changes into my IDL file, but what exactly should I do?

Thanks in advance.
 
It's because it's a pointer to IDispatch:

If you declare an object in VB as "Object" (which is actually the same as IDispatch) you won't get the intellisence either.

Greetings,
Rick
 
I think it is because it is declared as an Object.
If in IDL is declared as XXX, you should declare it also as XXX, not as an Object. The same thing with return type of function. If it returns an Object, not an XXX, you will see too few helpful information when pressing "."

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Thanks a lot, I managed to solve the problem by specifying the needed return type in the IDL file. Now IntelliSense works in VB. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top