source: trunk/src/wsock32/new/relaywin.h@ 1957

Last change on this file since 1957 was 1951, checked in by phaller, 26 years ago

Fix: more asynchronous functions supported

File size: 2.8 KB
Line 
1/* $Id: relaywin.h,v 1.4 1999-12-02 21:35:29 phaller 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 0
41#define ASYNCREQUEST_GETHOSTBYADDR 1
42#define ASYNCREQUEST_GETSERVBYNAME 2
43#define ASYNCREQUEST_GETSERVBYPORT 3
44#define ASYNCREQUEST_GETPROTOBYNAME 4
45#define ASYNCREQUEST_GETPROTOBYNUMBER 5
46#define ASYNCREQUEST_SELECT 6
47
48
49typedef struct tagHwndMsgPair
50{
51 HWND hwnd; /* target window */
52 ULONG ulMsg; /* the message code to send */
53 ULONG ulRequestType; /* the type of request that this belongs to */
54 PVOID pvUserData1; /* request specific data field */
55 PVOID pvUserData2; /* request specific data field */
56} HWNDMSGPAIR, *PHWNDMSGPAIR;
57
58
59/*****************************************************************************
60 * Prototypes *
61 *****************************************************************************/
62
63ULONG RelayAlloc (HWND hwnd,
64 ULONG ulMsg,
65 ULONG ulRequestType,
66 BOOL fSingleRequestPerWindow,
67 PVOID pvUserData1 = 0,
68 PVOID pvUserData2 = 0);
69
70ULONG RelayFree (ULONG ulID);
71
72ULONG RelayFreeByHwnd(HWND hwnd);
73
74PHWNDMSGPAIR RelayQuery (ULONG ulID);
75
76MRESULT EXPENTRY RelayWindowProc(HWND hwnd,
77 ULONG ulMsg,
78 MPARAM mp1,
79 MPARAM mp2);
80
81HWND RelayInitialize(HWND hwndPost);
82
83BOOL RelayTerminate (HWND hwndRelay);
84
85
86#endif /* _RELAYWIN_H_ */
87
Note: See TracBrowser for help on using the repository browser.