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.

88 lines
2.4 KiB

  1. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  2. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  3. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  4. // PARTICULAR PURPOSE.
  5. //
  6. // Copyright 1999 Microsoft Corporation. All Rights Reserved.
  7. //
  8. // FILE: OEMUD.H
  9. //
  10. //
  11. // PURPOSE: Define common data types, and external function prototypes
  12. // for OEMUD Test Module.
  13. //
  14. // PLATFORMS:
  15. // Windows NT 5.0
  16. //
  17. //
  18. #ifndef _OEMUD_H
  19. #define _OEMUD_H
  20. #include <lib.h>
  21. #include <PRINTOEM.H>
  22. ////////////////////////////////////////////////////////
  23. // OEM UD Defines
  24. ////////////////////////////////////////////////////////
  25. #define VALID_PDEVOBJ(pdevobj) \
  26. ((pdevobj) && (pdevobj)->dwSize >= sizeof(DEVOBJ) && \
  27. (pdevobj)->hEngine && (pdevobj)->hPrinter && \
  28. (pdevobj)->pPublicDM && (pdevobj)->pDrvProcs )
  29. //
  30. // ASSERT_VALID_PDEVOBJ can be used to verify the passed in "pdevobj". However,
  31. // it does NOT check "pdevOEM" and "pOEMDM" fields since not all OEM DLL's create
  32. // their own pdevice structure or need their own private devmode. If a particular
  33. // OEM DLL does need them, additional checks should be added. For example, if
  34. // an OEM DLL needs a private pdevice structure, then it should use
  35. // ASSERT(VALID_PDEVOBJ(pdevobj) && pdevobj->pdevOEM && ...)
  36. //
  37. #define ASSERT_VALID_PDEVOBJ(pdevobj) ASSERT(VALID_PDEVOBJ(pdevobj))
  38. // Debug text.
  39. #define ERRORTEXT(s) __TEXT("ERROR ") DLLTEXT(s)
  40. #if 0
  41. ////////////////////////////////////////////////////////
  42. // OEM UD Type Defines
  43. ////////////////////////////////////////////////////////
  44. #define TESTSTRING "This is a Unidrv KM test."
  45. typedef struct tag_OEMUD_EXTRADATA {
  46. OEM_DMEXTRAHEADER dmExtraHdr;
  47. BYTE cbTestString[sizeof(TESTSTRING)];
  48. } OEMUD_EXTRADATA, *POEMUD_EXTRADATA;
  49. #endif // 0
  50. ////////////////////////////////////////////////////////
  51. // OEM UD Prototypes
  52. ////////////////////////////////////////////////////////
  53. #if DBG // For Check Build
  54. #define OEMDBGP(msg) DbgPrint msg;
  55. #ifndef USERMODE_DRIVER
  56. VOID DbgPrint(IN LPCTSTR pstrFormat, ...);
  57. #else
  58. extern ULONG _cdecl DbgPrint(PCSTR, ...);
  59. #endif //USERMODE_DRIVER
  60. #else // Free Build
  61. #define OEMDBGP(msg)
  62. #endif //DBG
  63. #endif