Consider this:
VB Code:
[ uuid(27dbef8a-e493-40b9-8ac5-92d064cba696), version(1.0) ] library Test { importlib("stdole2.tlb"); struct Test { long Bob; }; [ uuid(127ee650-1258-11db-9cd8-0800200c9a66), object, oleautomation ] interface ITest : IUnknown { HRESULT Test ([out,retval] SAFEARRAY(struct Test)*); }; }
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?


Reply With Quote