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.

155 lines
3.8 KiB

  1. /* ----------------------------------------------------------------------
  2. Copyright (c) 1996, Microsoft Corporation
  3. All rights reserved
  4. mbftpch.h
  5. ---------------------------------------------------------------------- */
  6. #define _WINDOWS
  7. // System Include files
  8. #include <windows.h>
  9. #include <windowsx.h>
  10. #include <objbase.h>
  11. #include <commdlg.h>
  12. #include <shellapi.h>
  13. #include <time.h>
  14. // Oprah files
  15. #include <oprahcom.h>
  16. #include <confdbg.h>
  17. #include <cstring.hpp>
  18. // Local Include files
  19. #include <ConfDbg.h>
  20. #include <debspew.h>
  21. #include <confreg.h>
  22. // MBFT include files
  23. extern "C"
  24. {
  25. #include "t120.h"
  26. }
  27. #include <imcsapp.h>
  28. #include <igccapp.h>
  29. #include <imbft.h>
  30. #include <dllutil.h>
  31. #include "mbftdbg.h"
  32. #include "ms_util.h"
  33. #include "cntlist.h"
  34. const USHORT _MBFT_CONTROL_CHANNEL = 9;
  35. const USHORT _MBFT_DATA_CHANNEL = 10;
  36. const ULONG _iMBFT_PROSHARE_ALL_FILES = 0xFFFFFFFF;
  37. const UINT _iMBFT_DEFAULT_SESSION = _MBFT_CONTROL_CHANNEL; // 9
  38. const UINT _iMBFT_CREATE_NEW_SESSION = 0;
  39. const UINT _iMBFT_MAX_PATH = MAX_PATH; //Max chars in file pathname
  40. typedef enum
  41. {
  42. MBFT_STATIC_MODE,
  43. MBFT_MULTICAST_MODE,
  44. // MBFT_PRIVATE_MODE, // not used at all
  45. }
  46. MBFT_MODE;
  47. typedef enum
  48. {
  49. MBFT_PRIVATE_SEND_TYPE,
  50. MBFT_PRIVATE_RECV_TYPE,
  51. MBFT_BROADCAST_RECV_TYPE,
  52. }
  53. MBFT_SESSION_TYPE;
  54. // A list of the notification callbacks to the app
  55. typedef enum
  56. {
  57. iMBFT_FILE_OFFER,
  58. iMBFT_FILE_SEND_BEGIN,
  59. iMBFT_FILE_SEND_END,
  60. iMBFT_FILE_SEND_PROGRESS,
  61. iMBFT_FILE_RECEIVE_PROGRESS,
  62. iMBFT_FILE_RECEIVE_BEGIN,
  63. iMBFT_FILE_RECEIVE_END,
  64. }
  65. MBFT_NOTIFICATION;
  66. // Prototype of callback function that MBFT client apps must implement
  67. typedef void (CALLBACK * MBFTCALLBACK)(
  68. MBFT_NOTIFICATION eNotificationCode,
  69. WPARAM wParam, // error code if appropriate
  70. LPARAM lParam, // Ptr to struct with event info
  71. LPARAM lpCallerDefined); // Client defined - see MBFTInitialize
  72. // #define MAX_APP_KEY_SIZE 100
  73. #define MAX_APP_KEY_SIZE 16 // applet name
  74. // global strings that should not be localized
  75. #define MY_APP_STR "_MSCONFFT"
  76. #define PROSHARE_STRING "NetMeeting 1 MBFT"
  77. #define PROSHARE_FILE_END_STRING "NetMeeting 1 FileEnd"
  78. #define PROSHARE_CHANNEL_LEAVE_STRING "NetMeeting 1 ChannelLeave"
  79. #define DATA_CHANNEL_RESOURCE_ID "D0"
  80. // capabilities
  81. extern const GCCAppCap* g_aAppletCaps[4];
  82. extern const GCCNonCollCap* g_aAppletNonCollCaps[2];
  83. // applet session key
  84. extern GCCSessionKey g_AppletSessionKey;
  85. // work thread ID
  86. extern HINSTANCE g_hDllInst;
  87. extern DWORD g_dwWorkThreadID;
  88. extern CRITICAL_SECTION g_csWorkThread;
  89. extern TCHAR g_szMBFTWndClassName[32];
  90. LRESULT CALLBACK MBFTNotifyWndProc(HWND, UINT, WPARAM, LPARAM);
  91. #include "osshelp.hpp"
  92. #include "messages.hpp"
  93. #include "applet.hpp"
  94. #include "mbft.hpp"
  95. #include "mbftapi.hpp"
  96. #include "ftui.h"
  97. #include "ftldr.h"
  98. #include "t127pdus.h"
  99. #define GetFileNameFromPath ExtractFileName
  100. // from mbftsend.cpp
  101. VOID MbftInitDelay(void);
  102. #define ClearStruct(lpv) ZeroMemory((LPVOID) (lpv), sizeof(*(lpv)))
  103. // nPeerID is actually nUserID of file transfer
  104. typedef DWORD MEMBER_ID;
  105. #define MAKE_MEMBER_ID(nPeerID,nNodeID) MAKELONG((nPeerID), (nNodeID))
  106. #define GET_PEER_ID_FROM_MEMBER_ID(nMemberID) LOWORD((nMemberID))
  107. #define GET_NODE_ID_FROM_MEMBER_ID(nMemberID) HIWORD((nMemberID))
  108. extern ULONG g_nSendDisbandDelay;
  109. extern ULONG g_nChannelResponseDelay;
  110. extern BOOL g_fSendAllowed;
  111. extern BOOL g_fRecvAllowed;
  112. extern UINT_PTR g_cbMaxSendFileSize;
  113. extern BOOL g_fNoUI;
  114.