2 * Copyright 2000, International Business Machines Corporation and others.
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
10 #ifndef CTL_SOCKADDR_H
11 #define CTL_SOCKADDR_H
14 * DEFINITIONS ________________________________________________________________
19 #define THIS_HINST (HINSTANCE)GetModuleHandle(NULL)
27 #define limit(_a,_x,_b) min( max( (_x), (_a) ), (_b) )
31 #define inlimit(_a,_x,_b) ( (((_x)>=(_a)) && ((_x)<=(_b))) ? TRUE : FALSE )
35 #define cxRECT(_r) ((_r).right - (_r).left)
39 #define cyRECT(_r) ((_r).bottom - (_r).top)
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)