this code snipet is from the msi.h header file in the ms sdk.
typedef enum tagINSTALLSTATE
{
	INSTALLSTATE_NOTUSED      = -7,  // component disabled
	INSTALLSTATE_BADCONFIG    = -6,  // configuration data corrupt
	INSTALLSTATE_INCOMPLETE   = -5,  // installation suspended or in progress
	INSTALLSTATE_SOURCEABSENT = -4,  // run from source, source is unavailable
	INSTALLSTATE_MOREDATA     = -3,  // return buffer overflow
	INSTALLSTATE_INVALIDARG   = -2,  // invalid function argument
	INSTALLSTATE_UNKNOWN      = -1,  // unrecognized product or feature
	INSTALLSTATE_BROKEN       =  0,  // broken
	INSTALLSTATE_ADVERTISED   =  1,  // advertised feature
	INSTALLSTATE_REMOVED      =  1,  // component being removed (action state, not settable)
	INSTALLSTATE_ABSENT       =  2,  // uninstalled (or action state absent but clients remain)
	INSTALLSTATE_LOCAL        =  3,  // installed on local drive
	INSTALLSTATE_SOURCE       =  4,  // run from source, CD or net
	INSTALLSTATE_DEFAULT      =  5,  // use default, local or source
} INSTALLSTATE;
any idea on how this should be converted to work with masm? thanks smurf
Posted on 2001-07-03 14:58:00 by smurf
Hi! Either turn that enum structure into single EQUs or make a regular STRUC from that enum. That's what i do when i have to handle enums. Bye! Latigo
Posted on 2001-07-03 16:30:00 by latigo
MASM doesn't suport ENUMs, it's a higher level hand-holding thing to prevent you from putting a bad constant somewhere. So you're stuck with good-ole equates. EnumName_ElementName is the usuale format:

INSTALLSTATE_NOTUSED        EQU -7, ; component disabled
INSTALLSTATE_BADCONFIG      EQU -6, ; configuration data corrupt
INSTALLSTATE_INCOMPLETE     EQU -5, ; installation suspended or in progress
INSTALLSTATE_SOURCEABSENT   EQU -4, ; run from source, source is unavailable
INSTALLSTATE_MOREDATA       EQU -3, ; return buffer overflow
INSTALLSTATE_INVALIDARG     EQU -2, ; invalid function argument
INSTALLSTATE_UNKNOWN        EQU -1, ; unrecognized product or feature
INSTALLSTATE_BROKEN         EQU 0,  ; broken
INSTALLSTATE_ADVERTISED     EQU 1,  ; advertised feature
INSTALLSTATE_REMOVED        EQU 1,  ; component being removed (action state, not settable)
INSTALLSTATE_ABSENT         EQU 2,  ; uninstalled (or action state absent but clients remain)
INSTALLSTATE_LOCAL          EQU 3,  ; installed on local drive
INSTALLSTATE_SOURCE         EQU 4,  ; run from source, CD or net
INSTALLSTATE_DEFAULT        EQU 5,  ; use default, local or source
Posted on 2001-07-03 18:45:00 by Ernie
I don't know for sure, but I think it's used to group a set of constants into a general 'group name'. Then you can use the group name as a data type, so VC knows that that data value has to be one of the enumerated constants. In masm we don't have/need such a thing so just convert it to seperate equs, like latigo said. Thomas
Posted on 2001-07-03 18:48:00 by Thomas
thanks for the help everyone. i have a few other lines of code i need help converting. first 2 lines are from within 2 different enum's in the header file. the last line isnt enclosed in anything.
INSTALLLOGMODE_FATALEXIT      = (1 << (INSTALLMESSAGE_FATALEXIT      >> 24))

INSTALLFEATUREATTRIBUTE_FAVORLOCAL             = 1 << 0

#define INSTALLPROPERTY_INSTALLEDPRODUCTNAME  __TEXT("InstalledProductName")
smurf This message was edited by smurf, on 7/3/2001 7:45:03 PM
Posted on 2001-07-03 19:11:00 by smurf