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.

98 lines
3.4 KiB

  1. /* File: D:\WACKER\tdll\session.hh (Created: 01-Dec-1993)
  2. *
  3. * Copyright 1994 by Hilgraeve Inc. -- Monroe, MI
  4. * All rights reserved
  5. *
  6. * $Revision: 6 $
  7. * $Date: 5/29/02 2:17p $
  8. */
  9. #if !defined(FEATURES_H_INCLUDED)
  10. You really need to include the "features.h" file before "session.hh"
  11. #endif
  12. typedef struct stSessionData *HHSESSION;
  13. /* --- Data Structures --- */
  14. struct stSessionData
  15. {
  16. long lPrefix; // used to verify session handle
  17. HWND hwndSess; // handle of session window
  18. HWND hwndStatusbar; // handle of statusbar window
  19. HWND hwndToolbar; // handle of toolbar window
  20. HWND hwndTerm; // handle of terminal window
  21. HWND hwndSidebar; // handle of sidebar window
  22. CRITICAL_SECTION csSess; // for snychronizing access
  23. CRITICAL_SECTION csTimerMux; // for synchronizing access to the Timer Mux
  24. HTIMERMUX hTimerMux; // handle to multiplexed timers
  25. HUPDATE hUpdate; // update info from emulator.
  26. HEMU hEmu; // emulator handle.
  27. HCOM hCom; // handle to internal com driver
  28. HCLOOP hCLoop; // handle to com loop
  29. HCNCT hCnct; // handle to connection driver
  30. SF_HANDLE hSysFile; // system file handle
  31. HXFER hXferHdl; // transfer parameters
  32. HFILES hFilesHdl; // files and directory stuff
  33. HBACKSCRL hBackscrl; // backscroll handle
  34. HCAPTUREFILE hCaptFile; // capture file handle
  35. HPRINT hPrint; // print handle
  36. HTRANSLATE hTranslate; // character translation handle, mrw,3/1/95
  37. int nTimeout; // timeout value for error messages
  38. TCHAR achSessCmdLn[FNAME_LEN + 1]; // passed in last parameter of CreateWindow()
  39. BOOL fToolbarVisible; // is the toolbar visible ?
  40. BOOL fStatusbarVisible; // is the statusbar visible ?
  41. // Suspend variables used to "scroll lock" sessions
  42. //
  43. BOOL fSuspendScrlLck,
  44. fSuspendTermMarking,
  45. fSuspendTermLBtnDn,
  46. fSuspendTermCopy;
  47. BOOL fSound; // Turn on/off annoying sounds
  48. BOOL fExit; // Turn on/off exit upon disconnecting
  49. int nIconId; // resource ID for selected ICON, if any.
  50. HICON hIcon; // session icon, defaults to program icon.
  51. //HICON hLittleIcon; // small copy of previous icon, if available
  52. // Yes, we do need to keep the session name shadow!
  53. //
  54. TCHAR achSessName[FNAME_LEN + 1]; // name of session.
  55. TCHAR achOldSessName[FNAME_LEN + 1]; // shadow of the session name.
  56. BOOL fIsNewSession; // TRUE if new session being created.
  57. int iCmdLnDial; // Used to see how to dial
  58. #if defined(INCL_WINSOCK)
  59. int iTelnetPort; // To pass value entered as cmd ln URL
  60. #endif
  61. long lPostfix; // used to verify session handle
  62. // keep this the last item, please
  63. RECT rcSess; // Session window's rect.
  64. int iShowCmd; // Session window's show state.
  65. BOOL fAllowHostXfers; // Turn on/off the 'Allow host initiated file transfers' feature
  66. };
  67. #define PRE_MAGIC 0x12345678
  68. #define POST_MAGIC 0x09ABCDEF
  69. /* --- Function Prototypes --- */
  70. HHSESSION VerifySessionHandle(const HSESSION hSession);
  71. void hLock(const HHSESSION hhSess);
  72. void hUnLock(const HHSESSION hhSess);
  73. static void hLockTimerMux(const HHSESSION hhSess);
  74. static void hUnlockTimerMux(const HHSESSION hhSess);
  75. int sessInitializePrinterName(const HSESSION hSession);
  76. int sessCheckAndLoadCmdLn(const HSESSION hSession);
  77. int fTestOpenOldTrmFile(const HHSESSION hhSess, TCHAR *achName);