Ignore:
Timestamp:
Aug 4, 2001, 7:19:21 PM (24 years ago)
Author:
sandervl
Message:

removed ntdll dependency

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/custombuild/guid.c

    r6453 r6459  
    1 /* $Id: guid.c,v 1.3 2001-08-04 15:29:20 sandervl Exp $ */
     1/* $Id: guid.c,v 1.4 2001-08-04 17:19:20 sandervl Exp $ */
    22#define ICOM_CINTERFACE 1
    33#include <odin.h>
     
    3737#include <wine/obj_serviceprovider.h>
    3838#include <wine/unicode.h>
     39
     40#include <misc.h>
    3941
    4042/*********************************************************************
     
    8284    return _wtol(string);
    8385}
     86
     87/******************************************************************************
     88 *  RtlAllocateAndInitializeSid             [NTDLL.265]
     89 *
     90 */
     91BOOLEAN WINAPI RtlAllocateAndInitializeSid ( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
     92                                             BYTE nSubAuthorityCount,
     93                                             DWORD nSubAuthority0,
     94                                             DWORD nSubAuthority1,
     95                                             DWORD nSubAuthority2,
     96                                             DWORD nSubAuthority3,
     97                                             DWORD nSubAuthority4,
     98                                             DWORD nSubAuthority5,
     99                                             DWORD nSubAuthority6,
     100                                             DWORD nSubAuthority7,
     101                                             PSID *pSid)
     102{
     103  dprintf(("NTDLL: RtlAllocateAndInitializeSid(%08xh,%08xh,%08xh,"
     104           "%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)",
     105           pIdentifierAuthority,
     106           nSubAuthorityCount,
     107           nSubAuthority0,
     108           nSubAuthority1,
     109           nSubAuthority2,
     110           nSubAuthority3,
     111           nSubAuthority4,
     112           nSubAuthority5,
     113           nSubAuthority6,
     114           nSubAuthority7,
     115           pSid));
     116
     117  *pSid = (PSID)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SID)+nSubAuthorityCount*sizeof(DWORD));
     118  if(*pSid == NULL) {
     119        SetLastError(ERROR_NOT_ENOUGH_MEMORY);
     120        return FALSE;
     121  }
     122  (*pSid)->Revision          = SID_REVISION;
     123  (*pSid)->SubAuthorityCount = nSubAuthorityCount;
     124
     125  if (nSubAuthorityCount > 0)
     126        (*pSid)->SubAuthority[0] = nSubAuthority0;
     127  if (nSubAuthorityCount > 1)
     128        (*pSid)->SubAuthority[1] = nSubAuthority1;
     129  if (nSubAuthorityCount > 2)
     130        (*pSid)->SubAuthority[2] = nSubAuthority2;
     131  if (nSubAuthorityCount > 3)
     132        (*pSid)->SubAuthority[3] = nSubAuthority3;
     133  if (nSubAuthorityCount > 4)
     134        (*pSid)->SubAuthority[4] = nSubAuthority4;
     135  if (nSubAuthorityCount > 5)
     136        (*pSid)->SubAuthority[5] = nSubAuthority5;
     137  if (nSubAuthorityCount > 6)
     138        (*pSid)->SubAuthority[6] = nSubAuthority6;
     139  if (nSubAuthorityCount > 7)
     140        (*pSid)->SubAuthority[7] = nSubAuthority7;
     141
     142  if(pIdentifierAuthority)
     143        memcpy((PVOID)&(*pSid)->IdentifierAuthority, (PVOID)pIdentifierAuthority, sizeof(SID_IDENTIFIER_AUTHORITY));
     144  return TRUE;
     145}
Note: See TracChangeset for help on using the changeset viewer.