How do I expose the DayOfWeek enum in my interface?

55 Views Asked by At

In my COM DLL I want to include a DayOfWeek property:

private DayOfWeek _MeetingDay;

When I will my wrapper in C++ and examine the interface:

 virtual HRESULT __stdcall get_MeetingDay (
   /*[out,retval]*/ enum DayOfWeek * pRetVal ) = 0;
 virtual HRESULT __stdcall put_MeetingDay (
   /*[in]*/ enum DayOfWeek pRetVal ) = 0;

My problem is the the enum does not seem to be defined:

MSAToolsLibrary::DayOfWeek eMeetingDay = MSAToolsLibrary::DayOfWeek_Sunday;

But, if I start typing like this:

enter image description here

They are listed. Yet I can't even use that approach. How do I expose the DayOfWeek enum?


I know how to expose my own enums:

[Guid("xxx")]
[ComVisible(true)]
public enum NotesModeCLM
{
    EmailAddress,
    PhoneNumber,
    Remarks
}

But not C# enums.

0

There are 0 best solutions below