xref: /freebsd/crypto/krb5/src/windows/installer/wix/custom/custom.h (revision 7f2fe78b9dd5f51c821d771b63d2e096f6fd49e9)
1 /*
2 
3 Copyright 2004 by the Massachusetts Institute of Technology
4 
5 All rights reserved.
6 
7 Permission to use, copy, modify, and distribute this software and its
8 documentation for any purpose and without fee is hereby granted,
9 provided that the above copyright notice appear in all copies and that
10 both that copyright notice and this permission notice appear in
11 supporting documentation, and that the name of the Massachusetts
12 Institute of Technology (M.I.T.) not be used in advertising or publicity
13 pertaining to distribution of the software without specific, written
14 prior permission.
15 
16 M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
17 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
18 M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
19 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
21 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22 SOFTWARE.
23 
24 */
25 
26 /* custom.h
27  *
28  * Declarations for Kerberos for Windows MSI setup tools
29  *
30  * rcsid : $Id$
31  */
32 
33 #pragma once
34 
35 #include<windows.h>
36 #include<setupapi.h>
37 #include<msiquery.h>
38 #include<string.h>
39 #include<tchar.h>
40 #include<tlhelp32.h>
41 
42 #define MSIDLLEXPORT UINT __stdcall
43 
44 #define CHECK(x)	if((x)) goto _cleanup
45 
46 #define CHECKX(x,y) if(!(x)) { msiErr = (y); goto _cleanup; }
47 
48 #define CHECK2(x,y)  if((x)) { msiErr = (y); goto _cleanup; }
49 
50 #define STR_KEY_ORDER _T("SYSTEM\\CurrentControlSet\\Control\\NetworkProvider\\Order")
51 #define STR_VAL_ORDER _T("ProviderOrder")
52 
53 #define STR_SERVICE _T("MIT Kerberos")
54 #define STR_SERVICE_LEN 12
55 
56 
57 void ShowMsiError(MSIHANDLE, DWORD, DWORD);
58 UINT SetAllowTgtSessionKey( MSIHANDLE hInstall, BOOL pInstall );
59 UINT KillRunningProcessesWorker( MSIHANDLE hInstall, BOOL bKill );
60 
61 /* exported */
62 MSIDLLEXPORT AbortMsiImmediate( MSIHANDLE );
63 MSIDLLEXPORT UninstallNsisInstallation( MSIHANDLE hInstall );
64 MSIDLLEXPORT RevertAllowTgtSessionKey( MSIHANDLE hInstall );
65 MSIDLLEXPORT EnableAllowTgtSessionKey( MSIHANDLE hInstall );
66 MSIDLLEXPORT KillRunningProcesses( MSIHANDLE hInstall ) ;
67 MSIDLLEXPORT ListRunningProcesses( MSIHANDLE hInstall );
68 MSIDLLEXPORT InstallNetProvider( MSIHANDLE );
69 MSIDLLEXPORT UninstallNetProvider ( MSIHANDLE );
70 
71 #define INP_ERR_PRESENT 1
72 #define INP_ERR_ADDED   2
73 #define INP_ERR_ABSENT  3
74 #define INP_ERR_REMOVED 4
75 
76 /* Custom errors */
77 #define ERR_CUSTACTDATA 4001
78 #define ERR_NSS_FAILED  4003
79 #define ERR_ABORT       4004
80 #define ERR_PROC_LIST   4006
81 #define ERR_NPI_FAILED  4007
82 #define ERR_NSS_FAILED_CP 4008
83