W
Woon Kiat Wong
Hi,
Using IDL, I can declare my enumeration like following,
library MyAppLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
typedef enum MyColor
{
ORANGE = 1,
RED = 2
} MyColor;
}
COM compatible client like VB can use the enum from their application
when import this library. How can I achieve the same thing in Visual
C++ .Net using attribute? I have tried [export] and [v1_enum], but the
enum is only exported to IDL like following
typedef enum MyColor
{
ORANGE = 1,
RED = 2
} MyColor;
library MyAppLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
........
}
I need the enum to be in the library section. Anyone knows how to solve
this?
regards,
Woon Kiat
Using IDL, I can declare my enumeration like following,
library MyAppLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
typedef enum MyColor
{
ORANGE = 1,
RED = 2
} MyColor;
}
COM compatible client like VB can use the enum from their application
when import this library. How can I achieve the same thing in Visual
C++ .Net using attribute? I have tried [export] and [v1_enum], but the
enum is only exported to IDL like following
typedef enum MyColor
{
ORANGE = 1,
RED = 2
} MyColor;
library MyAppLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
........
}
I need the enum to be in the library section. Anyone knows how to solve
this?
regards,
Woon Kiat