VirtualBox

Ignore:
Timestamp:
Jul 20, 2007 2:03:12 PM (17 years ago)
Author:
vboxsync
Message:

Log string now go to the host.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxService/VBoxService.cpp

    r3587 r3737  
    4242void SvcDebugOut2(char *String, ...)
    4343{
    44    va_list va;
    45 
    46    va_start(va, String);
    47 
    48    CHAR  Buffer[1024];
    49    if (strlen(String) < 1000)
    50    {
    51       vsprintf (Buffer, String, va);
    52 
    53       OutputDebugStringA(Buffer);
    54 
    55 #ifdef DEBUG_DISPLAY_CHANGE
    56       FILE *f = fopen ("vboxservice.log", "ab");
    57       if (f)
    58       {
    59           fprintf (f, "%s", Buffer);
    60           fclose (f);
    61       }
    62 #endif /* DEBUG_DISPLAY_CHANGE */
    63    }
    64 
    65    SetLastError (0);
    66 
    67    va_end (va);
     44    DWORD cbReturned;
     45    CHAR Buffer[1024];
     46    VMMDevReqLogString *pReq = (VMMDevReqLogString *)Buffer;
     47
     48    va_list va;
     49
     50    va_start(va, String);
     51
     52    vmmdevInitRequest(&pReq->header, VMMDevReq_LogString);
     53    vsprintf(pReq->szString, String, va);
     54    pReq->header.size += strlen(pReq->szString);
     55
     56    DeviceIoControl(gVBoxDriver, IOCTL_VBOXGUEST_VMMREQUEST, pReq, pReq->header.size,
     57                    pReq, pReq->header.size, &cbReturned, NULL);
     58
     59    va_end (va);
     60    return;
    6861}
     62
    6963
    7064/**
     
    912906    return 0;
    913907}
     908
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