windows-kfw-sdk-20060921
[openafs.git] / src / WINNT / kfw / inc / netidmgr / khremote.h
1 /*
2  * Copyright (c) 2005 Massachusetts Institute of Technology
3  *
4  * Permission is hereby granted, free of charge, to any person
5  * obtaining a copy of this software and associated documentation
6  * files (the "Software"), to deal in the Software without
7  * restriction, including without limitation the rights to use, copy,
8  * modify, merge, publish, distribute, sublicense, and/or sell copies
9  * of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be
13  * included in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24
25 /* $Id$ */
26
27 #ifndef __KHIMAIRA_REMOTE_H
28 #define __KHIMAIRA_REMOTE_H
29
30 /*! \addtogroup khui
31   @{*/
32 /*! \defgroup khui_remote Connecting to NetIDMgr from another process
33   @{*/
34
35 /* Leash compatibility */
36 #define ID_OBTAIN_TGT_WITH_LPARAM       32810
37
38 #define KHUI_REQDAEMONWND_CLASS L"IDMgrRequestDaemonCls"
39 #define KHUI_REQDAEMONWND_NAME  L"IDMgrRequestDaemon"
40
41 #define KHUI_REQD_MAPPING_FORMAT L"Local\\NetIDMgr_DlgInfo_%lu"
42
43 #define NETID_USERNAME_SZ       128
44 #define NETID_REALM_SZ          192
45 #define NETID_TITLE_SZ          256
46 #define NETID_CCACHE_NAME_SZ    264
47   
48 #define NETID_DLGTYPE_TGT      0
49 #define NETID_DLGTYPE_CHPASSWD 1
50 typedef struct {
51     DWORD size;
52     DWORD dlgtype;
53     // Tells whether dialog box is in change pwd mode or init ticket mode
54     struct {
55         WCHAR title[NETID_TITLE_SZ];
56         WCHAR username[NETID_USERNAME_SZ];
57         WCHAR realm[NETID_REALM_SZ];
58         WCHAR ccache[NETID_CCACHE_NAME_SZ];
59         DWORD use_defaults;
60         DWORD forwardable;
61         DWORD noaddresses;
62         DWORD lifetime;
63         DWORD renew_till;
64         DWORD proxiable;
65         DWORD publicip;
66         DWORD must_use_specified_principal;
67     } in;
68     struct {
69         WCHAR username[NETID_USERNAME_SZ];
70         WCHAR realm[NETID_REALM_SZ];
71         WCHAR ccache[NETID_CCACHE_NAME_SZ];
72     } out;
73     // Version 1 of this structure ends here
74 } NETID_DLGINFO, *LPNETID_DLGINFO;
75   
76 #define NETID_DLGINFO_V1_SZ (10 * sizeof(DWORD) \
77          + sizeof(WCHAR) * (NETID_TITLE_SZ + \
78          2 * NETID_USERNAME_SZ + 2 * NETID_REALM_SZ + \
79          2 * NETID_CCACHE_NAME_SZ))
80
81 /*!@} */
82 /*!@} */
83
84 #endif