Click to See Complete Forum and Search --> : MIDL


greene
April 15th, 1999, 12:25 AM
In .IDL file, a method of some interface is as follows.

interface List : IDispatch
{
...........
HRESULT NodeName([in] Node *, [out, retval] BSTR *);
}



But in Dispinterfaces type of ITypeLib Viewer, the method is as follows.

[id(0x60020005)]
BSTR nodeName([in] Node* __MIDL_0092);



What is __MIDL_0092 ?
Also
how can I use the method(nodeName)?

mihai
April 16th, 1999, 03:16 AM
use "[id(xxxx)]"HRESULT NodeName([in] Node * "name", [out, retval] BSTR *); All quotes are what you have to add to your midl. __MIDL_92 is a name of your parameter.
Sincerely, Mihai

pgrenette
April 16th, 1999, 04:25 PM
1. __MIDL_0092 is the variable name given by MIDL to your first parameter (you didn't provide one).

2. How to use NodeName ?

in C++:
HRESULT hRes = pMyList->NodeName(&myNode, &bsName);
if (SUCCEEDED(hRes))
{
...

in VB:
Name = MyList.NodeName myNode
...

greene
April 16th, 1999, 08:31 PM
Thank you for your response.

I use VC++ 6.0.
The nodeName has a single parameter, its return type is CString.

In VC++ 6.0, nodeName is declared as follows.

CString nodeName(LPDISPATCH __MIDL_0091);




But in your response, the use of this is

HRESULT hRes = pMyList->NodeName(&myNode, &bsNode);




I want to your help.