Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
867 B

/*
* Lsa.c
*
* Author: BreenH
*
* LSA utilities.
*/
/*
* Includes
*/
#include "precomp.h"
/*
* Function Implementations
*/
VOID NTAPI
InitLsaString(
PLSA_UNICODE_STRING pLsaString,
PCWSTR pString
)
{
ULONG cchString;
//
// Unicode strings do not require NULL terminators. Length should relay
// the number of bytes in the string, with MaximumLength set to the
// number of bytes in the entire buffer.
//
if (pString != NULL)
{
cchString = lstrlenW(pString);
pLsaString->Buffer = (PWSTR)pString;
pLsaString->Length = (USHORT)(cchString * sizeof(WCHAR));
pLsaString->MaximumLength = (USHORT)((cchString + 1) * sizeof(WCHAR));
}
else
{
pLsaString->Buffer = (PWSTR)NULL;
pLsaString->Length = 0;
pLsaString->MaximumLength = 0;
}
}