/************************************************************************/ /* FILENAME : app2sock.h */ /* Copyright SPRY, Inc. 1991-1994. All rights reserved */ /* PURPOSE: */ /* A global header file for whoever wants use APP2SOCK.DLL */ /************************************************************************/ // 7/22/93 --- Try to change name to more reasonable and Window base name #define S_UNCONNECTED 0 #define S_CONNECTED 1 #define BYNAME 0 #define BYIP 1 #define QERROR (-1) #define QERROR_OUTOFRESOURCE (-2) #define QERROR_GETLOCALNAME (-3) #define QERROR_GETREMOTENAME (-4) #define QERROR_NOSOCKET (-5) #define QERROR_IOCTL (-6) #define QERROR_BINDING (-7) #define QERROR_LISTEN (-8) #define QERROR_GETREMOTEIP (-9) #define QERROR_CONNECT (-10) #define QERROR_ACCEPT (-11) #define QERROR_RECEIVEBLOCK (-12) typedef int A2SID; // App2sock ID #define comm_allow_event(a) COMMAllowEvent(a) #define comm_allow_new_server(a) COMMAllowNewServer(a) #define comm_chars_present(a) COMMCharsPresent(a) #define comm_close(a) COMMClose(a) #define comm_error_message(a) COMMGetErrorMessageString(a) #define comm_get_ip(a,b) COMMGetMyIP(a,b) #define comm_get_remote_structure(a,b) COMMGetPeerInfo(a,b) #define comm_init() COMMInitial() #define comm_listen(a,b) COMMListen(a,b) #define comm_open(a,b,c,d,e,f) COMMOpen(a,b,c,d,e,f) #define comm_read(a,b,c) COMMRead(a,b,c) #define comm_peek(a,b,c) COMMPeek(a,b,c) #define comm_shutdown() #define comm_test(a) COMMTestConnected(a) #define comm_write_ascii_string(a,b,c) COMMWriteASCIIString(a,b,c) #define comm_write_blk(a,b,c) COMMWriteBlock(a,b,c) #define comm_write_char(a,b) COMMWriteCharacter(a,b) #define comm_fakeopen(a) COMMFakeOpen(a) #define comm_fakeclose(a) COMMFakeClose(a) int FAR PASCAL COMMAllowEvent(A2SID); int FAR PASCAL COMMAllowNewServer(A2SID); short FAR PASCAL COMMCharsPresent(A2SID); void FAR PASCAL COMMClose(A2SID); LPSTR FAR PASCAL COMMGetErrorMessageString(int); void FAR PASCAL COMMGetMyIP(BYTE far *, A2SID); void FAR PASCAL COMMGetPeerInfo(LPINT, A2SID); BOOL FAR PASCAL COMMInitial(void); A2SID FAR PASCAL COMMListen(unsigned int, LPINT); A2SID FAR PASCAL COMMOpen(LPSTR, int, WORD, WORD, short far *, LPINT); int FAR PASCAL COMMRead(A2SID, LPSTR, short); int FAR PASCAL COMMPeek(A2SID, LPSTR, short); BOOL FAR PASCAL COMMTestConnected(A2SID); BOOL FAR PASCAL COMMWriteASCIIString(A2SID, LPSTR, int); int FAR PASCAL COMMWriteBlock(A2SID, LPSTR, int); int FAR PASCAL COMMWriteCharacter(A2SID, WORD); A2SID FAR PASCAL COMMFakeOpen(int); void FAR PASCAL COMMFakeClose(A2SID); // New function since Version 2.0 Beta 3 BOOL FAR PASCAL COMMWaitForData(A2SID, long nSecond);