Changeset 25959 in vbox
- Timestamp:
- Jan 21, 2010 2:02:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp
r25796 r25959 135 135 136 136 return SetServiceStatus(g_hWinServiceStatus, &ss); 137 } 138 139 140 int VBoxServiceWinSetDesc(SC_HANDLE hService) 141 { 142 /* On W2K+ there's ChangeServiceConfig2() which lets us set some fields 143 like a longer service description. */ 144 #ifndef TARGET_NT4 145 SERVICE_DESCRIPTION desc; 146 /** @todo On Vista+ SERVICE_DESCRIPTION also supports localized strings! */ 147 desc. lpDescription = VBOXSERVICE_DESCRIPTION; 148 if (FALSE == ChangeServiceConfig2(hService, 149 SERVICE_CONFIG_DESCRIPTION, /* Service info level */ 150 &desc)) 151 { 152 VBoxServiceError("Cannot set the service description! Error: %ld\n", GetLastError()); 153 return 1; 154 } 155 #endif 156 return VINF_SUCCESS; 137 157 } 138 158 … … 192 212 VBOXSERVICE_FRIENDLY_NAME)) 193 213 { 194 /* On W2K+ there's ChangeServiceConfig2() which lets us set some fields195 like a longer service description. */196 #ifndef TARGET_NT4197 SERVICE_DESCRIPTION desc;198 /** @todo On Vista+ SERVICE_DESCRIPTION also supports localized strings! */199 desc. lpDescription = VBOXSERVICE_DESCRIPTION;200 if (FALSE == ChangeServiceConfig2(hService,201 SERVICE_CONFIG_DESCRIPTION, /* Service info level */202 &desc))203 {204 VBoxServiceError("Cannot set the service description! Error: %ld\n", GetLastError());205 }206 #endif207 208 214 VBoxServiceVerbose(1, "The service config has been successfully updated.\n"); 209 215 } … … 227 233 VBoxServiceVerbose(0, "Service successfully installed!\n"); 228 234 } 235 236 if (RT_SUCCESS(rc)) 237 rc = VBoxServiceWinSetDesc(hService); 229 238 230 239 CloseServiceHandle(hService);
Note:
See TracChangeset
for help on using the changeset viewer.