4 * Copyright 1996 Marcus Meissner
23 /**************************************************************************
24 * RtlLengthRequiredSid [NTDLL.427]
26 DWORD WINAPI
RtlLengthRequiredSid(DWORD nrofsubauths
)
28 return sizeof(DWORD
)*nrofsubauths
+sizeof(SID
);
31 /**************************************************************************
32 * RtlLengthSid [NTDLL.429]
34 DWORD WINAPI
RtlLengthSid(LPSID sid
)
35 { TRACE(ntdll
,"sid=%p\n",sid
);
38 return sizeof(DWORD
)*sid
->SubAuthorityCount
+sizeof(SID
);
41 /**************************************************************************
42 * RtlCreateAcl [NTDLL.306]
45 * This should return NTSTATUS
47 DWORD WINAPI
RtlCreateAcl(LPACL acl
,DWORD size
,DWORD rev
)
49 if (rev
!=ACL_REVISION
)
50 return STATUS_INVALID_PARAMETER
;
52 return STATUS_BUFFER_TOO_SMALL
;
54 return STATUS_INVALID_PARAMETER
;
56 memset(acl
,'\0',sizeof(ACL
));
57 acl
->AclRevision
= rev
;
63 /**************************************************************************
64 * RtlFirstFreeAce [NTDLL.370]
65 * looks for the AceCount+1 ACE, and if it is still within the alloced
66 * ACL, return a pointer to it
68 BOOL32 WINAPI
RtlFirstFreeAce(LPACL acl
,LPACE_HEADER
*x
)
74 ace
= (LPACE_HEADER
)(acl
+1);
75 for (i
=0;i
<acl
->AceCount
;i
++) {
76 if ((DWORD
)ace
>=(((DWORD
)acl
)+acl
->AclSize
))
78 ace
= (LPACE_HEADER
)(((BYTE
*)ace
)+ace
->AceSize
);
80 if ((DWORD
)ace
>=(((DWORD
)acl
)+acl
->AclSize
))
86 /**************************************************************************
87 * RtlAddAce [NTDLL.260]
90 WINAPI
RtlAddAce(LPACL acl
,DWORD rev
,DWORD xnrofaces
,
91 LPACE_HEADER acestart
,DWORD acelen
)
93 LPACE_HEADER ace
,targetace
;
96 if (acl
->AclRevision
!= ACL_REVISION
)
97 return STATUS_INVALID_PARAMETER
;
98 if (!RtlFirstFreeAce(acl
,&targetace
))
99 return STATUS_INVALID_PARAMETER
;
100 nrofaces
=0;ace
=acestart
;
101 while (((DWORD
)ace
-(DWORD
)acestart
)<acelen
) {
103 ace
= (LPACE_HEADER
)(((BYTE
*)ace
)+ace
->AceSize
);
105 if ((DWORD
)targetace
+acelen
>(DWORD
)acl
+acl
->AclSize
) /* too much aces */
106 return STATUS_INVALID_PARAMETER
;
107 memcpy((LPBYTE
)targetace
,acestart
,acelen
);
108 acl
->AceCount
+=nrofaces
;
112 /**************************************************************************
113 * RtlCreateSecurityDescriptor [NTDLL.313]
116 WINAPI
RtlCreateSecurityDescriptor(LPSECURITY_DESCRIPTOR lpsd
,DWORD rev
)
118 if (rev
!=SECURITY_DESCRIPTOR_REVISION
)
119 return STATUS_UNKNOWN_REVISION
;
120 memset(lpsd
,'\0',sizeof(*lpsd
));
121 lpsd
->Revision
= SECURITY_DESCRIPTOR_REVISION
;
125 /**************************************************************************
126 * RtlSetDaclSecurityDescriptor [NTDLL.483]
129 WINAPI
RtlSetDaclSecurityDescriptor ( LPSECURITY_DESCRIPTOR lpsd
,BOOL32 daclpresent
,LPACL dacl
,BOOL32 dacldefaulted
)
131 if (lpsd
->Revision
!=SECURITY_DESCRIPTOR_REVISION
)
132 return STATUS_UNKNOWN_REVISION
;
133 if (lpsd
->Control
& SE_SELF_RELATIVE
)
134 return STATUS_INVALID_SECURITY_DESCR
;
136 lpsd
->Control
&= ~SE_DACL_PRESENT
;
139 lpsd
->Control
|= SE_DACL_PRESENT
;
142 lpsd
->Control
|= SE_DACL_DEFAULTED
;
144 lpsd
->Control
&= ~SE_DACL_DEFAULTED
;
148 /**************************************************************************
149 * RtlSetSaclSecurityDescriptor [NTDLL.488]
152 WINAPI
RtlSetSaclSecurityDescriptor (
153 LPSECURITY_DESCRIPTOR lpsd
,BOOL32 saclpresent
,LPACL sacl
,BOOL32 sacldefaulted
156 if (lpsd
->Revision
!=SECURITY_DESCRIPTOR_REVISION
)
157 return STATUS_UNKNOWN_REVISION
;
158 if (lpsd
->Control
& SE_SELF_RELATIVE
)
159 return STATUS_INVALID_SECURITY_DESCR
;
161 lpsd
->Control
&= ~SE_SACL_PRESENT
;
164 lpsd
->Control
|= SE_SACL_PRESENT
;
167 lpsd
->Control
|= SE_SACL_DEFAULTED
;
169 lpsd
->Control
&= ~SE_SACL_DEFAULTED
;
173 /**************************************************************************
174 * RtlSetOwnerSecurityDescriptor [NTDLL.487]
177 WINAPI
RtlSetOwnerSecurityDescriptor (LPSECURITY_DESCRIPTOR lpsd
,LPSID owner
,BOOL32 ownerdefaulted
)
179 if (lpsd
->Revision
!=SECURITY_DESCRIPTOR_REVISION
)
180 return STATUS_UNKNOWN_REVISION
;
181 if (lpsd
->Control
& SE_SELF_RELATIVE
)
182 return STATUS_INVALID_SECURITY_DESCR
;
186 lpsd
->Control
|= SE_OWNER_DEFAULTED
;
188 lpsd
->Control
&= ~SE_OWNER_DEFAULTED
;
192 /**************************************************************************
193 * RtlSetGroupSecurityDescriptor [NTDLL.485]
196 WINAPI
RtlSetGroupSecurityDescriptor (LPSECURITY_DESCRIPTOR lpsd
,LPSID group
,BOOL32 groupdefaulted
)
198 if (lpsd
->Revision
!=SECURITY_DESCRIPTOR_REVISION
)
199 return STATUS_UNKNOWN_REVISION
;
200 if (lpsd
->Control
& SE_SELF_RELATIVE
)
201 return STATUS_INVALID_SECURITY_DESCR
;
205 lpsd
->Control
|= SE_GROUP_DEFAULTED
;
207 lpsd
->Control
&= ~SE_GROUP_DEFAULTED
;
212 /**************************************************************************
213 * RtlNormalizeProcessParams [NTDLL.441]
215 LPVOID WINAPI
RtlNormalizeProcessParams(LPVOID x
)
217 FIXME(ntdll
,"(%p), stub\n",x
);
221 /**************************************************************************
222 * RtlInitializeSid [NTDLL.410]
224 DWORD WINAPI
RtlInitializeSid(LPSID lpsid
,LPSID_IDENTIFIER_AUTHORITY lpsidauth
,
229 if (a
>=SID_MAX_SUB_AUTHORITIES
)
231 lpsid
->SubAuthorityCount
= a
;
232 lpsid
->Revision
= SID_REVISION
;
233 memcpy(&(lpsid
->IdentifierAuthority
),lpsidauth
,sizeof(SID_IDENTIFIER_AUTHORITY
));
237 /**************************************************************************
238 * RtlSubAuthoritySid [NTDLL.497]
240 LPDWORD WINAPI
RtlSubAuthoritySid(LPSID lpsid
,DWORD nr
)
242 return &(lpsid
->SubAuthority
[nr
]);
245 /**************************************************************************
246 * RtlSubAuthorityCountSid [NTDLL.496]
248 LPBYTE WINAPI
RtlSubAuthorityCountSid(LPSID lpsid
)
250 return ((LPBYTE
)lpsid
)+1;
253 /**************************************************************************
254 * RtlCopySid [NTDLL.302]
256 DWORD WINAPI
RtlCopySid(DWORD len
,LPSID to
,LPSID from
)
259 if (len
<(from
->SubAuthorityCount
*4+8))
260 return STATUS_BUFFER_TOO_SMALL
;
261 memmove(to
,from
,from
->SubAuthorityCount
*4+8);
262 return STATUS_SUCCESS
;
265 /**************************************************************************
266 * RtlAnsiStringToUnicodeString [NTDLL.269]
269 WINAPI
RtlAnsiStringToUnicodeString(LPUNICODE_STRING uni
,LPANSI_STRING ansi
,BOOL32 doalloc
)
271 DWORD unilen
= (ansi
->Length
+1)*sizeof(WCHAR
);
274 return STATUS_INVALID_PARAMETER_2
;
275 uni
->Length
= unilen
;
277 uni
->MaximumLength
= unilen
;
278 uni
->Buffer
= HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,unilen
);
280 return STATUS_NO_MEMORY
;
282 if (unilen
>uni
->MaximumLength
)
283 return STATUS_BUFFER_OVERFLOW
;
284 lstrcpynAtoW(uni
->Buffer
,ansi
->Buffer
,unilen
/2);
285 return STATUS_SUCCESS
;
288 /**************************************************************************
289 * RtlOemStringToUnicodeString [NTDLL.447]
292 WINAPI
RtlOemStringToUnicodeString(LPUNICODE_STRING uni
,LPSTRING ansi
,BOOL32 doalloc
)
294 DWORD unilen
= (ansi
->Length
+1)*sizeof(WCHAR
);
297 return STATUS_INVALID_PARAMETER_2
;
298 uni
->Length
= unilen
;
300 uni
->MaximumLength
= unilen
;
301 uni
->Buffer
= HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,unilen
);
303 return STATUS_NO_MEMORY
;
305 if (unilen
>uni
->MaximumLength
)
306 return STATUS_BUFFER_OVERFLOW
;
307 lstrcpynAtoW(uni
->Buffer
,ansi
->Buffer
,unilen
/2);
308 return STATUS_SUCCESS
;
310 /**************************************************************************
311 * RtlMultiByteToUnicodeN [NTDLL.436]
312 * FIXME: multibyte support
315 WINAPI
RtlMultiByteToUnicodeN(LPWSTR unistr
,DWORD unilen
,LPDWORD reslen
,LPSTR oemstr
,DWORD oemlen
)
323 x
=(LPWSTR
)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,(len
+1)*sizeof(WCHAR
));
324 lstrcpynAtoW(x
,oemstr
,len
+1);
325 memcpy(unistr
,x
,len
*2);
326 if (reslen
) *reslen
= len
*2;
330 /**************************************************************************
331 * RtlOemToUnicodeN [NTDLL.448]
334 WINAPI
RtlOemToUnicodeN(LPWSTR unistr
,DWORD unilen
,LPDWORD reslen
,LPSTR oemstr
,DWORD oemlen
)
342 x
=(LPWSTR
)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,(len
+1)*sizeof(WCHAR
));
343 lstrcpynAtoW(x
,oemstr
,len
+1);
344 memcpy(unistr
,x
,len
*2);
345 if (reslen
) *reslen
= len
*2;
349 /**************************************************************************
350 * RtlInitAnsiString [NTDLL.399]
352 VOID WINAPI
RtlInitAnsiString(LPANSI_STRING target
,LPCSTR source
)
354 target
->Length
= target
->MaximumLength
= 0;
355 target
->Buffer
= (LPSTR
)source
;
358 target
->Length
= lstrlen32A(target
->Buffer
);
359 target
->MaximumLength
= target
->Length
+1;
361 /**************************************************************************
362 * RtlInitString [NTDLL.402]
364 VOID WINAPI
RtlInitString(LPSTRING target
,LPCSTR source
)
366 target
->Length
= target
->MaximumLength
= 0;
367 target
->Buffer
= (LPSTR
)source
;
370 target
->Length
= lstrlen32A(target
->Buffer
);
371 target
->MaximumLength
= target
->Length
+1;
374 /**************************************************************************
375 * RtlInitUnicodeString [NTDLL.403]
377 VOID WINAPI
RtlInitUnicodeString(LPUNICODE_STRING target
,LPCWSTR source
)
379 target
->Length
= target
->MaximumLength
= 0;
380 target
->Buffer
= (LPWSTR
)source
;
383 target
->Length
= lstrlen32W(target
->Buffer
)*2;
384 target
->MaximumLength
= target
->Length
+2;
387 /**************************************************************************
388 * RtlFreeUnicodeString [NTDLL.377]
390 VOID WINAPI
RtlFreeUnicodeString(LPUNICODE_STRING str
)
393 HeapFree(GetProcessHeap(),0,str
->Buffer
);
396 /**************************************************************************
397 * RtlUnicodeToOemN [NTDLL.515]
400 WINAPI
RtlUnicodeToOemN(LPSTR oemstr
,DWORD oemlen
,LPDWORD reslen
,LPWSTR unistr
,DWORD unilen
)
408 x
=(LPSTR
)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,len
+1);
409 lstrcpynWtoA(x
,unistr
,len
+1);
410 memcpy(oemstr
,x
,len
);
411 if (reslen
) *reslen
= len
;
415 /**************************************************************************
416 * RtlUnicodeStringToOemString [NTDLL.511]
419 WINAPI
RtlUnicodeStringToOemString(LPANSI_STRING oem
,LPUNICODE_STRING uni
,BOOL32 alloc
)
422 oem
->Buffer
= (LPSTR
)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,uni
->Length
/2)+1;
423 oem
->MaximumLength
= uni
->Length
/2+1;
425 oem
->Length
= uni
->Length
/2;
426 lstrcpynWtoA(oem
->Buffer
,uni
->Buffer
,uni
->Length
/2+1);
430 /**************************************************************************
431 * RtlUnicodeStringToAnsiString [NTDLL.507]
434 WINAPI
RtlUnicodeStringToAnsiString(LPUNICODE_STRING uni
,LPANSI_STRING oem
,BOOL32 alloc
)
437 oem
->Buffer
= (LPSTR
)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,uni
->Length
/2)+1;
438 oem
->MaximumLength
= uni
->Length
/2+1;
440 oem
->Length
= uni
->Length
/2;
441 lstrcpynWtoA(oem
->Buffer
,uni
->Buffer
,uni
->Length
/2+1);
445 /**************************************************************************
446 * RtlNtStatusToDosErro [NTDLL.442]
448 DWORD WINAPI
RtlNtStatusToDosError(DWORD error
)
450 FIXME(ntdll
, "(%lx): map STATUS_ to ERROR_\n",error
);
454 /**************************************************************************
455 * RtlGetNtProductType [NTDLL.390]
457 DWORD WINAPI
RtlGetNtProductType(LPVOID x
)
459 FIXME(ntdll
, "(%p): stub\n", x
);
463 /**************************************************************************
464 * RtlUpcaseUnicodeString [NTDLL.520]
466 DWORD WINAPI
RtlUpcaseUnicodeString(LPUNICODE_STRING dest
,LPUNICODE_STRING src
,BOOL32 doalloc
)
473 dest
->MaximumLength
= len
;
474 dest
->Buffer
= (LPWSTR
)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,len
);
476 return STATUS_NO_MEMORY
;
479 if (dest
->MaximumLength
< len
)
480 return STATUS_BUFFER_OVERFLOW
;
481 s
=dest
->Buffer
;t
=src
->Buffer
;
482 /* len is in bytes */
483 for (i
=0;i
<len
/2;i
++)
484 s
[i
] = towupper(t
[i
]);
485 return STATUS_SUCCESS
;
488 /**************************************************************************
489 * RtlxOemStringToUnicodeSize [NTDLL.549]
491 UINT32 WINAPI
RtlxOemStringToUnicodeSize(LPSTRING str
)
493 return str
->Length
*2+2;
496 /**************************************************************************
497 * RtlxAnsiStringToUnicodeSize [NTDLL.548]
499 UINT32 WINAPI
RtlxAnsiStringToUnicodeSize(LPANSI_STRING str
)
501 return str
->Length
*2+2;
504 /**************************************************************************
505 * RtlIsTextUnicode [NTDLL.417]
507 * Apply various feeble heuristics to guess whether
508 * the text buffer contains Unicode.
509 * FIXME: should implement more tests.
511 DWORD WINAPI
RtlIsTextUnicode(LPVOID buf
, DWORD len
, DWORD
*pf
)
514 DWORD flags
= -1, out_flags
= 0;
521 * Apply various tests to the text string. According to the
522 * docs, each test "passed" sets the corresponding flag in
523 * the output flags. But some of the tests are mutually
524 * exclusive, so I don't see how you could pass all tests ...
527 /* Check for an odd length ... pass if even. */
529 out_flags
|= IS_TEXT_UNICODE_ODD_LENGTH
;
531 /* Check for the special unicode marker byte. */
533 out_flags
|= IS_TEXT_UNICODE_SIGNATURE
;
536 * Check whether the string passed all of the tests.
538 flags
&= ITU_IMPLEMENTED_TESTS
;
539 if ((out_flags
& flags
) != flags
)
547 /**************************************************************************
548 * RtlDosPathNameToNtPathName_U [NTDLL.338]
550 * FIXME: convert to UNC or whatever is expected here
552 BOOL32 WINAPI
RtlDosPathNameToNtPathName_U(
553 LPWSTR from
,LPUNICODE_STRING us
,DWORD x2
,DWORD x3
)
555 LPSTR fromA
= HEAP_strdupWtoA(GetProcessHeap(),0,from
);
557 FIXME(ntdll
,"(%s,%p,%08lx,%08lx)\n",fromA
,us
,x2
,x3
);
559 RtlInitUnicodeString(us
,HEAP_strdupW(GetProcessHeap(),0,from
));
563 /**************************************************************************
564 * NtOpenFile [NTDLL.127]
566 DWORD WINAPI
NtOpenFile(DWORD x1
,DWORD flags
,DWORD x3
,DWORD x4
,DWORD alignment
,DWORD x6
)
568 FIXME(ntdll
,"(%08lx,0x%08lx,%08lx,%08lx,%08lx,%08lx): stub\n",
569 x1
,flags
,x3
,x4
,alignment
,x6
);
570 /* returns file io completion status */
574 /**************************************************************************
575 * NtCreateFile [NTDLL.73]
578 WINAPI
NtCreateFile(PHANDLE filehandle
,DWORD access
,LPLONG attributes
,
579 LPLONG status
,LPVOID x5
,DWORD x6
,DWORD x7
,
580 LPLONG x8
,DWORD x9
,DWORD x10
,LPLONG x11
)
582 /* parameter count checked with wine debugger */
583 FIXME(ntdll
,"(%p,%lx,%lx,%lx,%p,%08lx,%08lx,%p,%08lx,%08lx,%p): empty stub\n",
584 filehandle
,access
,*attributes
,*status
,x5
,x6
,x7
,x8
,x9
,x10
,x11
);
587 /**************************************************************************
588 * NtCreateTimer [NTDLL.87]
590 DWORD WINAPI
NtCreateTimer(DWORD x1
, DWORD x2
, DWORD x3
)
592 /* parameter count checked (obscure doc from internet said 4, debugger showed only 3) */
593 FIXME(ntdll
,"(%08lx,%08lx,%08lx): empty stub\n",
597 /**************************************************************************
598 * NtSetTimer [NTDLL.221]
600 DWORD WINAPI
NtSetTimer(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,
603 /* parameter count checked (obscure doc from internet said 7, debugger showed only 6) */
604 FIXME(ntdll
,"(%08lx,%08lx,%08lx,%08lx,%08lx,%08lx): empty stub\n",
609 /**************************************************************************
610 * NtCreateEvent [NTDLL.71]
613 WINAPI
NtCreateEvent(PHANDLE eventhandle
, DWORD desiredaccess
,
614 DWORD attributes
, DWORD eventtype
, DWORD initialstate
)
616 /* parameter count checked with wine debugger */
617 FIXME(ntdll
,"(%p,%08lx,%08lx,%08lx,%08lx): empty stub\n",
618 eventhandle
,desiredaccess
,attributes
,eventtype
,initialstate
);
621 /**************************************************************************
622 * NtDeviceIoControlFile [NTDLL.94]
625 WINAPI
NtDeviceIoControlFile(HANDLE32 filehandle
, HANDLE32 event
,
626 DWORD x3
, DWORD x4
, DWORD x5
, UINT32 iocontrolcode
,
627 LPVOID inputbuffer
, DWORD inputbufferlength
,
628 LPVOID outputbuffer
, DWORD outputbufferlength
)
630 /* parameter count checked with wine debugger */
631 FIXME(ntdll
,"(%x,%x,%08lx,%08lx,%08lx,%08x,%lx,%lx): empty stub\n",
632 filehandle
,event
,x3
,x4
,x5
,iocontrolcode
,inputbufferlength
,outputbufferlength
);
635 /**************************************************************************
636 * NTDLL_chkstk [NTDLL.862]
639 VOID WINAPI
NTDLL_chkstk (DWORD x1
, DWORD x2
, DWORD x3
, DWORD x4
,
640 DWORD x5
, DWORD x6
, DWORD x7
, DWORD x8
,
643 /* FIXME: should subtract %eax bytes from stack pointer */
644 FIXME(ntdll
, "(void): stub\n");
648 /**************************************************************************
649 * NtOpenDirectoryObject [NTDLL.124]
651 DWORD WINAPI
NtOpenDirectoryObject(DWORD x1
,DWORD x2
,DWORD x3
)
653 FIXME(ntdll
,"(%lx,%lx,%lx): stub\n",x1
,x2
,x3
);
658 /******************************************************************************
659 * NtQueryDirectoryObject [NTDLL.149]
661 DWORD WINAPI
NtQueryDirectoryObject( DWORD x1
, DWORD x2
, DWORD x3
, DWORD x4
,
662 DWORD x5
, DWORD x6
, DWORD x7
)
664 FIXME(ntdll
,"(%lx,%lx,%lx,%lx,%lx,%lx,%lx): stub\n",x1
,x2
,x3
,x4
,x5
,x6
,x7
);
669 /**************************************************************************
670 * RtlFreeAnsiString [NTDLL.373]
672 VOID WINAPI
RtlFreeAnsiString(LPANSI_STRING AnsiString
)
674 if( AnsiString
->Buffer
)
675 HeapFree( GetProcessHeap(),0,AnsiString
->Buffer
);
679 /******************************************************************************
680 * NtQuerySystemInformation [NTDLL.168]
682 DWORD WINAPI
NtQuerySystemInformation( DWORD x1
, DWORD x2
, DWORD x3
, DWORD x4
)
684 FIXME(ntdll
,"(%lx,%lx,%lx,%lx): stub\n",x1
,x2
,x3
,x4
);
689 /******************************************************************************
690 * NtQueryObject [NTDLL.161]
692 DWORD WINAPI
NtQueryObject( DWORD x1
, DWORD x2
,DWORD x3
, DWORD x4
, DWORD x5
)
694 FIXME(ntdll
,"(0x%lx,%lx,%lx,%lx,%lx): stub\n",x1
,x2
,x3
,x4
,x5
);
699 /******************************************************************************
700 * RtlTimeToElapsedTimeFields [NTDLL.502]
702 DWORD WINAPI
RtlTimeToElapsedTimeFields( DWORD x1
, DWORD x2
)
704 FIXME(ntdll
,"(%lx,%lx): stub\n",x1
,x2
);
709 /******************************************************************************
710 * NtSetInformationProcess [NTDLL.207]
712 DWORD WINAPI
NtSetInformationProcess( DWORD x1
, DWORD x2
, DWORD x3
, DWORD x4
)
714 FIXME(ntdll
,"(%lx,%lx,%lx,%lx): stub\n",x1
,x2
,x3
,x4
);
718 /******************************************************************************
719 * NtFsControlFile [NTDLL.108]
721 VOID WINAPI
NtFsControlFile(VOID
)
723 FIXME(ntdll
,"(void): stub\n");
726 /******************************************************************************
727 * RtlExtendedLargeIntegerDivide [NTDLL.359]
729 INT32 WINAPI
RtlExtendedLargeIntegerDivide(
730 LARGE_INTEGER dividend
,
734 #if SIZEOF_LONG_LONG==8
735 long long x1
= *(long long*)÷nd
;
738 *rest
= x1
% divisor
;
741 FIXME(ntdll
,"((%d<<32)+%d,%d,%p), implement this using normal integer arithmetic!\n",dividend
.HighPart
,dividend
.LowPart
,divisor
,rest
);
746 /******************************************************************************
747 * RtlExtendedLargeIntegerMultiply [NTDLL.359]
748 * Note: This even works, since gcc returns 64bit values in eax/edx just like
749 * the caller expects. However... The relay code won't grok this I think.
751 long long /*LARGE_INTEGER*/
752 WINAPI
RtlExtendedIntegerMultiply(
753 LARGE_INTEGER factor1
,INT32 factor2
755 #if SIZEOF_LONG_LONG==8
756 return (*(long long*)&factor1
)*factor2
;
758 FIXME(ntdll
,"((%d<<32)+%d,%ld), implement this using normal integer arithmetic!\n",factor1
.HighPart
,factor1
.LowPart
,factor2
);
763 DWORD WINAPI
NtOpenKey(DWORD x1
,DWORD x2
,DWORD x3
) {
764 FIXME(ntdll
,"(0x%08lx(%s),0x%08lx,0x%08lx),stub!\n",x1
,
765 debugstr_w(*(LPWSTR
*)x1
),x2
,x3
);
767 return RegOpenKey32W(x2
,*(LPWSTR
*)x1
,x3
);
770 DWORD WINAPI
NtQueryValueKey(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
,DWORD x6
) {
771 FIXME(ntdll
,"(%08lx,%08lx,%08lx,%08lx,%08lx,%08lx),stub!\n",
777 DWORD WINAPI
NtQueryTimerResolution(DWORD x1
,DWORD x2
,DWORD x3
) {
778 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx), stub!\n",x1
,x2
,x3
);
782 /**************************************************************************
785 DWORD WINAPI
NtClose(DWORD x1
) {
786 FIXME(ntdll
,"(0x%08lx),stub!\n",x1
);
789 /******************************************************************************
790 * NtQueryInformationProcess [NTDLL.]
793 DWORD WINAPI
NtQueryInformationProcess(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
) {
794 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
799 /******************************************************************************
800 * NtQueryInformationThread [NTDLL.]
803 DWORD WINAPI
NtQueryInformationThread(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
) {
804 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
809 /******************************************************************************
810 * NtQueryInformationToken [NTDLL.156]
813 DWORD WINAPI
NtQueryInformationToken(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
) {
814 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
819 /******************************************************************************
820 * RtlFormatCurrentUserKeyPath [NTDLL.371]
823 DWORD WINAPI
RtlFormatCurrentUserKeyPath()
825 FIXME(ntdll
,"(): stub\n");
828 DWORD WINAPI
RtlOpenCurrentUser(DWORD x1
, DWORD
*x2
)
830 /* Note: this is not the correct solution,
831 * But this works pretty good on wine and NT4.0 binaries
833 if ( x1
== 0x2000000 ) {
834 *x2
= HKEY_CURRENT_USER
;
840 /******************************************************************************
841 * RtlAllocateAndInitializeSid [NTDLL.265]
844 BOOL32 WINAPI
RtlAllocateAndInitializeSid (LPSID_IDENTIFIER_AUTHORITY pIdentifierAuthority
,DWORD nSubAuthorityCount
,
845 DWORD x3
,DWORD x4
,DWORD x5
,DWORD x6
,DWORD x7
,DWORD x8
,DWORD x9
,DWORD x10
, LPSID pSid
)
846 { FIXME(ntdll
,"(%p,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,%p),stub!\n",
847 pIdentifierAuthority
,nSubAuthorityCount
,x3
,x4
,x5
,x6
,x7
,x8
,x9
,x10
,pSid
);
850 /******************************************************************************
851 * RtlEqualSid [NTDLL.352]
854 DWORD WINAPI
RtlEqualSid(DWORD x1
,DWORD x2
)
855 { FIXME(ntdll
,"(0x%08lx,0x%08lx),stub!\n", x1
,x2
);
858 /******************************************************************************
859 * RtlFreeSid [NTDLL.376]
862 DWORD WINAPI
RtlFreeSid(DWORD x1
)
863 { FIXME(ntdll
,"(0x%08lx),stub!\n", x1
);