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.

60 lines
1.9 KiB

  1. /***************************************************************************
  2. FILE globals.cpp
  3. MODULE Printers ISAPI DLL
  4. PURPOSE Windows HTML printer UI over WWW/HTTP
  5. DESCRIBED IN
  6. HISTORY 01/16/96 eriksn Created based on ISAPI sample DLL
  7. 03/05/97 weihaic More feature added
  8. ****************************************************************************/
  9. #include "pch.h"
  10. #include "printers.h"
  11. // Global Variables; once per process
  12. // Critical section for job spooling info
  13. CRITICAL_SECTION SplCritSect = {0, 0, 0, 0, 0, 0};
  14. // Critical section for maintaining the loaded tag processor list
  15. CRITICAL_SECTION TagCritSect = {0, 0, 0, 0, 0, 0};
  16. // Debugging Environment (SPLLIB).
  17. //
  18. #ifdef DEBUG
  19. MODULE_DEBUG_INIT(DBG_ERROR | DBG_WARN | DBG_TRACE, DBG_ERROR);
  20. #else
  21. MODULE_DEBUG_INIT(DBG_ERROR | DBG_WARN | DBG_TRACE, 0);
  22. #endif
  23. // Query map relates a query string to what it does.
  24. const QUERY_MAP rgQueryMap[] =
  25. {
  26. TEXT ("IPP"), CMD_IPP,
  27. TEXT ("CreateExe"), CMD_CreateExe,
  28. };
  29. const int iNumQueryMap = ARRAY_COUNT(rgQueryMap);
  30. //
  31. // g_szHttpServerName is the server name in HTTP request
  32. //
  33. TCHAR g_szHttpServerName[INTERNET_MAX_HOST_NAME_LENGTH + 1];
  34. //
  35. // g_szPrintServerName is the server name used in OpenPrinter
  36. // If the web server is behind a firewall the PrintServerName
  37. // will be different from HttpServerName because the public network
  38. // address is different from the private network address
  39. //
  40. TCHAR g_szPrintServerName[INTERNET_MAX_HOST_NAME_LENGTH + 1];
  41. HINSTANCE g_hInstance = NULL;
  42. // TEXT ("PrintersFolder") is not a localizable string
  43. LPTSTR g_szPrintersFolder = TEXT ("PrintersFolder");
  44. LPTSTR g_szPrinters = TEXT ("Printers");
  45. LPTSTR g_szRemotePortAdmin = TEXT ("RemotePortAdmin");