I create a OCX program with ATL project, and One parameter in the interface
function is ENUM type, and I has defined the ENUM type in the interface, but
compiled falid with MIDL2001, in the generated IDL file, I find the
generated result is not the same with my think, and What can I do?
The generated IDL is so:
in the interface define file(header file):
[...]
_interface IMyInterface:...
{
typedef enum _STATE
{
Init = 0,
Pause = 1,
Stop = 2
} STATE;
[propget, id(13), helpstring("ÊôÐÔ CurrentState")] HRESULT
CurrentState([out, retval] STATE* pVal);
}
compiled fiaild£¬
in the IDL file(generated idl file):
[...]
enum _STATE
{
Init = 0,
Pause = 1,
Stop = 2
} ;
enum _STATE Init;
enum _STATE Pause;
enum _STATE Stop;
typedef enum STATE STATE;
[propget, id(13), helpstring("ÊôÐÔ CurrentState")] HRESULT
CurrentState([out, retval] STATE* pVal);
....