home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / workshop / prog / msconf / confsdk.exe / MSCONF.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-23  |  9.0 KB  |  255 lines

  1. /* Copyright (c) 1995-1996, Microsoft Corporation, all rights reserved
  2. **
  3. ** msconf.h
  4. **
  5. ** Microsoft ActiveX Conferencing SDK
  6. ** Version 1.0.  Beta 1
  7. ** Unpublished work.
  8. **
  9. ** Public header for external API clients
  10. */
  11.  
  12. #ifndef _MSCONF_H_
  13. #define _MSCONF_H_
  14.  
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18.  
  19. #define CONF_VERSION            0x0001
  20.  
  21.  
  22. // String constants
  23. #define CONF_MAX_USERNAME        64
  24. #define CONF_MAX_CONFERENCENAME 128
  25.  
  26.  
  27. /* Error constants
  28. */
  29.  
  30. #define CONFERR_BASE                   0x09000L
  31.  
  32. #define CONFERR_INVALID_PARAMETER      (CONFERR_BASE + 1)
  33. #define CONFERR_INVALID_HCONF          (CONFERR_BASE + 2)
  34. #define CONFERR_INVALID_BUFFER         (CONFERR_BASE + 3)
  35. #define CONFERR_BUFFER_TOO_SMALL       (CONFERR_BASE + 4)
  36. #define CONFERR_ENUM_COMPLETE          (CONFERR_BASE + 5)
  37.  
  38. // File Transfer error codes
  39. #define CONFERR_FILE_TRANSFER          (CONFERR_BASE + 10)
  40. #define CONFERR_FILE_SEND_ABORT        (CONFERR_BASE + 11)
  41. #define CONFERR_FILE_RECEIVE_ABORT     (CONFERR_BASE + 12)
  42.  
  43. // Overloaded Error Codes
  44. #define CONFERR_OUT_OF_MEMORY          ERROR_NOT_ENOUGH_MEMORY
  45. #define CONFERR_FILE_NOT_FOUND         ERROR_FILE_NOT_FOUND
  46. #define CONFERR_PATH_NOT_FOUND         ERROR_PATH_NOT_FOUND
  47. #define CONFERR_ACCESS_DENIED          ERROR_ACCESS_DENIED
  48. #define CONFERR_RECEIVE_DIR            ERROR_DISK_FULL
  49.  
  50. #define CONFERR_SUCCESS                0
  51.  
  52. typedef DWORD CONFERR;
  53.  
  54.  
  55. /* Main conferencing identifier
  56. */
  57. typedef HANDLE HCONF;
  58.  
  59.  
  60. /* Notification Callback
  61. */
  62. typedef LONG (CALLBACK* CONFNOTIFYPROC)(HCONF, DWORD, DWORD, LPVOID, LPVOID);
  63.  
  64.  
  65.  
  66. /* Describes a conference connection address
  67. */
  68. typedef struct tagConfAddr {
  69.     DWORD dwSize;                    // size of this structure, in bytes
  70.     DWORD dwAddrType;                // type of address that follows
  71.     union {
  72.         DWORD dwIp;              // IP Address (a.b.c.d)
  73.         PTSTR psz;               // pointer to a null terminated string
  74.         };
  75. } CONFADDR;
  76. typedef CONFADDR * LPCONFADDR;
  77.  
  78. // CONFADDR dwAddrType values
  79. #define CONF_ADDR_UNKNOWN      0x0000 // address type is not known
  80. #define CONF_ADDR_IP           0x0001 // use dwIp as a binary IP address
  81. #define CONF_ADDR_MACHINENAME  0x0002 // use sz as a local machine name
  82. #define CONF_ADDR_PSTN         0x0003 // use sz as a TAPI canonical telephone number
  83.  
  84.  
  85. /* Describes a destination within a conference
  86. */
  87. typedef struct tagConfDest {
  88.     DWORD dwSize;                   // size of this structure, in bytes
  89.     DWORD dwFlags;                  // Destination flags (CONF_DF_xxx)
  90.     DWORD dwUserId;                 // unique user identifier
  91.     GUID  guid;                     // globally unique application identifier
  92. } CONFDEST;
  93. typedef CONFDEST * LPCONFDEST;
  94.  
  95. // CONFDEST dwFlags
  96. #define CONF_DF_BROADCAST      0x0100 // data was broadcast to everyone
  97. #define CONF_DF_PRIVATE        0x0200 // data was private
  98.  
  99.  
  100. /* Describes the conference settings
  101. */
  102. typedef struct tagConfInfo {
  103.     DWORD dwSize;                   // size of this structure, in bytes
  104.     DWORD dwFlags;                  // Conference options (CONF_IF_xxx)
  105.     DWORD dwMediaType;              // Media Type (CONF_MT_xxx)
  106.     DWORD dwGCCID;
  107.     HCONF hConf;                    // Conference Handle
  108.     DWORD cUsers;                   // number of participants in the conference
  109.     CONFNOTIFYPROC pfnNotifyProc;   // Notification call-back 
  110.     TCHAR szConferenceName[CONF_MAX_CONFERENCENAME];
  111. } CONFINFO;
  112. typedef CONFINFO * LPCONFINFO;
  113.  
  114. // CONFINFO dwMediaType
  115. #define CONF_MT_DATA      0x0001
  116. #define CONF_MT_AUDIO     0x0002
  117. #define CONF_MT_VIDEO     0x0004
  118. #define CONF_MT_ALL       0xFFFF
  119.  
  120.  
  121. /* Describes a user within a conference
  122. */
  123. typedef struct tagConfUserInfo {
  124.     DWORD dwSize;                   // size of this structure, in bytes
  125.     DWORD dwUserId;                 // GCC NodeId
  126.     DWORD dwReserved;
  127.     TCHAR szUserName[CONF_MAX_USERNAME];
  128. } CONFUSERINFO;
  129. typedef CONFUSERINFO * LPCONFUSERINFO;
  130.  
  131.  
  132. /* Describes the default receive directory for transferred files
  133. */
  134. typedef struct tagConfRecDir {
  135.     DWORD dwSize;                   // size of this structure, in bytes
  136.     TCHAR szRecDir[MAX_PATH];
  137. } CONFRECDIR;
  138. typedef CONFRECDIR * LPCONFRECDIR;
  139.  
  140.  
  141. /* Describes the notification callback
  142. */
  143. typedef struct tagConfNotify {
  144.     DWORD dwSize;                   // size of this structure, in bytes
  145.     DWORD dwFlags;                  // reserved for future use
  146.     CONFNOTIFYPROC pfnNotifyProc;   // the notification callback routine
  147.     GUID  guid;                     // globally unique application identifier
  148. } CONFNOTIFY;
  149. typedef CONFNOTIFY * LPCONFNOTIFY;
  150.  
  151.  
  152. /* Describes an application to be launched when receiving files or data
  153. */
  154. typedef struct tagConfGuid {
  155.     DWORD   dwSize;                 // size of this structure, in bytes
  156.     GUID    guid;                   // globally unique application identifier
  157.     LPCTSTR pszApplication;         // application to run
  158.     LPCTSTR pszCommandLine;         // command line paramters
  159.     LPCTSTR pszDirectory;           // working directory
  160. } CONFGUID;
  161. typedef CONFGUID * LPCONFGUID;
  162.  
  163.  
  164. /* Describes a file in the process of being transferred
  165. */
  166. typedef struct tagConfFileInfo {
  167.     DWORD dwSize;                   // size of this structure, in bytes
  168.     DWORD dwFileId;                 // unique file identifier
  169.     DWORD dwFileSize;               // size of the file in bytes
  170.     DWORD dwBytesTransferred;       // number of bytes currently transferred
  171.     DWORD dwFileAttributes;
  172.     FILETIME ftCreationTime;
  173.     FILETIME ftLastAccessTime;
  174.     FILETIME ftLastWriteTime;
  175.     TCHAR szFileNameSrc[MAX_PATH];  // original file name
  176.     TCHAR szFileNameDest[MAX_PATH]; // destination file name
  177. } CONFFILEINFO;
  178. typedef CONFFILEINFO * LPCONFFILEINFO;
  179.  
  180.  
  181. /* ConferenceGetInfo dwCode
  182. */
  183. #define CONF_GET_CONF                0x0001 // LPCONFINFO
  184. #define CONF_ENUM_CONF               0x0002 // LPCONFINFO
  185. #define CONF_GET_USER                0x0011 // LPUSERINFO
  186. #define CONF_ENUM_USER               0x0012 // LPUSERINFO
  187. #define CONF_GET_RECDIR              0x0020 // LPCONFRECDIR
  188. #define CONF_GET_FILEINFO            0x0021 // LPFILEINFO
  189.  
  190.  
  191. /* ConferenceSetInfo dwCode
  192. */
  193. #define CONF_SET_NOTIFY              0x1001 // LPCONFNOTIFY
  194. #define CONF_REMOVE_NOTIFY           0x1002 // LPCONFNOTIFY
  195. #define CONF_SET_RECDIR              0x1020 // LPCONFRECDIR
  196. #define CONF_SET_GUID                0x1041 // LPCONFGUID
  197.  
  198.  
  199. /* ConferenceSendFile dwFlags
  200. */
  201. #define CONF_SF_NOWAIT               0x0001
  202. #define CONF_SF_NOUI                 0x0002
  203. #define CONF_SF_NOCOMPRESS           0x0004
  204.  
  205.  
  206. /* ShareWindow dwFlags
  207. */
  208. #define CONF_SW_SHARE                0x0001
  209. #define CONF_SW_UNSHARE              0x0002
  210.  
  211.  
  212. /* Notification Codes
  213. */
  214. #define CONFN_CONFERENCE_INIT        0x0001 // 0,        LPCONFADDR, LPCONFINFO
  215. #define CONFN_CONFERENCE_START       0x0002 // 0,        LPCONFADDR, LPCONFINFO
  216. #define CONFN_CONFERENCE_STOP        0x0003 // 0,        LPCONFADDR, LPCONFINFO
  217. #define CONFN_CONFERENCE_ERROR       0x0004 // 0,        LPCONFADDR, LPCONFINFO
  218. #define CONFN_USER_ADDED             0x0011 // dwUserId, LPCONFADDR, LPCONFINFO
  219. #define CONFN_USER_REMOVED           0x0012 // dwUserId, LPCONFADDR, LPCONFINFO
  220. #define CONFN_PEER_ADDED             0x0021 // dwUserId, LPCONFDEST, 0
  221. #define CONFN_PEER_REMOVED           0x0022 // dwUserId, LPCONFDEST, 0
  222. #define CONFN_WINDOW_SHARED          0x0041 // HWND,     0         , 0
  223. #define CONFN_WINDOW_UNSHARED        0x0042 // HWND,     0         , 0
  224. #define CONFN_DATA_SENT              0x0101 // DWORD,    LPCONFDEST, LPVOID
  225. #define CONFN_DATA_RECEIVED          0x0102 // DWORD,    LPCONFDEST, LPVOID
  226. #define CONFN_FILESEND_START         0x0111 // dwFileId, LPCONFDEST, LPCONFFILEINFO
  227. #define CONFN_FILESEND_PROGRESS      0x0112 // dwFileId, LPCONFDEST, LPCONFFILEINFO
  228. #define CONFN_FILESEND_COMPLETE      0x0113 // dwFileId, LPCONFDEST, LPCONFFILEINFO
  229. #define CONFN_FILESEND_ERROR         0x0114 // dwFileId, LPCONFDEST, LPCONFFILEINFO
  230. #define CONFN_FILERECEIVE_START      0x0121 // dwFileId, LPCONFDEST, LPCONFFILEINFO
  231. #define CONFN_FILERECEIVE_PROGRESS   0x0122 // dwFileId, LPCONFDEST, LPCONFFILEINFO
  232. #define CONFN_FILERECEIVE_COMPLETE   0x0123 // dwFileId, LPCONFDEST, LPCONFFILEINFO
  233. #define CONFN_FILERECEIVE_ERROR      0x0124 // dwFileId, LPCONFDEST, LPCONFFILEINFO
  234.  
  235.  
  236. /* Conferencing functions found in MSCONF.DLL
  237. */
  238.  
  239. DWORD WINAPI ConferenceConnect(HCONF * phConf, LPCONFADDR lpConfAddr, LPCONFINFO lpConfInfo);
  240. DWORD WINAPI ConferenceDisconnect(HCONF hConf);
  241. DWORD WINAPI ConferenceGetInfo(HCONF hConf, DWORD dwCode, LPVOID lpv);
  242. DWORD WINAPI ConferenceSetInfo(HCONF hConf, DWORD dwCode, LPVOID lpv);
  243. DWORD WINAPI ConferenceLaunchRemote(HCONF hConf, LPCONFDEST lpConfDest, DWORD dwReserved);
  244. DWORD WINAPI ConferenceSendData(HCONF hConf, LPCONFDEST lpConfDest, LPVOID lpv, DWORD cb, DWORD dwFlags);
  245. DWORD WINAPI ConferenceSendFile(HCONF hConf, LPCONFDEST lpConfDest, LPCTSTR szFileName, DWORD dwFlags);
  246. DWORD WINAPI ConferenceShareWindow(HWND hwnd, HCONF hConf, DWORD dwFlags);
  247. BOOL  WINAPI ConferenceIsWindowShared(HWND hwnd, HCONF * phConf);
  248.  
  249. #ifdef __cplusplus
  250. }
  251. #endif
  252.  
  253. #endif // _MSCONF_H_
  254.  
  255.