MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2QueryAutoUserList

Function Ext2QueryAutoUserList

Ext2Mgr/enumDisk.cpp:5073–5111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5071}
5072
5073CHAR *Ext2QueryAutoUserList()
5074{
5075 int rc = TRUE;
5076 HKEY hKey;
5077 CHAR keyPath[MAX_PATH];
5078 CHAR *userList = NULL;
5079 LONG status, type, len;
5080
5081 /* Open ext2fsd sevice key */
5082 strcpy (keyPath, "SYSTEM\\CurrentControlSet\\Services\\Ext2Fsd\\Parameters") ;
5083 status = ::RegOpenKeyEx (HKEY_LOCAL_MACHINE,
5084 keyPath,
5085 0,
5086 KEY_ALL_ACCESS | KEY_WOW64_64KEY,
5087 &hKey) ;
5088 if (status != ERROR_SUCCESS) {
5089 rc = FALSE;
5090 goto errorout;
5091 }
5092
5093 /* query autorun user list */
5094 len = PAGE_SIZE - 1;
5095 userList = new CHAR[len + 1];
5096 if (!userList)
5097 goto errorout;
5098 memset(userList, 0, len + 1);
5099 status = RegQueryValueEx( hKey,
5100 "AutorunUsers",
5101 0,
5102 (LPDWORD)&type,
5103 (BYTE *)userList,
5104 (LPDWORD)&len);
5105
5106errorout:
5107
5108 RegCloseKey(hKey);
5109
5110 return userList;
5111}
5112
5113BOOL Ext2SetAutoRunUserList(CHAR *userList)
5114{

Callers 2

Ext2SetAppAutorunVistaFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected