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

Function Ext2RunMgrForCurrentUserVista

Ext2Mgr/enumDisk.cpp:5155–5192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5153
5154
5155BOOL Ext2RunMgrForCurrentUserVista()
5156{
5157 CHAR *userList = NULL, *user, e;
5158 CHAR userName[256] = {0};
5159 DWORD userLen = 255;
5160 BOOL rc = FALSE;
5161
5162 if (!GetUserName(userName, &userLen))
5163 return FALSE;
5164
5165 userList = Ext2QueryAutoUserList();
5166 if (!userList)
5167 return FALSE;
5168
5169 user = userList;
5170 while (user = Ext2StrStr(user, userName)) {
5171 if (user > userList) {
5172 e = user[-1];
5173 if (e != ',' && e != ';') {
5174 user = user + strlen(userName);
5175 continue;
5176 }
5177 }
5178 e = user[strlen(userName)];
5179 if (!e || e == ',' || e == ';') {
5180 rc = TRUE;
5181 goto errorout;
5182 }
5183 user = user + strlen(userName);
5184 }
5185
5186errorout:
5187
5188 if (userList)
5189 delete [] userList;
5190
5191 return rc;
5192}
5193
5194BOOL
5195Ext2SetAppAutorunVista(BOOL bAutorun)

Callers 1

Ext2RunMgrForCurrentUserFunction · 0.70

Calls 2

Ext2QueryAutoUserListFunction · 0.70
Ext2StrStrFunction · 0.70

Tested by

no test coverage detected