Blame winpr/include/winpr/sam.h

Packit Service fa4841
/**
Packit Service fa4841
 * WinPR: Windows Portable Runtime
Packit Service fa4841
 * Security Accounts Manager (SAM)
Packit Service fa4841
 *
Packit Service fa4841
 * Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
Packit Service fa4841
 *
Packit Service fa4841
 * Licensed under the Apache License, Version 2.0 (the "License");
Packit Service fa4841
 * you may not use this file except in compliance with the License.
Packit Service fa4841
 * You may obtain a copy of the License at
Packit Service fa4841
 *
Packit Service fa4841
 *     http://www.apache.org/licenses/LICENSE-2.0
Packit Service fa4841
 *
Packit Service fa4841
 * Unless required by applicable law or agreed to in writing, software
Packit Service fa4841
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit Service fa4841
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit Service fa4841
 * See the License for the specific language governing permissions and
Packit Service fa4841
 * limitations under the License.
Packit Service fa4841
 */
Packit Service fa4841
Packit Service fa4841
#ifndef WINPR_UTILS_SAM_H
Packit Service fa4841
#define WINPR_UTILS_SAM_H
Packit Service fa4841
Packit Service fa4841
#include <winpr/winpr.h>
Packit Service fa4841
#include <winpr/wtypes.h>
Packit Service fa4841
Packit Service fa4841
typedef struct winpr_sam WINPR_SAM;
Packit Service fa4841
Packit Service fa4841
struct winpr_sam_entry
Packit Service fa4841
{
Packit Service fa4841
	LPSTR User;
Packit Service fa4841
	UINT32 UserLength;
Packit Service fa4841
	LPSTR Domain;
Packit Service fa4841
	UINT32 DomainLength;
Packit Service fa4841
	BYTE LmHash[16];
Packit Service fa4841
	BYTE NtHash[16];
Packit Service fa4841
};
Packit Service fa4841
typedef struct winpr_sam_entry WINPR_SAM_ENTRY;
Packit Service fa4841
Packit Service fa4841
#ifdef __cplusplus
Packit Service b1ea74
extern "C"
Packit Service b1ea74
{
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service b1ea74
	WINPR_API WINPR_SAM_ENTRY* SamLookupUserA(WINPR_SAM* sam, LPSTR User, UINT32 UserLength,
Packit Service b1ea74
	                                          LPSTR Domain, UINT32 DomainLength);
Packit Service b1ea74
	WINPR_API WINPR_SAM_ENTRY* SamLookupUserW(WINPR_SAM* sam, LPWSTR User, UINT32 UserLength,
Packit Service b1ea74
	                                          LPWSTR Domain, UINT32 DomainLength);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API void SamResetEntry(WINPR_SAM_ENTRY* entry);
Packit Service b1ea74
	WINPR_API void SamFreeEntry(WINPR_SAM* sam, WINPR_SAM_ENTRY* entry);
Packit Service fa4841
Packit Service b1ea74
	WINPR_API WINPR_SAM* SamOpen(const char* filename, BOOL readOnly);
Packit Service b1ea74
	WINPR_API void SamClose(WINPR_SAM* sam);
Packit Service fa4841
Packit Service fa4841
#ifdef __cplusplus
Packit Service fa4841
}
Packit Service fa4841
#endif
Packit Service fa4841
Packit Service fa4841
#endif /* WINPR_UTILS_SAM_H */