VirtualBox

Ignore:
Timestamp:
Jul 6, 2009 11:24:43 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49569
Message:

VBoxService/common: Now works with NT4 as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxService-win.cpp

    r21230 r21246  
    262262}
    263263
     264#ifdef TARGET_NT4
     265VOID WINAPI VBoxServiceWinCtrlHandler (DWORD dwControl)
     266#else
    264267DWORD WINAPI VBoxServiceWinCtrlHandler (DWORD dwControl,
    265268                                        DWORD dwEventType,
    266269                                        LPVOID lpEventData,
    267270                                        LPVOID lpContext)
     271#endif
    268272{
    269273    DWORD rc = NO_ERROR;
    270274
    271     VBoxServiceVerbose(2, "Control handler: Control=%ld, EventType=%ld\n", dwControl, dwEventType);
     275    VBoxServiceVerbose(2, "Control handler: Control=%ld\n", dwControl);
     276#ifndef TARGET_NT4
     277    VBoxServiceVerbose(2, "Control handler: EventType=%ld\n", dwEventType);
     278#endif
     279
    272280    switch (dwControl)
    273281    {
     
    290298    case SERVICE_CONTROL_SESSIONCHANGE:     /* Only Win XP and up. */
    291299
     300#ifndef TARGET_NT4
    292301        switch (dwEventType)
    293302        {
    294 
    295303        /*case WTS_SESSION_LOGON:
    296304            VBoxServiceVerbose(2, "A user has logged on to the session.\n");
     
    300308            VBoxServiceVerbose(2, "A user has logged off from the session.\n");
    301309            break;*/
    302 
    303310        default:
    304311            break;
    305312        }
     313#endif /* TARGET_NT4 */
    306314        break;
    307315
     
    312320        break;
    313321    }
     322
     323#ifndef TARGET_NT4
    314324    return rc;
     325#endif
    315326}
    316327
     
    320331
    321332    VBoxServiceVerbose(2, "Registering service control handler ...\n");
     333#ifdef TARGET_NT4
     334    g_hWinServiceStatus = RegisterServiceCtrlHandler (VBOXSERVICE_NAME, VBoxServiceWinCtrlHandler);
     335#else
    322336    g_hWinServiceStatus = RegisterServiceCtrlHandlerEx (VBOXSERVICE_NAME, VBoxServiceWinCtrlHandler, NULL);
     337#endif
    323338
    324339    if (NULL == g_hWinServiceStatus)
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