Update NEWS for 1.6.22
[pkg-k5-afs_openafs.git] / src / WINNT / afsapplib / ctl_sockaddr.h
blobab7f91b2faa66b6d67d5280a0d2eed9ffb748292
1 /*
2 * Copyright 2000, International Business Machines Corporation and others.
3 * All Rights Reserved.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
8 */
10 #ifndef CTL_SOCKADDR_H
11 #define CTL_SOCKADDR_H
14 * DEFINITIONS ________________________________________________________________
18 #ifndef THIS_HINST
19 #define THIS_HINST (HINSTANCE)GetModuleHandle(NULL)
20 #endif
22 #ifndef EXPORTED
23 #define EXPORTED
24 #endif
26 #ifndef limit
27 #define limit(_a,_x,_b) min( max( (_x), (_a) ), (_b) )
28 #endif
30 #ifndef inlimit
31 #define inlimit(_a,_x,_b) ( (((_x)>=(_a)) && ((_x)<=(_b))) ? TRUE : FALSE )
32 #endif
34 #ifndef cxRECT
35 #define cxRECT(_r) ((_r).right - (_r).left)
36 #endif
38 #ifndef cyRECT
39 #define cyRECT(_r) ((_r).bottom - (_r).top)
40 #endif
44 * PROTOTYPES _________________________________________________________________
48 EXPORTED BOOL RegisterSockAddrClass (void);
50 #define SAM_GETADDR (WM_USER+301) // SOCKADDR_IN *pAddr = lp;
51 #define SAM_SETADDR (WM_USER+302) // SOCKADDR_IN *pAddr = lp;
53 #define SAN_CHANGE 0x1003 // SOCKADDR_IN *pTime = lp;
54 #define SAN_UPDATE 0x1004 // SOCKADDR_IN *pAddr = lp;
57 * void SA_GetAddr (HWND hSockAddr, SOCKADDR_IN *pAddr)
58 * void SA_SetAddr (HWND hSockAddr, SOCKADDR_IN *pAddr)
61 #define SA_GetAddr(_hsa,_pAddr) \
62 SendMessage(_hsa,SAM_GETADDR,(WPARAM)0,(LPARAM)_pAddr)
63 #define SA_SetAddr(_hsa,_pAddr) \
64 SendMessage(_hsa,SAM_SETADDR,(WPARAM)0,(LPARAM)_pAddr)
67 #endif