source: trunk/src/wsock32/relaywin.h@ 3171

Last change on this file since 3171 was 3171, checked in by sandervl, 25 years ago

relay bugfixes

File size: 3.0 KB
Line 
1/* $Id: relaywin.h,v 1.2 2000-03-20 20:31:30 sandervl Exp $ */
2
3/*
4 *
5 * Project Odin Software License can be found in LICENSE.TXT
6 *
7 * Win32 SOCK32 for OS/2
8 *
9 * Copyright (C) 1999 Patrick Haller <phaller@gmx.net>
10 *
11 */
12
13/* Remark:
14 * - this is an object window that acts as "relay", this is
15 * it receives WSAAsyncSelect()'s messages and redirects
16 * them to the appropriate PostMessageA function of USER32.
17 */
18
19
20#ifndef _RELAYWIN_H_
21#define _RELAYWIN_H_
22
23
24/*****************************************************************************
25 * Includes *
26 *****************************************************************************/
27
28/* object.c: the object window procedure on thread 2 */
29// os2 includes
30#define INCL_DOSPROCESS
31#define INCL_WIN
32#include <os2.h>
33
34/*****************************************************************************
35 * Structures *
36 *****************************************************************************/
37
38/* these are the request types so we can interpret the messages and convert the results */
39
40#define ASYNCREQUEST_GETHOSTBYNAME 100
41#define ASYNCREQUEST_GETHOSTBYADDR 101
42#define ASYNCREQUEST_GETSERVBYNAME 102
43#define ASYNCREQUEST_GETSERVBYPORT 103
44#define ASYNCREQUEST_GETPROTOBYNAME 104
45#define ASYNCREQUEST_GETPROTOBYNUMBER 105
46#define ASYNCREQUEST_SELECT 106
47
48
49#define NO_SOCKET -1
50
51typedef struct tagHwndMsgPair
52{
53 HWND hwnd; /* target window */
54 ULONG ulMsg; /* the message code to send */
55 ULONG ulRequestType; /* the type of request that this belongs to */
56 ULONG socket;
57 PVOID pvUserData1; /* request specific data field */
58 PVOID pvUserData2; /* request specific data field */
59 PVOID pvUserData3; /* request specific data field */
60} HWNDMSGPAIR, *PHWNDMSGPAIR;
61
62
63/*****************************************************************************
64 * Prototypes *
65 *****************************************************************************/
66
67ULONG RelayAlloc (HWND hwnd,
68 ULONG ulMsg,
69 ULONG ulRequestType,
70 ULONG socket,
71 BOOL fSingleRequestPerWindow,
72 PVOID pvUserData1 = 0,
73 PVOID pvUserData2 = 0,
74 PVOID pvUserData3 = 0);
75
76ULONG RelayFree (ULONG ulID);
77
78ULONG RelayFreeByHwnd(ULONG socket, HWND hwnd);
79
80PHWNDMSGPAIR RelayQuery (ULONG ulID);
81
82MRESULT EXPENTRY RelayWindowProc(HWND hwnd,
83 ULONG ulMsg,
84 MPARAM mp1,
85 MPARAM mp2);
86
87HWND RelayInitialize(HWND hwndPost);
88
89BOOL RelayTerminate (HWND hwndRelay);
90
91
92#endif /* _RELAYWIN_H_ */
93
Note: See TracBrowser for help on using the repository browser.