Sample Code

windows driver samples/ WDF Hybrid 1394 Virtual Device Sample Driver/ C++/ exe/ debug.c/

/*++

Copyright (c) 1998  Microsoft Corporation

Module Name: 

    debug.c
--*/

#define _DEBUG_C
#include "pch.h"
#undef _DEBUG_C

void 
DbgPrt(
    _In_ HANDLE   hWnd,
    _In_ PSTR     lpszFormat,
    ... 
    )
{
    char    buf[STRING_SIZE] = {"\0"}; // = "WIN1394: ";
    HRESULT hr = S_OK; 

    va_list ap;

    va_start(ap, lpszFormat);

    hr = StringCbVPrintf( &buf[0] , (STRING_SIZE * sizeof(buf[0])) , lpszFormat, ap);
    if (FAILED(hr))
    {
        // not much we can do here for logging, but we shouldn't try to send
        // the results of a failure down to the output streams.
        return;
    }

#if defined(DBG)
    OutputDebugStringA(buf);
#endif

    if (hWnd)
        WriteTextToEditControl(hWnd, buf);

    va_end(ap);
}


Our Services

  • What our customers say about us?

© 2011-2025 All Rights Reserved. Joya Systems. 4425 South Mopac Building II Suite 101 Austin, TX 78735 Tel: 800-DEV-KERNEL

Privacy Policy. Terms of use. Valid XHTML & CSS