| 1 | /* $Id: ntdll.cpp,v 1.3 1999-11-09 09:30:20 phaller Exp $ */ | 
|---|
| 2 |  | 
|---|
| 3 | /* | 
|---|
| 4 | * | 
|---|
| 5 | * Project Odin Software License can be found in LICENSE.TXT | 
|---|
| 6 | * Win32 NT Runtime / NTDLL for OS/2 | 
|---|
| 7 | * | 
|---|
| 8 | * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net) | 
|---|
| 9 | * | 
|---|
| 10 | * @(#) ntdll.cpp  1.0.1   1999/05/08 SvL: Changes for compilation with Wine headers | 
|---|
| 11 | *                 1.0.0   1998/05/20 PH Start from WINE/NTDLL.C | 
|---|
| 12 | * | 
|---|
| 13 | * NT basis DLL | 
|---|
| 14 | * | 
|---|
| 15 | * Copyright 1996 Marcus Meissner | 
|---|
| 16 | * Copyright 1998 Patrick Haller (adapted for win32os2) | 
|---|
| 17 | */ | 
|---|
| 18 |  | 
|---|
| 19 | /* Changes to the original NTDLL.C from the WINE project | 
|---|
| 20 |  | 
|---|
| 21 | - includes replaced by the win32os2 standard includes | 
|---|
| 22 | - replaced WINAPI by WIN32API | 
|---|
| 23 | - moved in some string functions | 
|---|
| 24 | - replaced HANDLE32 by HANDLE | 
|---|
| 25 | - lstrlen32A -> OS2lstrlenA | 
|---|
| 26 | - lstrlen32W -> OS2lstrlenW | 
|---|
| 27 | */ | 
|---|
| 28 |  | 
|---|
| 29 | /***************************************************************************** | 
|---|
| 30 | * Includes                                                                  * | 
|---|
| 31 | *****************************************************************************/ | 
|---|
| 32 |  | 
|---|
| 33 | #include <os2win.h> | 
|---|
| 34 | #include <winnt.h> | 
|---|
| 35 | #include <ntdef.h> | 
|---|
| 36 | #include <builtin.h> | 
|---|
| 37 | #include <stdlib.h> | 
|---|
| 38 | #include <string.h> | 
|---|
| 39 | #include <ctype.h> | 
|---|
| 40 | #include "misc.h" | 
|---|
| 41 | #include "unicode.h" | 
|---|
| 42 |  | 
|---|
| 43 | #include "ntdll.h" | 
|---|
| 44 |  | 
|---|
| 45 |  | 
|---|
| 46 | /***************************************************************************** | 
|---|
| 47 | * Types & Defines                                                           * | 
|---|
| 48 | *****************************************************************************/ | 
|---|
| 49 |  | 
|---|
| 50 | #define NTSTATUS DWORD | 
|---|
| 51 |  | 
|---|
| 52 |  | 
|---|
| 53 | /***************************************************************************** | 
|---|
| 54 | * Name      : DbgPrint | 
|---|
| 55 | * Purpose   : print a debug line to somewhere? | 
|---|
| 56 | * Parameters: | 
|---|
| 57 | * Variables : | 
|---|
| 58 | * Result    : | 
|---|
| 59 | * Remark    : NTDLL.21 | 
|---|
| 60 | * Status    : UNTESTED STUB | 
|---|
| 61 | * | 
|---|
| 62 | * Author    : Patrick Haller [Tue, 1999/06/01 09:00] | 
|---|
| 63 | *****************************************************************************/ | 
|---|
| 64 | void __cdecl DbgPrint(LPCSTR lpcstrFormat,LPVOID args) | 
|---|
| 65 | { | 
|---|
| 66 | UCHAR   szBuffer[600]; // as in original NTDLL.DLL | 
|---|
| 67 | int     rc; | 
|---|
| 68 |  | 
|---|
| 69 | rc = wvsnprintfA((LPSTR)szBuffer, | 
|---|
| 70 | sizeof(szBuffer), | 
|---|
| 71 | lpcstrFormat, | 
|---|
| 72 | (va_list)args); | 
|---|
| 73 |  | 
|---|
| 74 | dprintf(("NTDLL: DbgPrint[%s]\n", | 
|---|
| 75 | szBuffer)); | 
|---|
| 76 |  | 
|---|
| 77 | //@@@PH raise debug exception if running in debugger | 
|---|
| 78 | } | 
|---|