FreeRDP
Loading...
Searching...
No Matches
sam.h
1
20#ifndef WINPR_UTILS_SAM_H
21#define WINPR_UTILS_SAM_H
22
23#include <winpr/winpr.h>
24#include <winpr/wtypes.h>
25
26typedef struct winpr_sam WINPR_SAM;
27
29{
30 LPSTR User;
31 UINT32 UserLength;
32 LPSTR Domain;
33 UINT32 DomainLength;
34 BYTE LmHash[16];
35 BYTE NtHash[16];
36};
37typedef struct winpr_sam_entry WINPR_SAM_ENTRY;
38
39#ifdef __cplusplus
40extern "C"
41{
42#endif
43
44 WINPR_API void SamFreeEntry(WINPR_SAM* sam, WINPR_SAM_ENTRY* entry);
45
46 WINPR_ATTR_MALLOC(SamFreeEntry, 2)
47 WINPR_API WINPR_SAM_ENTRY* SamLookupUserA(WINPR_SAM* sam, LPCSTR User, UINT32 UserLength,
48 LPCSTR Domain, UINT32 DomainLength);
49 WINPR_ATTR_MALLOC(SamFreeEntry, 2)
50 WINPR_API WINPR_SAM_ENTRY* SamLookupUserW(WINPR_SAM* sam, LPCWSTR User, UINT32 UserLength,
51 LPCWSTR Domain, UINT32 DomainLength);
52
53 WINPR_API void SamResetEntry(WINPR_SAM_ENTRY* entry);
54
55 WINPR_API void SamClose(WINPR_SAM* sam);
56
57 WINPR_ATTR_MALLOC(SamClose, 1)
58 WINPR_API WINPR_SAM* SamOpen(const char* filename, BOOL readOnly);
59
60#ifdef __cplusplus
61}
62#endif
63
64#endif /* WINPR_UTILS_SAM_H */
Definition sam.h:29