PRB: "Warning MIDL2368" When UDT Tag Name Differs from UDT Name

Article translations Article translations
Article ID: 285146 - View products that this article applies to.
This article was previously published under Q285146
Expand all | Collapse all


When the IDL file has a user-defined type (UDT) structure as follows:
typedef [uuid(01234500-89AB-CDEF-0123-456789ABCDEF)]
struct tagMyUDT {
    [helpstring("Name")]          BSTR Name;
    [helpstring("Address")]        BSTR Address;  
} MyUDT;
Microsoft Interface Definition Language (MIDL) gives the following warning:
warning MIDL2368 : error generating type library, ignored : Could not set UUID : tagMyUDT
You do not receive a warning if the UDT is an ENUM.


When you define a structure whose tag name is different from the struct name, MIDL generates a TKIND_ALIAS for the tag name. MIDL tries to set the universally unique identifier (UUID) on both the UDT itself and the tag (TKIND_ALIAS), and OLE Automation does not accept the same UUID on two entries, even though they are the same.


You can safely ignore the MIDL2368 warning. To work around this problem, rename the tag name of the structure so that it is the same as struct name.


For more information on UDTs, see the following Microsoft Web site:


Article ID: 285146 - Last Review: July 12, 2001 - Revision: 1.3
  • Microsoft COM+ 2.0 Standard Edition
kbmidl kbnofix kbprb KB285146

Give Feedback


Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from