ListGetType Example
InstallShield 2025 » InstallScript Language Reference
Note:The list identified by listID must already have been initialized by a call to ListCreate<LangrefListCreate.htm>.
//Sample code
LIST listID;
int nType;
program
listID = ListCreate(STRINGLIST);
if (LIST_NULL != listID) then
nType = ListGetType(listID);
if (STRINGLIST = nType) then
MessageBox("It is a STRINGLIST", INFORMATION);
else
MessageBox("It is a NUMBERLIST", INFORMATION);
endif;
endif;
ListDestroy(listID);
listID = ListCreate(NUMBERLIST);
if (LIST_NULL != listID) then
nType = ListGetType(listID);
if (STRINGLIST = nType) then
MessageBox("It is a STRINGLIST", INFORMATION);
else
MessageBox("It is a NUMBERLIST", INFORMATION);
endif;
endif;
ListDestroy(listID);
endprogram