0
Answer

Enums in COM-enabled DLL

Chris

Chris

14y
3.1k
1
I have created a COM-enabled C# DLL with the following code:


 namespace TestDLL
{
public enum Location
{
COUNTRY,
TERRITORY,
REGION,
MAX_LOCATIONS
}

public enum WeekDay
{
SUNDAY,
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
MAX_WEEKDAYS
}
}


The issue I am having is when I access the referenced TestDLL object from a VBA-type editor (WinWrap v9.0.83), the dropdown list shows not only the Location and Weekday references, but also all of the enums within the 2 of them.  To clarify, this is what I see when accessing one of the enums immediately after the OEMPeriod character:

TestDLL. ________________
        | COUNTRY        |
        | FRIDAY         |
        | Location       |
        | MAX_LOCATIONS  |
        | MAX_WEEKDAYS   |
        | MONDAY         |
        | REGION         |
        | . . .          |
         ----------------

What I would like to have happen is this:

         ----------------
TestDLL.| Location       |
        | Weekday        |
         ----------------

and upon selecting Location, the dropdown list then shows the enums for Location:

                  ----------------
TestDLL.Location.| COUNTRY        |
                 | MAX_LOCATIONS  |
                 | REGION         |
                 | TERRITORY      |
                        ----------------

If this is possible, what would I need to do to accomplish this behavior?


TIA,
Chris.