VirtualBox

Changeset 69728 in vbox for trunk


Ignore:
Timestamp:
Nov 17, 2017 7:30:54 PM (7 years ago)
Author:
vboxsync
Message:

VBoxProxyStub: Untested SDS code cleanups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/win/VBoxProxyStub.c

    r69727 r69728  
    23172317
    23182318
    2319 BOOL vbpsInstallWindowsService(const WCHAR *pwszVBoxDir, const WCHAR *pwszServiceModule, const WCHAR *pwszServiceName,
    2320                                const WCHAR *pwszServiceDisplayName, const WCHAR *pwszServiceDescription)
     2319/**
     2320 * Worker for installing a SCM service.
     2321 *
     2322 * @returns Success indicator.
     2323 * @param   pwszVBoxDir         The VirtualBox install directory (unicode),
     2324 *                              trailing slash.
     2325 * @param   pwszModule          The service module.
     2326 * @param   pwszServiceName     The service name.
     2327 * @param   pwszDisplayName     The service display name.
     2328 * @param   pwszDescription     The service description.
     2329 */
     2330static BOOL vbpsInstallWindowsService(const WCHAR *pwszVBoxDir, const WCHAR *pwszModule, const WCHAR *pwszServiceName,
     2331                                      const WCHAR *pwszDisplayName, const WCHAR *pwszDescription)
    23212332{
    23222333    BOOL fRet = vbpsIsInstalledWindowsService(pwszServiceName);
     
    23292340            rc = RTUtf16Cat(wszFilePath, RT_ELEMENTS(wszFilePath), pwszVBoxDir);
    23302341        if (RT_SUCCESS(rc))
    2331             rc = RTUtf16Cat(wszFilePath, RT_ELEMENTS(wszFilePath), pwszServiceModule);
     2342            rc = RTUtf16Cat(wszFilePath, RT_ELEMENTS(wszFilePath), pwszModule);
    23322343        if (RT_SUCCESS(rc))
    23332344            rc = RTUtf16CatAscii(wszFilePath, RT_ELEMENTS(wszFilePath), "\"");
     
    23372348            if (hSCM != NULL)
    23382349            {
    2339                 SC_HANDLE hService = CreateService(hSCM, pwszServiceName, pwszServiceDisplayName,
     2350                SC_HANDLE hService = CreateService(hSCM, pwszServiceName, pwszDisplayName,
    23402351                                                   SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS,
    23412352                                                   SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL,
     
    23442355                {
    23452356                    SERVICE_DESCRIPTION sd;
    2346                     sd.lpDescription = (WCHAR *)pwszServiceDescription;
     2357                    sd.lpDescription = (WCHAR *)pwszDescription;
    23472358                    if (ChangeServiceConfig2(hService, SERVICE_CONFIG_DESCRIPTION, &sd))
    23482359                        fRet = TRUE;
     
    23652376
    23662377
    2367 BOOL vbpsUninstallWindowsService(const WCHAR *pwszServiceName)
     2378/**
     2379 * Worker for uninstalling a SCM service.
     2380 *
     2381 * @returns Success indicator.
     2382 * @param   pwszServiceName The name of the SCM service.
     2383 */
     2384static BOOL vbpsUninstallWindowsService(const WCHAR *pwszServiceName)
    23682385{
    23692386    BOOL fRet = !vbpsIsInstalledWindowsService(pwszServiceName);
     
    24042421
    24052422
     2423/**
     2424 * Updates the VBoxSDS service with SCM.
     2425 *
     2426 * @param   pState              The registry modifier state.
     2427 * @param   pwszVBoxDir         The VirtualBox install directory (unicode),
     2428 *                              trailing slash.
     2429 */
    24062430static void vbpsUpdateVBoxSDSWindowsService(VBPSREGSTATE *pState, const WCHAR *pwszVBoxDir)
    24072431{
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette