Subversion Repositories Aucun

Rev

Rev 107 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
106 ixe013 1
#include "stdafx.h"
2
#include "lsahelper.h"
3
 
204 ixe013 4
extern PLSA_SECPKG_FUNCTION_TABLE g_pSec;
106 ixe013 5
 
6
LPVOID LsaAllocateLsa(ULONG size)
7
{
107 ixe013 8
    LPVOID result = 0;
9
 
10
    if(g_pSec)
11
        result = g_pSec->AllocateLsaHeap(size);
12
 
13
    return result;
106 ixe013 14
}
15
 
16
LSA_STRING *AllocateLsaStringLsa(LPCSTR szString)
17
{
107 ixe013 18
   LSA_STRING *s = 0;
106 ixe013 19
   size_t len = strlen(szString);
20
 
21
   s = (LSA_STRING *) LsaAllocateLsa(sizeof(LSA_STRING));
107 ixe013 22
 
23
   if (s)
24
    {
106 ixe013 25
   s->Buffer = (char *) LsaAllocateLsa((ULONG) len+1);
26
   s->Length = (USHORT)len;
27
   s->MaximumLength = (USHORT)len+1;
204 ixe013 28
   strcpy_s(s->Buffer, len+1,  szString);
107 ixe013 29
}
106 ixe013 30
   return s;
31
}
32