Changeset 64291 in vbox for trunk/src/VBox/Additions/WINNT/VBoxTray
- Timestamp:
- Oct 17, 2016 10:17:49 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 111313
- Location:
- trunk/src/VBox/Additions/WINNT/VBoxTray
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxIPC.cpp
r64285 r64291 175 175 } 176 176 177 178 177 /** 179 178 * Initializes the IPC communication. … … 196 195 if (RT_SUCCESS(rc)) 197 196 { 198 char szUserName[512]; 197 char szPipeName[512 + sizeof(VBOXTRAY_IPC_PIPE_PREFIX)]; 198 strcpy(szPipeName, VBOXTRAY_IPC_PIPE_PREFIX); 199 199 rc = RTProcQueryUsername(NIL_RTPROCESS, 200 szUserName,201 sizeof(sz UserName),200 &szPipeName[sizeof(VBOXTRAY_IPC_PIPE_PREFIX) - 1], 201 sizeof(szPipeName) - sizeof(VBOXTRAY_IPC_PIPE_PREFIX) + 1, 202 202 NULL /*pcbUser*/); 203 203 if (RT_SUCCESS(rc)) 204 204 { 205 char szPipeName[80]; 206 size_t cbPipeName = sizeof(szPipeName); 207 rc = RTLocalIpcMakeNameUniqueUser(VBOXTRAY_IPC_PIPE_PREFIX, szUserName, szPipeName, &cbPipeName); 205 rc = RTLocalIpcServerCreate(&pCtx->hServer, szPipeName, 0 /*fFlags*/); 208 206 if (RT_SUCCESS(rc)) 209 207 { 210 211 rc = RTLocalIpcServerCreate(&pCtx->hServer, szPipeName, 0 /*fFlags*/); 212 if (RT_SUCCESS(rc)) 213 { 214 pCtx->pEnv = pEnv; 215 RTListInit(&pCtx->SessionList); 216 217 *ppInstance = pCtx; 218 219 /* GetLastInputInfo only is available starting at Windows 2000 -- might fail. */ 220 g_pfnGetLastInputInfo = (PFNGETLASTINPUTINFO) 221 RTLdrGetSystemSymbol("User32.dll", "GetLastInputInfo"); 222 223 LogRelFunc(("Local IPC server now running at \"%s\"\n", szPipeName)); 224 return VINF_SUCCESS; 225 } 226 227 } 208 pCtx->pEnv = pEnv; 209 RTListInit(&pCtx->SessionList); 210 211 *ppInstance = pCtx; 212 213 /* GetLastInputInfo only is available starting at Windows 2000 -- might fail. */ 214 g_pfnGetLastInputInfo = (PFNGETLASTINPUTINFO) 215 RTLdrGetSystemSymbol("User32.dll", "GetLastInputInfo"); 216 217 LogRelFunc(("Local IPC server now running at \"%s\"\n", szPipeName)); 218 return VINF_SUCCESS; 219 } 220 228 221 } 229 222 -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp
r64285 r64291 308 308 LogRel(("Failed to initialize service '%s', rc=%Rrc\n", pSvc->pDesc->pszName, rc2)); 309 309 if (rc2 == VERR_NOT_SUPPORTED) 310 { 310 311 LogRel(("Service '%s' is not supported on this system\n", pSvc->pDesc->pszName)); 311 rc2 = VINF_SUCCESS; 312 rc2 = VINF_SUCCESS; 313 } 312 314 /* Keep going. */ 313 315 }
Note:
See TracChangeset
for help on using the changeset viewer.