Results 1 to 1 of 1

Thread: IDL Problem

  1. #1

    Thread Starter
    Frenzied Member yrwyddfa's Avatar
    Join Date
    Aug 2001
    Location
    England
    Posts
    1,253

    IDL Problem

    Consider this:

    VB Code:
    1. [
    2.     uuid(27dbef8a-e493-40b9-8ac5-92d064cba696),
    3.     version(1.0)
    4. ]
    5.  
    6. library Test
    7. {
    8.  
    9.     importlib("stdole2.tlb");
    10.  
    11.     struct Test {
    12.         long Bob;
    13.     };
    14.  
    15.  
    16.     [
    17.         uuid(127ee650-1258-11db-9cd8-0800200c9a66),
    18.         object,
    19.         oleautomation
    20.     ]
    21.     interface ITest : IUnknown
    22.     {
    23.         HRESULT Test ([out,retval] SAFEARRAY(struct Test)*);
    24.     };
    25.  
    26. }

    It compiles with : warning MIDL 2039 : interface does not conform to [oleautomation] attribute : [Parameter of Procedure 'Test' ( interface 'ITest')]

    The VB6 IDE concurs with this and I am unable to set a reference to the created TLB.

    The problem is in specifying the return of an array of UDT's in the function specification. I can drop OleAutomation and things will work, but I can't then use the Universal Marshaller which is what i need to do (remote COM+ application)

    Using the obsolete mktylib, and the MIDL mktyplib203 switch makes no difference, either. I am using MIDL v5.01.0164

    If anyone has *any* clue why this doesn't work I would be eternally grateful.

    Can anyone else actually replication the problem?
    Last edited by yrwyddfa; Jul 13th, 2006 at 05:56 AM.
    "As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein

    It's turtles! And it's all the way down

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