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