Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.4 KiB

  1. /******************************************************************************
  2. winx.h
  3. Windows utility procedures
  4. Copyright (C) Microsoft Corporation, 1997 - 1997
  5. All rights reserved
  6. Notes:
  7. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  8. KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  9. IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  10. PURPOSE.
  11. ******************************************************************************/
  12. // macros
  13. #define RANDBYTE(r) LOBYTE(rand() % ((r)+1))
  14. #ifdef _DEBUG
  15. #define TRAP { _asm int 3 }
  16. #else
  17. #define TRAP {}
  18. #endif
  19. // stringtables
  20. typedef struct _STRINGTABLE
  21. {
  22. long number;
  23. char *szString;
  24. long end;
  25. } STRINGTABLE, *PSTRINGTABLE;
  26. /*
  27. STRINGTABLE StSample[] =
  28. {
  29. 0, "String zero",0,
  30. 1, "String one",0,
  31. 0, "",-1
  32. };
  33. Retrieve strings associated with unique values:
  34. strString = StrFromTable(nValue,&StSample);
  35. */
  36. extern STRINGTABLE StWinerror[];
  37. // prototypes
  38. ULONG atox(LPSTR);
  39. void DisplayDebug(LPSTR sz,...);
  40. BOOL ErrorMsg(HWND,LPSTR,LPSTR,BOOL);
  41. BOOL fDialog(int,HWND,FARPROC);
  42. void FormatHex(unsigned char *,char *);
  43. BOOL GetFinalWindow (HANDLE,LPRECT,LPSTR,LPSTR);
  44. BOOL LastError(BOOL);
  45. int NextToken(char *,char *);
  46. BOOL SaveFinalWindow (HANDLE,HWND,LPSTR,LPSTR);
  47. char * StrFromTable(long,PSTRINGTABLE);
  48. BOOL Wait32(DWORD);