The information in this article applies to:
SYMPTOMSIf you define MyType as a structure with a union that has structures as union_arms in your IDL file, the Midl generated type encoding function, MyType_Encode(), may fail with the following error code:
CAUSEIn some specific cases, a union that contains structures may cause Midl to produce incorrect offset for the description of the structure. As a result, the Midl generated stub routine crashes in the marshaling engine. RESOLUTIONChange your union member inside MyType from a flat member to a pointer type. Sample CodeFor example, given the following type definitions:
Change the myUnion field of MyType listed below:
to a pointer to MyUnion as follows:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. REFERENCESX/Open DCE: Remote Procedure Call Additional query words: Type Encoding Midl union_arms
Keywords : kbnetwork kbAPI kbNTOS400bug kbRPC kbSDKPlatform kbGrpNet |
Last Reviewed: October 14, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |