00001 #pragma once
00002
00003 using namespace AppSecInc::Msi::Flags;
00004
00005 static const FlagMapEntry s_TcpSocketTypeFlags[] =
00006 {
00007 { L"SOCK_STREAM", SOCK_STREAM },
00008 { L"SOCK_DGRAM", SOCK_DGRAM },
00009 { L"SOCK_RAW", SOCK_RAW },
00010 { L"SOCK_RDM", SOCK_RDM },
00011 { L"SOCK_SEQPACKET", SOCK_SEQPACKET },
00012 };
00013
00014 static const FlagMapEntry s_IpProtocolFlags[] =
00015 {
00016 { L"IPPROTO_TCP", IPPROTO_TCP },
00017 { L"IPPROTO_UDP", IPPROTO_UDP }
00018 };
00019
00020 typedef struct
00021 {
00022 LPCWSTR name;
00023 HKEY value;
00024 } FlagMapEntryHKEY;
00025
00026 static const FlagMapEntryHKEY s_RegistryRoot[] =
00027 {
00028 { L"HKEY_LOCAL_MACHINE", HKEY_LOCAL_MACHINE },
00029 { L"HKEY_CURRENT_USER", HKEY_CURRENT_USER },
00030 { L"HKEY_CURRENT_CONFIG", HKEY_CURRENT_CONFIG },
00031 { L"HKEY_CLASSES_ROOT", HKEY_CLASSES_ROOT },
00032 { L"HKEY_USERS", HKEY_USERS }
00033 };
00034
00035 static const FlagMapEntry s_ServiceControl[] =
00036 {
00037 { L"SERVICE_CONTROL_START", SERVICE_CONTROL_START },
00038 { L"SERVICE_CONTROL_STOP", SERVICE_CONTROL_STOP },
00039 { L"SERVICE_CONTROL_PAUSE", SERVICE_CONTROL_PAUSE },
00040 { L"SERVICE_CONTROL_CONTINUE", SERVICE_CONTROL_CONTINUE },
00041 };
00042
00043 static const FlagMapEntry s_ServiceType[] =
00044 {
00045 { L"SERVICE_FILE_SYSTEM_DRIVER", SERVICE_FILE_SYSTEM_DRIVER },
00046 { L"SERVICE_KERNEL_DRIVER", SERVICE_KERNEL_DRIVER },
00047 { L"SERVICE_WIN32_OWN_PROCESS", SERVICE_WIN32_OWN_PROCESS },
00048 { L"SERVICE_WIN32_SHARE_PROCESS", SERVICE_WIN32_SHARE_PROCESS },
00049 { L"SERVICE_INTERACTIVE_PROCESS", SERVICE_INTERACTIVE_PROCESS },
00050 };
00051
00052 static const FlagMapEntry s_ServiceStartType[] =
00053 {
00054 { L"SERVICE_AUTO_START", SERVICE_AUTO_START },
00055 { L"SERVICE_BOOT_START", SERVICE_BOOT_START },
00056 { L"SERVICE_DEMAND_START", SERVICE_DEMAND_START },
00057 { L"SERVICE_DISABLED", SERVICE_DISABLED },
00058 { L"SERVICE_SYSTEM_START", SERVICE_SYSTEM_START },
00059 };
00060
00061 static const FlagMapEntry s_ServiceErrorControl[] =
00062 {
00063 { L"SERVICE_ERROR_IGNORE", SERVICE_ERROR_IGNORE },
00064 { L"SERVICE_ERROR_NORMAL", SERVICE_ERROR_NORMAL },
00065 { L"SERVICE_ERROR_SEVERE", SERVICE_ERROR_SEVERE },
00066 { L"SERVICE_ERROR_CRITICAL", SERVICE_ERROR_CRITICAL },
00067 };
00068
00069 typedef struct
00070 {
00071 LPCWSTR name;
00072 int value;
00073 } FlagMapEntryCSIDL;
00074
00075 static const FlagMapEntryCSIDL s_CSIDL[] =
00076 {
00077 { L"CSIDL_ADMINTOOLS", CSIDL_ADMINTOOLS },
00078 { L"CSIDL_DESKTOP", CSIDL_DESKTOP },
00079 { L"CSIDL_INTERNET", CSIDL_INTERNET },
00080 { L"CSIDL_PROGRAMS", CSIDL_PROGRAMS },
00081 { L"CSIDL_CONTROLS", CSIDL_CONTROLS },
00082 { L"CSIDL_PRINTERS", CSIDL_PRINTERS },
00083 { L"CSIDL_PERSONAL", CSIDL_PERSONAL},
00084 { L"CSIDL_FAVORITES", CSIDL_FAVORITES },
00085 { L"CSIDL_STARTUP", CSIDL_STARTUP },
00086 { L"CSIDL_RECENT", CSIDL_RECENT },
00087 { L"CSIDL_SENDTO", CSIDL_SENDTO },
00088 { L"CSIDL_BITBUCKET", CSIDL_BITBUCKET},
00089 { L"CSIDL_STARTMENU", CSIDL_STARTMENU },
00090 { L"CSIDL_MYDOCUMENTS", CSIDL_MYDOCUMENTS },
00091 { L"CSIDL_MYMUSIC", CSIDL_MYMUSIC },
00092 { L"CSIDL_MYVIDEO", CSIDL_MYVIDEO },
00093 { L"CSIDL_DESKTOPDIRECTORY", CSIDL_DESKTOPDIRECTORY },
00094 { L"CSIDL_DRIVES", CSIDL_DRIVES },
00095 { L"CSIDL_NETWORK", CSIDL_NETWORK },
00096 { L"CSIDL_NETHOOD", CSIDL_NETHOOD },
00097 { L"CSIDL_FONTS", CSIDL_FONTS },
00098 { L"CSIDL_TEMPLATES", CSIDL_TEMPLATES },
00099 { L"CSIDL_COMMON_STARTMENU", CSIDL_COMMON_STARTMENU },
00100 { L"CSIDL_COMMON_PROGRAMS", CSIDL_COMMON_PROGRAMS },
00101 { L"CSIDL_COMMON_STARTUP", CSIDL_COMMON_STARTUP },
00102 { L"CSIDL_COMMON_DESKTOPDIRECTORY", CSIDL_COMMON_DESKTOPDIRECTORY },
00103 { L"CSIDL_APPDATA", CSIDL_APPDATA },
00104 { L"CSIDL_PRINTHOOD", CSIDL_PRINTHOOD },
00105 { L"CSIDL_LOCAL_APPDATA", CSIDL_LOCAL_APPDATA },
00106 { L"CSIDL_ALTSTARTUP", CSIDL_ALTSTARTUP },
00107 { L"CSIDL_COMMON_ALTSTARTUP", CSIDL_COMMON_ALTSTARTUP },
00108 { L"CSIDL_COMMON_FAVORITES", CSIDL_COMMON_FAVORITES },
00109 { L"CSIDL_INTERNET_CACHE", CSIDL_INTERNET_CACHE },
00110 { L"CSIDL_COOKIES", CSIDL_COOKIES },
00111 { L"CSIDL_HISTORY", CSIDL_HISTORY },
00112 { L"CSIDL_COMMON_APPDATA", CSIDL_COMMON_APPDATA },
00113 { L"CSIDL_WINDOWS", CSIDL_WINDOWS },
00114 { L"CSIDL_SYSTEM", CSIDL_SYSTEM },
00115 { L"CSIDL_PROGRAM_FILES", CSIDL_PROGRAM_FILES },
00116 { L"CSIDL_MYPICTURES", CSIDL_MYPICTURES },
00117 { L"CSIDL_PROFILE", CSIDL_PROFILE },
00118 { L"CSIDL_SYSTEMX86", CSIDL_SYSTEMX86 },
00119 { L"CSIDL_PROGRAM_FILESX86", CSIDL_PROGRAM_FILESX86 },
00120 { L"CSIDL_PROGRAM_FILES_COMMON", CSIDL_PROGRAM_FILES_COMMON },
00121 { L"CSIDL_PROGRAM_FILES_COMMONX86", CSIDL_PROGRAM_FILES_COMMONX86 },
00122 { L"CSIDL_COMMON_TEMPLATES", CSIDL_COMMON_TEMPLATES },
00123 { L"CSIDL_COMMON_DOCUMENTS", CSIDL_COMMON_DOCUMENTS },
00124 { L"CSIDL_COMMON_ADMINTOOLS", CSIDL_COMMON_ADMINTOOLS },
00125 { L"CSIDL_ADMINTOOLS", CSIDL_ADMINTOOLS },
00126 { L"CSIDL_CONNECTIONS", CSIDL_CONNECTIONS },
00127 { L"CSIDL_COMMON_MUSIC", CSIDL_COMMON_MUSIC },
00128 { L"CSIDL_COMMON_PICTURES", CSIDL_COMMON_PICTURES },
00129 { L"CSIDL_COMMON_VIDEO", CSIDL_COMMON_VIDEO },
00130 { L"CSIDL_RESOURCES", CSIDL_RESOURCES },
00131 { L"CSIDL_RESOURCES_LOCALIZED", CSIDL_RESOURCES_LOCALIZED },
00132 { L"CSIDL_COMMON_OEM_LINKS", CSIDL_COMMON_OEM_LINKS },
00133 { L"CSIDL_CDBURN_AREA", CSIDL_CDBURN_AREA },
00134 { L"CSIDL_COMPUTERSNEARME", CSIDL_COMPUTERSNEARME },
00135 };