CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: MIDL

  1. #1
    Join Date
    May 1999
    Posts
    5

    MIDL

    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)?



  2. #2
    Join Date
    May 1999
    Posts
    48

    Re: MIDL

    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



  3. #3
    Join Date
    Apr 1999
    Location
    PARIS, FRANCE
    Posts
    16

    Re: MIDL

    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
    ...



  4. #4
    Join Date
    May 1999
    Posts
    5

    Re: MIDL

    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.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured