home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Multimedia Jumpstart 1.1a / CD_ROM.BIN / develpmt / source / hotspot / viewer / debug.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-05  |  1.0 KB  |  35 lines

  1. /**************************************************************************
  2.  *
  3.  *  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4.  *  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5.  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6.  *  PURPOSE.
  7.  *
  8.  *  Copyright (c) 1993  Microsoft Corporation.  All Rights Reserved.
  9.  * 
  10.  **************************************************************************/
  11. /*
  12.     debug.c:
  13.         DbgOut -- printf to the debug window
  14. */
  15. #include <windows.h>
  16. #include "hotspot.h"
  17.  
  18. /*
  19.     DbgOut -- uses wvsprintf to simulate printf but putting the output
  20.         into a string, then sends the string to the debug window with
  21.         OutputDebugString.
  22. */
  23. void cdecl DbgOut(LPSTR lpFormat, ...) 
  24. {
  25.     char buf[256];
  26.  
  27.     wvsprintf(buf, lpFormat, (LPSTR)(&lpFormat+1));
  28.     
  29.     /* NOTE: This REQUIRES DBWin to be running 
  30.        (but does not require the debug kernel).*/
  31.     
  32.     OutputDebugString(buf);
  33.     OutputDebugString("\r\n");
  34. }
  35.