4 * This file contains the Rtl* API functions. These should be implementable.
6 * Copyright 1996-1998 Marcus Meissner
15 #include "stackframe.h"
27 /**************************************************************************
28 * RtlLengthRequiredSid [NTDLL.427]
30 DWORD WINAPI RtlLengthRequiredSid(DWORD nrofsubauths)
32 return sizeof(DWORD)*nrofsubauths+sizeof(SID);
35 /**************************************************************************
36 * RtlLengthSid [NTDLL.429]
38 DWORD WINAPI RtlLengthSid(LPSID sid)
39 { TRACE(ntdll,"sid=%p\n",sid);
42 return sizeof(DWORD)*sid->SubAuthorityCount+sizeof(SID);
45 /**************************************************************************
46 * RtlCreateAcl [NTDLL.306]
49 * This should return NTSTATUS
51 DWORD WINAPI RtlCreateAcl(LPACL acl,DWORD size,DWORD rev)
53 if (rev!=ACL_REVISION)
54 return STATUS_INVALID_PARAMETER;
56 return STATUS_BUFFER_TOO_SMALL;
58 return STATUS_INVALID_PARAMETER;
60 memset(acl,'\0',sizeof(ACL));
61 acl->AclRevision = rev;
67 /**************************************************************************
68 * RtlFirstFreeAce [NTDLL.370]
69 * looks for the AceCount+1 ACE, and if it is still within the alloced
70 * ACL, return a pointer to it
72 BOOL32 WINAPI RtlFirstFreeAce(LPACL acl,LPACE_HEADER *x)
78 ace = (LPACE_HEADER)(acl+1);
79 for (i=0;i<acl->AceCount;i++) {
80 if ((DWORD)ace>=(((DWORD)acl)+acl->AclSize))
82 ace = (LPACE_HEADER)(((BYTE*)ace)+ace->AceSize);
84 if ((DWORD)ace>=(((DWORD)acl)+acl->AclSize))
90 /**************************************************************************
91 * RtlAddAce [NTDLL.260]
94 WINAPI RtlAddAce(LPACL acl,DWORD rev,DWORD xnrofaces,
95 LPACE_HEADER acestart,DWORD acelen)
97 LPACE_HEADER ace,targetace;
100 if (acl->AclRevision != ACL_REVISION)
101 return STATUS_INVALID_PARAMETER;
102 if (!RtlFirstFreeAce(acl,&targetace))
103 return STATUS_INVALID_PARAMETER;
104 nrofaces=0;ace=acestart;
105 while (((DWORD)ace-(DWORD)acestart)<acelen) {
107 ace = (LPACE_HEADER)(((BYTE*)ace)+ace->AceSize);
109 if ((DWORD)targetace+acelen>(DWORD)acl+acl->AclSize) /* too much aces */
110 return STATUS_INVALID_PARAMETER;
111 memcpy((LPBYTE)targetace,acestart,acelen);
112 acl->AceCount+=nrofaces;
116 /**************************************************************************
117 * RtlCreateSecurityDescriptor [NTDLL.313]
120 WINAPI RtlCreateSecurityDescriptor(LPSECURITY_DESCRIPTOR lpsd,DWORD rev)
122 if (rev!=SECURITY_DESCRIPTOR_REVISION)
123 return STATUS_UNKNOWN_REVISION;
124 memset(lpsd,'\0',sizeof(*lpsd));
125 lpsd->Revision = SECURITY_DESCRIPTOR_REVISION;
129 /**************************************************************************
130 * RtlSetDaclSecurityDescriptor [NTDLL.483]
133 WINAPI RtlSetDaclSecurityDescriptor ( LPSECURITY_DESCRIPTOR lpsd,BOOL32 daclpresent,LPACL dacl,BOOL32 dacldefaulted )
135 if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION)
136 return STATUS_UNKNOWN_REVISION;
137 if (lpsd->Control & SE_SELF_RELATIVE)
138 return STATUS_INVALID_SECURITY_DESCR;
140 lpsd->Control &= ~SE_DACL_PRESENT;
143 lpsd->Control |= SE_DACL_PRESENT;
146 lpsd->Control |= SE_DACL_DEFAULTED;
148 lpsd->Control &= ~SE_DACL_DEFAULTED;
152 /**************************************************************************
153 * RtlSetSaclSecurityDescriptor [NTDLL.488]
156 WINAPI RtlSetSaclSecurityDescriptor (
157 LPSECURITY_DESCRIPTOR lpsd,BOOL32 saclpresent,LPACL sacl,BOOL32 sacldefaulted
160 if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION)
161 return STATUS_UNKNOWN_REVISION;
162 if (lpsd->Control & SE_SELF_RELATIVE)
163 return STATUS_INVALID_SECURITY_DESCR;
165 lpsd->Control &= ~SE_SACL_PRESENT;
168 lpsd->Control |= SE_SACL_PRESENT;
171 lpsd->Control |= SE_SACL_DEFAULTED;
173 lpsd->Control &= ~SE_SACL_DEFAULTED;
177 /**************************************************************************
178 * RtlSetOwnerSecurityDescriptor [NTDLL.487]
181 WINAPI RtlSetOwnerSecurityDescriptor (LPSECURITY_DESCRIPTOR lpsd,LPSID owner,BOOL32 ownerdefaulted)
183 if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION)
184 return STATUS_UNKNOWN_REVISION;
185 if (lpsd->Control & SE_SELF_RELATIVE)
186 return STATUS_INVALID_SECURITY_DESCR;
190 lpsd->Control |= SE_OWNER_DEFAULTED;
192 lpsd->Control &= ~SE_OWNER_DEFAULTED;
196 /**************************************************************************
197 * RtlSetGroupSecurityDescriptor [NTDLL.485]
200 WINAPI RtlSetGroupSecurityDescriptor (LPSECURITY_DESCRIPTOR lpsd,LPSID group,BOOL32 groupdefaulted)
202 if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION)
203 return STATUS_UNKNOWN_REVISION;
204 if (lpsd->Control & SE_SELF_RELATIVE)
205 return STATUS_INVALID_SECURITY_DESCR;
209 lpsd->Control |= SE_GROUP_DEFAULTED;
211 lpsd->Control &= ~SE_GROUP_DEFAULTED;
216 /**************************************************************************
217 * RtlNormalizeProcessParams [NTDLL.441]
219 LPVOID WINAPI RtlNormalizeProcessParams(LPVOID x)
221 FIXME(ntdll,"(%p), stub\n",x);
225 /**************************************************************************
226 * RtlInitializeSid [NTDLL.410]
228 DWORD WINAPI RtlInitializeSid(LPSID lpsid,LPSID_IDENTIFIER_AUTHORITY lpsidauth,
233 if (a>=SID_MAX_SUB_AUTHORITIES)
235 lpsid->SubAuthorityCount = a;
236 lpsid->Revision = SID_REVISION;
237 memcpy(&(lpsid->IdentifierAuthority),lpsidauth,sizeof(SID_IDENTIFIER_AUTHORITY));
241 /**************************************************************************
242 * RtlSubAuthoritySid [NTDLL.497]
244 LPDWORD WINAPI RtlSubAuthoritySid(LPSID lpsid,DWORD nr)
246 return &(lpsid->SubAuthority[nr]);
249 /**************************************************************************
250 * RtlSubAuthorityCountSid [NTDLL.496]
252 LPBYTE WINAPI RtlSubAuthorityCountSid(LPSID lpsid)
254 return ((LPBYTE)lpsid)+1;
257 /**************************************************************************
258 * RtlCopySid [NTDLL.302]
260 DWORD WINAPI RtlCopySid(DWORD len,LPSID to,LPSID from)
263 if (len<(from->SubAuthorityCount*4+8))
264 return STATUS_BUFFER_TOO_SMALL;
265 memmove(to,from,from->SubAuthorityCount*4+8);
266 return STATUS_SUCCESS;
269 /**************************************************************************
270 * RtlAnsiStringToUnicodeString [NTDLL.269]
273 WINAPI RtlAnsiStringToUnicodeString(LPUNICODE_STRING uni,LPANSI_STRING ansi,BOOL32 doalloc)
275 DWORD unilen = (ansi->Length+1)*sizeof(WCHAR);
278 return STATUS_INVALID_PARAMETER_2;
279 uni->Length = unilen;
281 uni->MaximumLength = unilen;
282 uni->Buffer = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,unilen);
284 return STATUS_NO_MEMORY;
286 if (unilen>uni->MaximumLength)
287 return STATUS_BUFFER_OVERFLOW;
288 lstrcpynAtoW(uni->Buffer,ansi->Buffer,unilen/2);
289 return STATUS_SUCCESS;
292 /**************************************************************************
293 * RtlOemStringToUnicodeString [NTDLL.447]
296 WINAPI RtlOemStringToUnicodeString(LPUNICODE_STRING uni,LPSTRING ansi,BOOL32 doalloc)
298 DWORD unilen = (ansi->Length+1)*sizeof(WCHAR);
301 return STATUS_INVALID_PARAMETER_2;
302 uni->Length = unilen;
304 uni->MaximumLength = unilen;
305 uni->Buffer = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,unilen);
307 return STATUS_NO_MEMORY;
309 if (unilen>uni->MaximumLength)
310 return STATUS_BUFFER_OVERFLOW;
311 lstrcpynAtoW(uni->Buffer,ansi->Buffer,unilen/2);
312 return STATUS_SUCCESS;
314 /**************************************************************************
315 * RtlMultiByteToUnicodeN [NTDLL.436]
316 * FIXME: multibyte support
319 WINAPI RtlMultiByteToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,DWORD oemlen)
327 x=(LPWSTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(len+1)*sizeof(WCHAR));
328 lstrcpynAtoW(x,oemstr,len+1);
329 memcpy(unistr,x,len*2);
330 if (reslen) *reslen = len*2;
334 /**************************************************************************
335 * RtlOemToUnicodeN [NTDLL.448]
338 WINAPI RtlOemToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,DWORD oemlen)
346 x=(LPWSTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(len+1)*sizeof(WCHAR));
347 lstrcpynAtoW(x,oemstr,len+1);
348 memcpy(unistr,x,len*2);
349 if (reslen) *reslen = len*2;
353 /**************************************************************************
354 * RtlInitAnsiString [NTDLL.399]
356 VOID WINAPI RtlInitAnsiString(LPANSI_STRING target,LPCSTR source)
358 target->Length = target->MaximumLength = 0;
359 target->Buffer = (LPSTR)source;
362 target->Length = lstrlen32A(target->Buffer);
363 target->MaximumLength = target->Length+1;
365 /**************************************************************************
366 * RtlInitString [NTDLL.402]
368 VOID WINAPI RtlInitString(LPSTRING target,LPCSTR source)
370 target->Length = target->MaximumLength = 0;
371 target->Buffer = (LPSTR)source;
374 target->Length = lstrlen32A(target->Buffer);
375 target->MaximumLength = target->Length+1;
378 /**************************************************************************
379 * RtlInitUnicodeString [NTDLL.403]
381 VOID WINAPI RtlInitUnicodeString(LPUNICODE_STRING target,LPCWSTR source)
383 target->Length = target->MaximumLength = 0;
384 target->Buffer = (LPWSTR)source;
387 target->Length = lstrlen32W(target->Buffer)*2;
388 target->MaximumLength = target->Length+2;
391 /**************************************************************************
392 * RtlFreeUnicodeString [NTDLL.377]
394 VOID WINAPI RtlFreeUnicodeString(LPUNICODE_STRING str)
397 HeapFree(GetProcessHeap(),0,str->Buffer);
400 /**************************************************************************
401 * RtlFreeAnsiString [NTDLL.373]
403 VOID WINAPI RtlFreeAnsiString(LPANSI_STRING AnsiString)
405 if( AnsiString->Buffer )
406 HeapFree( GetProcessHeap(),0,AnsiString->Buffer );
410 /**************************************************************************
411 * RtlUnicodeToOemN [NTDLL.515]
414 WINAPI RtlUnicodeToOemN(LPSTR oemstr,DWORD oemlen,LPDWORD reslen,LPWSTR unistr,DWORD unilen)
422 x=(LPSTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,len+1);
423 lstrcpynWtoA(x,unistr,len+1);
424 memcpy(oemstr,x,len);
425 if (reslen) *reslen = len;
429 /**************************************************************************
430 * RtlUnicodeStringToOemString [NTDLL.511]
433 WINAPI RtlUnicodeStringToOemString(LPANSI_STRING oem,LPUNICODE_STRING uni,BOOL32 alloc)
436 oem->Buffer = (LPSTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,uni->Length/2)+1;
437 oem->MaximumLength = uni->Length/2+1;
439 oem->Length = uni->Length/2;
440 lstrcpynWtoA(oem->Buffer,uni->Buffer,uni->Length/2+1);
444 /**************************************************************************
445 * RtlUnicodeStringToAnsiString [NTDLL.507]
448 WINAPI RtlUnicodeStringToAnsiString(LPANSI_STRING oem,LPUNICODE_STRING uni,BOOL32 alloc)
451 oem->Buffer = (LPSTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,uni->Length/2)+1;
452 oem->MaximumLength = uni->Length/2+1;
454 oem->Length = uni->Length/2;
455 lstrcpynWtoA(oem->Buffer,uni->Buffer,uni->Length/2+1);
459 /**************************************************************************
460 * RtlEqualUnicodeString [NTDLL]
462 DWORD WINAPI RtlEqualUnicodeString(LPUNICODE_STRING s1,LPUNICODE_STRING s2,DWORD x) {
463 FIXME(ntdll,"(%s,%s,%ld),stub!\n",debugstr_w(s1->Buffer),debugstr_w(s2->Buffer),x);
465 if (s1->Length != s2->Length)
467 return !lstrncmp32W(s1->Buffer,s2->Buffer,s1->Length/2);
470 /**************************************************************************
471 * RtlNtStatusToDosErro [NTDLL.442]
473 DWORD WINAPI RtlNtStatusToDosError(DWORD error)
475 FIXME(ntdll, "(%lx): map STATUS_ to ERROR_\n",error);
479 /**************************************************************************
480 * RtlGetNtProductType [NTDLL.390]
482 BOOL32 WINAPI RtlGetNtProductType(LPDWORD type)
484 FIXME(ntdll, "(%p): stub\n", type);
485 *type=3; /* dunno. 1 for client, 3 for server? */
489 /**************************************************************************
490 * RtlUpcaseUnicodeString [NTDLL.520]
492 DWORD WINAPI RtlUpcaseUnicodeString(LPUNICODE_STRING dest,LPUNICODE_STRING src,BOOL32 doalloc)
499 dest->MaximumLength = len;
500 dest->Buffer = (LPWSTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,len);
502 return STATUS_NO_MEMORY;
505 if (dest->MaximumLength < len)
506 return STATUS_BUFFER_OVERFLOW;
507 s=dest->Buffer;t=src->Buffer;
508 /* len is in bytes */
509 for (i=0;i<len/2;i++)
510 s[i] = towupper(t[i]);
511 return STATUS_SUCCESS;
514 /**************************************************************************
515 * RtlxOemStringToUnicodeSize [NTDLL.549]
517 UINT32 WINAPI RtlxOemStringToUnicodeSize(LPSTRING str)
519 return str->Length*2+2;
522 /**************************************************************************
523 * RtlxAnsiStringToUnicodeSize [NTDLL.548]
525 UINT32 WINAPI RtlxAnsiStringToUnicodeSize(LPANSI_STRING str)
527 return str->Length*2+2;
530 /**************************************************************************
531 * RtlIsTextUnicode [NTDLL.417]
533 * Apply various feeble heuristics to guess whether
534 * the text buffer contains Unicode.
535 * FIXME: should implement more tests.
537 DWORD WINAPI RtlIsTextUnicode(LPVOID buf, DWORD len, DWORD *pf)
540 DWORD flags = -1, out_flags = 0;
547 * Apply various tests to the text string. According to the
548 * docs, each test "passed" sets the corresponding flag in
549 * the output flags. But some of the tests are mutually
550 * exclusive, so I don't see how you could pass all tests ...
553 /* Check for an odd length ... pass if even. */
555 out_flags |= IS_TEXT_UNICODE_ODD_LENGTH;
557 /* Check for the special unicode marker byte. */
559 out_flags |= IS_TEXT_UNICODE_SIGNATURE;
562 * Check whether the string passed all of the tests.
564 flags &= ITU_IMPLEMENTED_TESTS;
565 if ((out_flags & flags) != flags)
573 /**************************************************************************
574 * RtlDosPathNameToNtPathName_U [NTDLL.338]
576 * FIXME: convert to UNC or whatever is expected here
578 BOOL32 WINAPI RtlDosPathNameToNtPathName_U(
579 LPWSTR from,LPUNICODE_STRING us,DWORD x2,DWORD x3)
581 LPSTR fromA = HEAP_strdupWtoA(GetProcessHeap(),0,from);
583 FIXME(ntdll,"(%s,%p,%08lx,%08lx)\n",fromA,us,x2,x3);
585 RtlInitUnicodeString(us,HEAP_strdupW(GetProcessHeap(),0,from));
589 /**************************************************************************
590 * NTDLL_chkstk [NTDLL.862]
591 * NTDLL_alloca_probe [NTDLL.861]
592 * Glorified "enter xxxx".
594 REGS_ENTRYPOINT(NTDLL_chkstk)
596 ESP_reg(context) -= EAX_reg(context);
598 REGS_ENTRYPOINT(NTDLL_alloca_probe)
600 ESP_reg(context) -= EAX_reg(context);
603 /******************************************************************************
604 * RtlTimeToElapsedTimeFields [NTDLL.502]
606 DWORD WINAPI RtlTimeToElapsedTimeFields( DWORD x1, DWORD x2 )
608 FIXME(ntdll,"(%lx,%lx): stub\n",x1,x2);
613 /******************************************************************************
614 * RtlExtendedLargeIntegerDivide [NTDLL.359]
616 INT32 WINAPI RtlExtendedLargeIntegerDivide(
617 LARGE_INTEGER dividend,
621 #if SIZEOF_LONG_LONG==8
622 long long x1 = *(long long*)÷nd;
625 *rest = x1 % divisor;
628 FIXME(ntdll,"((%d<<32)+%d,%d,%p), implement this using normal integer arithmetic!\n",dividend.HighPart,dividend.LowPart,divisor,rest);
633 /******************************************************************************
634 * RtlExtendedLargeIntegerMultiply [NTDLL.359]
635 * Note: This even works, since gcc returns 64bit values in eax/edx just like
636 * the caller expects. However... The relay code won't grok this I think.
638 long long /*LARGE_INTEGER*/
639 WINAPI RtlExtendedIntegerMultiply(
640 LARGE_INTEGER factor1,INT32 factor2
642 #if SIZEOF_LONG_LONG==8
643 return (*(long long*)&factor1)*factor2;
645 FIXME(ntdll,"((%d<<32)+%d,%ld), implement this using normal integer arithmetic!\n",factor1.HighPart,factor1.LowPart,factor2);
650 /******************************************************************************
651 * RtlFormatCurrentUserKeyPath [NTDLL.371]
653 DWORD WINAPI RtlFormatCurrentUserKeyPath(DWORD x)
655 FIXME(ntdll,"(0x%08lx): stub\n",x);
659 /******************************************************************************
660 * RtlOpenCurrentUser [NTDLL]
662 DWORD WINAPI RtlOpenCurrentUser(DWORD x1, DWORD *x2)
664 /* Note: this is not the correct solution,
665 * But this works pretty good on wine and NT4.0 binaries
667 if ( x1 == 0x2000000 ) {
668 *x2 = HKEY_CURRENT_USER;
674 /******************************************************************************
675 * RtlAllocateAndInitializeSid [NTDLL.265]
678 BOOL32 WINAPI RtlAllocateAndInitializeSid (LPSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,DWORD nSubAuthorityCount,
679 DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8,DWORD x9,DWORD x10, LPSID pSid)
680 { FIXME(ntdll,"(%p,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,%p),stub!\n",
681 pIdentifierAuthority,nSubAuthorityCount,x3,x4,x5,x6,x7,x8,x9,x10,pSid);
684 /******************************************************************************
685 * RtlEqualSid [NTDLL.352]
688 DWORD WINAPI RtlEqualSid(DWORD x1,DWORD x2) {
689 FIXME(ntdll,"(0x%08lx,0x%08lx),stub!\n", x1,x2);
693 /******************************************************************************
694 * RtlFreeSid [NTDLL.376]
696 DWORD WINAPI RtlFreeSid(DWORD x1)
697 { FIXME(ntdll,"(0x%08lx),stub!\n", x1);
701 /******************************************************************************
702 * RtlGetDaclSecurityDescriptor [NTDLL]
704 DWORD WINAPI RtlGetDaclSecurityDescriptor(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
705 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
709 /******************************************************************************
710 * RtlCreateEnvironment [NTDLL]
712 DWORD WINAPI RtlCreateEnvironment(DWORD x1,DWORD x2) {
713 FIXME(ntdll,"(0x%08lx,0x%08lx),stub!\n",x1,x2);
718 /******************************************************************************
719 * RtlDestroyEnvironment [NTDLL]
721 DWORD WINAPI RtlDestroyEnvironment(DWORD x) {
722 FIXME(ntdll,"(0x%08lx),stub!\n",x);
726 /******************************************************************************
727 * RtlQueryEnvironmentVariable_U [NTDLL]
729 DWORD WINAPI RtlQueryEnvironmentVariable_U(DWORD x1,LPUNICODE_STRING key,LPUNICODE_STRING val) {
730 FIXME(ntdll,"(0x%08lx,%s,%p),stub!\n",x1,debugstr_w(key->Buffer),val);
734 /******************************************************************************
735 * RtlSetEnvironmentVariable [NTDLL]
737 DWORD WINAPI RtlSetEnvironmentVariable(DWORD x1,LPUNICODE_STRING key,LPUNICODE_STRING val) {
738 FIXME(ntdll,"(0x%08lx,%s,%s),stub!\n",x1,debugstr_w(key->Buffer),debugstr_w(val->Buffer));
742 /******************************************************************************
743 * RtlNewSecurityObject [NTDLL]
745 DWORD WINAPI RtlNewSecurityObject(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6) {
746 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4,x5,x6);
750 /******************************************************************************
751 * RtlDeleteSecurityObject [NTDLL]
753 DWORD WINAPI RtlDeleteSecurityObject(DWORD x1) {
754 FIXME(ntdll,"(0x%08lx),stub!\n",x1);
758 /******************************************************************************
759 * RtlToTimeInSecondsSince1980 [NTDLL]
761 BOOL32 WINAPI RtlTimeToSecondsSince1980(LPFILETIME ft,LPDWORD timeret) {
762 /* 1980 = 1970+10*365 days + 29. februar 1972 + 29.februar 1976 */
763 *timeret = DOSFS_FileTimeToUnixTime(ft,NULL) - (10*365+2)*24*3600;
767 /******************************************************************************
768 * RtlToTimeInSecondsSince1970 [NTDLL]
770 BOOL32 WINAPI RtlTimeToSecondsSince1970(LPFILETIME ft,LPDWORD timeret) {
771 *timeret = DOSFS_FileTimeToUnixTime(ft,NULL);
775 /******************************************************************************
776 * RtlAcquirePebLock [NTDLL]
778 VOID WINAPI RtlAcquirePebLock(void) {
780 /* enter critical section ? */
783 /******************************************************************************
784 * RtlReleasePebLock [NTDLL]
786 VOID WINAPI RtlReleasePebLock(void) {
788 /* leave critical section ? */
791 /******************************************************************************
792 * RtlAddAccessAllowedAce [NTDLL]
794 DWORD WINAPI RtlAddAccessAllowedAce(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
795 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
799 /******************************************************************************
802 DWORD WINAPI RtlGetAce(LPACL pAcl,DWORD dwAceIndex,LPVOID *pAce ) {
803 FIXME(ntdll,"(%p,%ld,%p),stub!\n",pAcl,dwAceIndex,pAce);
807 /******************************************************************************
808 * RtlAdjustPrivilege [NTDLL]
810 DWORD WINAPI RtlAdjustPrivilege(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
811 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
815 /******************************************************************************
816 * RtlIntegerToChar [NTDLL]
818 DWORD WINAPI RtlIntegerToChar(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
819 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1,x2,x3,x4);
822 /******************************************************************************
823 * RtlSystemTimeToLocalTime [NTDLL]
825 DWORD WINAPI RtlSystemTimeToLocalTime(DWORD x1,DWORD x2) {
826 FIXME(ntdll,"(0x%08lx,0x%08lx),stub!\n",x1,x2);
829 /******************************************************************************
830 * RtlTimeToTimeFields [NTDLL]
832 DWORD WINAPI RtlTimeToTimeFields(DWORD x1,DWORD x2) {
833 FIXME(ntdll,"(0x%08lx,0x%08lx),stub!\n",x1,x2);
836 /******************************************************************************
837 * RtlInitializeResource [NTDLL]
839 NTSTATUS WINAPI RtlInitializeResource(DWORD x1) {
840 FIXME(ntdll,"(0x%08lx),stub!\n",x1);
843 /******************************************************************************
844 * RtlCompareUnicodeString [NTDLL]
846 NTSTATUS WINAPI RtlCompareUnicodeString(LPUNICODE_STRING x1,LPUNICODE_STRING x2,DWORD x3) {
847 FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",debugstr_w(x1->Buffer),debugstr_w(x2->Buffer),x3);
851 /******************************************************************************
854 void __cdecl DbgPrint(LPCSTR fmt,LPVOID args) {
857 wvsprintf32A(buf,fmt,&args);
858 MSG("DbgPrint says: %s",buf);
859 /* hmm, raise exception? */