20 #ifndef WINPR_SSPICLI_H
21 #define WINPR_SSPICLI_H
26 #include <winpr/winpr.h>
27 #include <winpr/wtypes.h>
31 #define LOGON32_LOGON_INTERACTIVE 2
32 #define LOGON32_LOGON_NETWORK 3
33 #define LOGON32_LOGON_BATCH 4
34 #define LOGON32_LOGON_SERVICE 5
35 #define LOGON32_LOGON_UNLOCK 7
36 #define LOGON32_LOGON_NETWORK_CLEARTEXT 8
37 #define LOGON32_LOGON_NEW_CREDENTIALS 9
39 #define LOGON32_PROVIDER_DEFAULT 0
40 #define LOGON32_PROVIDER_WINNT35 1
41 #define LOGON32_PROVIDER_WINNT40 2
42 #define LOGON32_PROVIDER_WINNT50 3
43 #define LOGON32_PROVIDER_VIRTUAL 4
47 size_t PagedPoolLimit;
48 size_t NonPagedPoolLimit;
49 size_t MinimumWorkingSetSize;
50 size_t MaximumWorkingSetSize;
52 LARGE_INTEGER TimeLimit;
62 NameFullyQualifiedDN = 1,
68 NameSamCompatible = 2,
87 NameUserPrincipal = 8,
97 NameServicePrincipal = 10,
102 } EXTENDED_NAME_FORMAT,
103 *PEXTENDED_NAME_FORMAT;
110 WINPR_API BOOL LogonUserA(LPCSTR lpszUsername, LPCSTR lpszDomain, LPCSTR lpszPassword,
111 DWORD dwLogonType, DWORD dwLogonProvider, PHANDLE phToken);
113 WINPR_API BOOL LogonUserW(LPCWSTR lpszUsername, LPCWSTR lpszDomain, LPCWSTR lpszPassword,
114 DWORD dwLogonType, DWORD dwLogonProvider, PHANDLE phToken);
116 WINPR_API BOOL LogonUserExA(LPCSTR lpszUsername, LPCSTR lpszDomain, LPCSTR lpszPassword,
117 DWORD dwLogonType, DWORD dwLogonProvider, PHANDLE phToken,
118 PSID* ppLogonSid, PVOID* ppProfileBuffer, LPDWORD pdwProfileLength,
121 WINPR_API BOOL LogonUserExW(LPCWSTR lpszUsername, LPCWSTR lpszDomain, LPCWSTR lpszPassword,
122 DWORD dwLogonType, DWORD dwLogonProvider, PHANDLE phToken,
123 PSID* ppLogonSid, PVOID* ppProfileBuffer, LPDWORD pdwProfileLength,
126 WINPR_API BOOL GetUserNameExA(EXTENDED_NAME_FORMAT NameFormat, LPSTR lpNameBuffer,
128 WINPR_API BOOL GetUserNameExW(EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer,
136 #define LogonUser LogonUserW
137 #define LogonUserEx LogonUserExW
138 #define GetUserNameEx GetUserNameExW
140 #define LogonUser LogonUserA
141 #define LogonUserEx LogonUserExA
142 #define GetUserNameEx GetUserNameExA