redefinition Enum member on IDL file [modified]
-
hi to all , i have 2 enum on my IDL file : interface myInterFace { typedef enum RPTR_RETRACTBIN_STATUS { RPTR_RETRACTBIN_OK, RPTR_RETRACTBIN_FULL, RPTR_RETRACTBIN_HIGH, RPTR_RETRACTBIN_NOT_SUPPORTED, RPTR_RETRACTBIN_UNKNOWN }RPtrRetractBinStatus; ... HRESULT SyncRetract([out,retval] RPtrRetractBinStatus * status); } library myLIB { typedef enum RPTR_RETRACT_TRESHOLD { RPTR_THRESHOLD_RETRACTBIN_FULL, RPTR_RETRACTBIN_HIGH }RPtrRetractThreshold; ... dispinterface _IXFSReceiptPrinterEvents { properties : methods: HRESULT StackOK(RPtrRetractThreshold reason); }; ... } after compile i have this error ::>> redefinition : RPTR_RETRACTBIN_HIGH what is its solution ?(NOTE : i can not rename any enum members)
modified on Thursday, July 10, 2008 1:35 PM
-
hi to all , i have 2 enum on my IDL file : interface myInterFace { typedef enum RPTR_RETRACTBIN_STATUS { RPTR_RETRACTBIN_OK, RPTR_RETRACTBIN_FULL, RPTR_RETRACTBIN_HIGH, RPTR_RETRACTBIN_NOT_SUPPORTED, RPTR_RETRACTBIN_UNKNOWN }RPtrRetractBinStatus; ... HRESULT SyncRetract([out,retval] RPtrRetractBinStatus * status); } library myLIB { typedef enum RPTR_RETRACT_TRESHOLD { RPTR_THRESHOLD_RETRACTBIN_FULL, RPTR_RETRACTBIN_HIGH }RPtrRetractThreshold; ... dispinterface _IXFSReceiptPrinterEvents { properties : methods: HRESULT StackOK(RPtrRetractThreshold reason); }; ... } after compile i have this error ::>> redefinition : RPTR_RETRACTBIN_HIGH what is its solution ?(NOTE : i can not rename any enum members)
modified on Thursday, July 10, 2008 1:35 PM
The enum keyword specifies an enumerated type. An enumerated type is a user-defined type consisting of a set of named constants called enumerators. By default, the first enumerator has a value of 0, and each successive enumerator is one larger than the value of the previous one, unless you explicitly specify a value for a particular enumerator. Enumerators needn’t have unique values. The name of each enumerator is treated as a constant and must be unique within the scope where the enum is defined. An enumerator can be promoted to an integer value. However, converting an integer to an enumerator requires an explicit cast, and the results are not defined. (c) MSDN
With best wishes, Vita