Allows you to create an Enum value that can be passed as a parameter.
Although wwDotnetBridge includes enum conversion routines these values are translated into numbers and passed. While that works in most cases, it doesn't if the enum parameters are part of an overload method or constructor.
In these cases you can use ComValue to create an enum and then use that value instead.
o.ComValue.SetEnum(string enumString)
Parameters
string enumString
Example
*** Create enum value
loValue = loBridge.CreateComValue()
loValue.SetEnum("System.Diagnostics.EventLogEntryType.Error")
*** Pass ComValue in place of Enum
*** required here because overloads won't allow enum value only
EventLogEntryType type, int eventID)
loBridge.Invokestaticmethod("System.Diagnostics.EventLog",;
"WriteEntry",;
lcSource,;
"Logging error from FoxPro " + TRANSFORM(DATETIME()),;
loValue, 10 )
See also:
Class ComValue© West Wind Technologies, 2004-2020 • Updated: 08/03/15
Comment or report problem with topic