Microsoft KB Archive/327105

= BUG: OLE_COLOR Is Not Imported as a System.Drawing.Color =

Article ID: 327105

Article Last Modified on 5/28/2003

-

APPLIES TO


 * Microsoft .NET Framework 1.0
 * Microsoft .NET Framework 1.1

-



This article was previously published under Q327105



SYMPTOMS
If you use Type Library Importer (Tlbimp.exe) to import a Component Object Model (COM) component into the Microsoft .NET Framework, and then there is an argument of the OLE_COLOR data type in one of the methods of the COM component, the OLE_COLOR argument is imported into the UInt32 value type instead of into the System.Drawing.Color namespace.



RESOLUTION
Use the following method to convert the color value from UInt32 to the System.Drawing.Color namespace. public static Color System.Drawing.ColorTranslator.FromOle(int olecolor)



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
You can use the either of the following tools to translate System.Drawing.Color to OLE_COLOR:
 * Tlbexp.exe
 * Regasm.exe

Keywords: kbbug kbcominterop KB327105

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.