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.

59 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. routing\monitor2\shell\defs.h
  5. Abstract:
  6. Definitions for all files in the shell.
  7. Revision History:
  8. Anand Mahalingam 7/6/98 Created
  9. --*/
  10. #define is ==
  11. #define isnot !=
  12. #define or ||
  13. #define and &&
  14. #define MAX_CMD_LEN 8192 // total size of command line
  15. #define MAX_MSG_LENGTH 5120 // length of message in resource
  16. //
  17. // These are passed as arguments to the helper commit fn.
  18. // So, must have the same definition there too.
  19. //
  20. #define SHELL_ERROR_BASE 0xff00
  21. #define ERROR_STRING_TOO_LONG (SHELL_ERROR_BASE + 1)
  22. #define ERROR_MALLOC_FAILED (SHELL_ERROR_BASE + 2)
  23. #define ERROR_ALIAS_NOT_FOUND (SHELL_ERROR_BASE + 3)
  24. #define ERROR_ENTRY_FN_NOT_FOUND (SHELL_ERROR_BASE + 4)
  25. //
  26. // This again must be defined the same way in the helpers.
  27. //
  28. typedef
  29. DWORD
  30. (*PHELPER_ENTRY_FN)(
  31. IN LPCWSTR pwszRouter,
  32. IN LPCWSTR *pptcArguments,
  33. IN DWORD dwArgCount,
  34. OUT LPWSTR pwcNewContext
  35. );
  36. #define wctomb(wcs, str) \
  37. WideCharToMultiByte(GetConsoleOutputCP(), 0, (wcs), -1, (str), MAX_NAME_LEN, NULL, NULL)
  38. #define PRINTA(str) printf("%s\n", str)
  39. #define PRINT(wstr) wprintf(L"%s\n", wstr)
  40. #define PRINT1(wstr) wprintf(L"%s\n", L##wstr)
  41. #define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x))
  42. #define REALLOC(w,x) HeapReAlloc(GetProcessHeap(), 0, (w), (x))
  43. #define FREE(x) HeapFree(GetProcessHeap(), 0, (x))