C
Cartoper
I am working on a project that currently has some interfaces and enums
defined in an IDL file. The sole implementor of these interfaces are
now in C++ CLI, but I still have consumers that are in unmanaged C++.
I would like to move the interface and enum definitions to the C++ CLI
code, but I cannot figure out what shape it should take:
typedef [ uuid(4E803D49-2EB8-450a-BD00-DC8336D1E6B5) ]
enum {
associate,
chief,
boss
} MemberTypeEnum;
[
object,
uuid(F1A27469-9E22-41dd-A905-F76C7DB0BE51),
dual,
nonextensible,
pointer_default(unique)
]
interface IMember : IDispatch {
[id(1), propget] HRESULT Name([out, retval] BSTR* pRetVal);
[id(2), propget] HRESULT Address([out, retval] BSTR* pRetVal);
[id(3), propget] HRESULT Phone([out, retval] BSTR* pRetVal);
[id(4), propget] HRESULT Joined([out, retval] DATE* pRetVal);
[id(5), propget] HRESULT MemberType([out, retval] MemberTypeEnum*
pRetVal);
};
to
typedef [ uuid(4E803D49-2EB8-450a-BD00-DC8336D1E6B5) ]
enum MemberTypeEnum {
associate,
chief,
boss
};
[uuid("F1A27469-9E22-41dd-A905-F76C7DB0BE51")]
public interface class IMember
{
property String^ Name { get(); };
property String^ Address { get(); };
property String^ Phone { get(); };
property DateTime Joined{ get(); };
property MemberTypeEnum MemberType();
};
defined in an IDL file. The sole implementor of these interfaces are
now in C++ CLI, but I still have consumers that are in unmanaged C++.
I would like to move the interface and enum definitions to the C++ CLI
code, but I cannot figure out what shape it should take:
typedef [ uuid(4E803D49-2EB8-450a-BD00-DC8336D1E6B5) ]
enum {
associate,
chief,
boss
} MemberTypeEnum;
[
object,
uuid(F1A27469-9E22-41dd-A905-F76C7DB0BE51),
dual,
nonextensible,
pointer_default(unique)
]
interface IMember : IDispatch {
[id(1), propget] HRESULT Name([out, retval] BSTR* pRetVal);
[id(2), propget] HRESULT Address([out, retval] BSTR* pRetVal);
[id(3), propget] HRESULT Phone([out, retval] BSTR* pRetVal);
[id(4), propget] HRESULT Joined([out, retval] DATE* pRetVal);
[id(5), propget] HRESULT MemberType([out, retval] MemberTypeEnum*
pRetVal);
};
to
typedef [ uuid(4E803D49-2EB8-450a-BD00-DC8336D1E6B5) ]
enum MemberTypeEnum {
associate,
chief,
boss
};
[uuid("F1A27469-9E22-41dd-A905-F76C7DB0BE51")]
public interface class IMember
{
property String^ Name { get(); };
property String^ Address { get(); };
property String^ Phone { get(); };
property DateTime Joined{ get(); };
property MemberTypeEnum MemberType();
};