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(LPANSI_STRING oem
,LPUNICODE_STRING uni
,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 BOOL32 WINAPI
RtlGetNtProductType(LPDWORD type
)
459 FIXME(ntdll
, "(%p): stub\n", type
);
460 *type
=3; /* dunno. 1 for client, 3 for server? */
464 /**************************************************************************
465 * RtlUpcaseUnicodeString [NTDLL.520]
467 DWORD WINAPI
RtlUpcaseUnicodeString(LPUNICODE_STRING dest
,LPUNICODE_STRING src
,BOOL32 doalloc
)
474 dest
->MaximumLength
= len
;
475 dest
->Buffer
= (LPWSTR
)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY
,len
);
477 return STATUS_NO_MEMORY
;
480 if (dest
->MaximumLength
< len
)
481 return STATUS_BUFFER_OVERFLOW
;
482 s
=dest
->Buffer
;t
=src
->Buffer
;
483 /* len is in bytes */
484 for (i
=0;i
<len
/2;i
++)
485 s
[i
] = towupper(t
[i
]);
486 return STATUS_SUCCESS
;
489 /**************************************************************************
490 * RtlxOemStringToUnicodeSize [NTDLL.549]
492 UINT32 WINAPI
RtlxOemStringToUnicodeSize(LPSTRING str
)
494 return str
->Length
*2+2;
497 /**************************************************************************
498 * RtlxAnsiStringToUnicodeSize [NTDLL.548]
500 UINT32 WINAPI
RtlxAnsiStringToUnicodeSize(LPANSI_STRING str
)
502 return str
->Length
*2+2;
505 /**************************************************************************
506 * RtlIsTextUnicode [NTDLL.417]
508 * Apply various feeble heuristics to guess whether
509 * the text buffer contains Unicode.
510 * FIXME: should implement more tests.
512 DWORD WINAPI
RtlIsTextUnicode(LPVOID buf
, DWORD len
, DWORD
*pf
)
515 DWORD flags
= -1, out_flags
= 0;
522 * Apply various tests to the text string. According to the
523 * docs, each test "passed" sets the corresponding flag in
524 * the output flags. But some of the tests are mutually
525 * exclusive, so I don't see how you could pass all tests ...
528 /* Check for an odd length ... pass if even. */
530 out_flags
|= IS_TEXT_UNICODE_ODD_LENGTH
;
532 /* Check for the special unicode marker byte. */
534 out_flags
|= IS_TEXT_UNICODE_SIGNATURE
;
537 * Check whether the string passed all of the tests.
539 flags
&= ITU_IMPLEMENTED_TESTS
;
540 if ((out_flags
& flags
) != flags
)
548 /**************************************************************************
549 * RtlDosPathNameToNtPathName_U [NTDLL.338]
551 * FIXME: convert to UNC or whatever is expected here
553 BOOL32 WINAPI
RtlDosPathNameToNtPathName_U(
554 LPWSTR from
,LPUNICODE_STRING us
,DWORD x2
,DWORD x3
)
556 LPSTR fromA
= HEAP_strdupWtoA(GetProcessHeap(),0,from
);
558 FIXME(ntdll
,"(%s,%p,%08lx,%08lx)\n",fromA
,us
,x2
,x3
);
560 RtlInitUnicodeString(us
,HEAP_strdupW(GetProcessHeap(),0,from
));
564 /**************************************************************************
565 * NtOpenFile [NTDLL.127]
567 DWORD WINAPI
NtOpenFile(DWORD x1
,DWORD flags
,DWORD x3
,DWORD x4
,DWORD alignment
,DWORD x6
)
569 FIXME(ntdll
,"(%08lx,0x%08lx,%08lx,%08lx,%08lx,%08lx): stub\n",
570 x1
,flags
,x3
,x4
,alignment
,x6
);
571 /* returns file io completion status */
575 /**************************************************************************
576 * NtCreateFile [NTDLL.73]
579 WINAPI
NtCreateFile(PHANDLE filehandle
,DWORD access
,LPLONG attributes
,
580 LPLONG status
,LPVOID x5
,DWORD x6
,DWORD x7
,
581 LPLONG x8
,DWORD x9
,DWORD x10
,LPLONG x11
)
583 /* parameter count checked with wine debugger */
584 FIXME(ntdll
,"(%p,%lx,%lx,%lx,%p,%08lx,%08lx,%p,%08lx,%08lx,%p): empty stub\n",
585 filehandle
,access
,*attributes
,*status
,x5
,x6
,x7
,x8
,x9
,x10
,x11
);
588 /**************************************************************************
589 * NtCreateTimer [NTDLL.87]
591 DWORD WINAPI
NtCreateTimer(DWORD x1
, DWORD x2
, DWORD x3
)
593 /* parameter count checked (obscure doc from internet said 4, debugger showed only 3) */
594 FIXME(ntdll
,"(%08lx,%08lx,%08lx): empty stub\n",
598 /**************************************************************************
599 * NtSetTimer [NTDLL.221]
601 DWORD WINAPI
NtSetTimer(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,
604 /* parameter count checked (obscure doc from internet said 7, debugger showed only 6) */
605 FIXME(ntdll
,"(%08lx,%08lx,%08lx,%08lx,%08lx,%08lx): empty stub\n",
610 /**************************************************************************
611 * NtCreateEvent [NTDLL.71]
614 WINAPI
NtCreateEvent(PHANDLE eventhandle
, DWORD desiredaccess
,
615 DWORD attributes
, DWORD eventtype
, DWORD initialstate
)
617 /* parameter count checked with wine debugger */
618 FIXME(ntdll
,"(%p,%08lx,%08lx,%08lx,%08lx): empty stub\n",
619 eventhandle
,desiredaccess
,attributes
,eventtype
,initialstate
);
622 /**************************************************************************
623 * NtDeviceIoControlFile [NTDLL.94]
626 WINAPI
NtDeviceIoControlFile(HANDLE32 filehandle
, HANDLE32 event
,
627 DWORD x3
, DWORD x4
, DWORD x5
, UINT32 iocontrolcode
,
628 LPVOID inputbuffer
, DWORD inputbufferlength
,
629 LPVOID outputbuffer
, DWORD outputbufferlength
)
631 /* parameter count checked with wine debugger */
632 FIXME(ntdll
,"(%x,%x,%08lx,%08lx,%08lx,%08x,%lx,%lx): empty stub\n",
633 filehandle
,event
,x3
,x4
,x5
,iocontrolcode
,inputbufferlength
,outputbufferlength
);
636 /**************************************************************************
637 * NTDLL_chkstk [NTDLL.862]
640 VOID WINAPI
NTDLL_chkstk (DWORD x1
, DWORD x2
, DWORD x3
, DWORD x4
,
641 DWORD x5
, DWORD x6
, DWORD x7
, DWORD x8
,
644 /* FIXME: should subtract %eax bytes from stack pointer */
645 FIXME(ntdll
, "(void): stub\n");
649 /**************************************************************************
650 * NtOpenDirectoryObject [NTDLL.124]
652 DWORD WINAPI
NtOpenDirectoryObject(DWORD x1
,DWORD x2
,DWORD x3
)
654 FIXME(ntdll
,"(%lx,%lx,%lx): stub\n",x1
,x2
,x3
);
659 /******************************************************************************
660 * NtQueryDirectoryObject [NTDLL.149]
662 DWORD WINAPI
NtQueryDirectoryObject( DWORD x1
, DWORD x2
, DWORD x3
, DWORD x4
,
663 DWORD x5
, DWORD x6
, DWORD x7
)
665 FIXME(ntdll
,"(%lx,%lx,%lx,%lx,%lx,%lx,%lx): stub\n",x1
,x2
,x3
,x4
,x5
,x6
,x7
);
670 /**************************************************************************
671 * RtlFreeAnsiString [NTDLL.373]
673 VOID WINAPI
RtlFreeAnsiString(LPANSI_STRING AnsiString
)
675 if( AnsiString
->Buffer
)
676 HeapFree( GetProcessHeap(),0,AnsiString
->Buffer
);
680 /******************************************************************************
681 * NtQuerySystemInformation [NTDLL.168]
683 DWORD WINAPI
NtQuerySystemInformation( DWORD x1
, DWORD x2
, DWORD x3
, DWORD x4
)
685 FIXME(ntdll
,"(%lx,%lx,%lx,%lx): stub\n",x1
,x2
,x3
,x4
);
690 /******************************************************************************
691 * NtQueryObject [NTDLL.161]
693 DWORD WINAPI
NtQueryObject( DWORD x1
, DWORD x2
,DWORD x3
, DWORD x4
, DWORD x5
)
695 FIXME(ntdll
,"(0x%lx,%lx,%lx,%lx,%lx): stub\n",x1
,x2
,x3
,x4
,x5
);
700 /******************************************************************************
701 * RtlTimeToElapsedTimeFields [NTDLL.502]
703 DWORD WINAPI
RtlTimeToElapsedTimeFields( DWORD x1
, DWORD x2
)
705 FIXME(ntdll
,"(%lx,%lx): stub\n",x1
,x2
);
710 /******************************************************************************
711 * NtSetInformationProcess [NTDLL.207]
713 DWORD WINAPI
NtSetInformationProcess( DWORD x1
, DWORD x2
, DWORD x3
, DWORD x4
)
715 FIXME(ntdll
,"(%lx,%lx,%lx,%lx): stub\n",x1
,x2
,x3
,x4
);
719 /******************************************************************************
720 * NtFsControlFile [NTDLL.108]
722 VOID WINAPI
NtFsControlFile(VOID
)
724 FIXME(ntdll
,"(void): stub\n");
727 /******************************************************************************
728 * RtlExtendedLargeIntegerDivide [NTDLL.359]
730 INT32 WINAPI
RtlExtendedLargeIntegerDivide(
731 LARGE_INTEGER dividend
,
735 #if SIZEOF_LONG_LONG==8
736 long long x1
= *(long long*)÷nd
;
739 *rest
= x1
% divisor
;
742 FIXME(ntdll
,"((%d<<32)+%d,%d,%p), implement this using normal integer arithmetic!\n",dividend
.HighPart
,dividend
.LowPart
,divisor
,rest
);
747 /******************************************************************************
748 * RtlExtendedLargeIntegerMultiply [NTDLL.359]
749 * Note: This even works, since gcc returns 64bit values in eax/edx just like
750 * the caller expects. However... The relay code won't grok this I think.
752 long long /*LARGE_INTEGER*/
753 WINAPI
RtlExtendedIntegerMultiply(
754 LARGE_INTEGER factor1
,INT32 factor2
756 #if SIZEOF_LONG_LONG==8
757 return (*(long long*)&factor1
)*factor2
;
759 FIXME(ntdll
,"((%d<<32)+%d,%ld), implement this using normal integer arithmetic!\n",factor1
.HighPart
,factor1
.LowPart
,factor2
);
764 DWORD WINAPI
NtOpenKey(DWORD x1
,DWORD x2
,LPUNICODE_STRING key
) {
765 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx(%s)),stub!\n",x1
,x2
,key
,key
->Buffer
);
766 return RegOpenKey32W(HKEY_LOCAL_MACHINE
,key
->Buffer
,x1
);
769 DWORD WINAPI
NtQueryValueKey(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
,DWORD x6
) {
770 FIXME(ntdll
,"(%08lx,%08lx,%08lx,%08lx,%08lx,%08lx),stub!\n",
776 DWORD WINAPI
NtQueryTimerResolution(DWORD x1
,DWORD x2
,DWORD x3
) {
777 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx), stub!\n",x1
,x2
,x3
);
781 /**************************************************************************
784 DWORD WINAPI
NtClose(DWORD x1
) {
785 FIXME(ntdll
,"(0x%08lx),stub!\n",x1
);
788 /******************************************************************************
789 * NtQueryInformationProcess [NTDLL.]
792 DWORD WINAPI
NtQueryInformationProcess(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
) {
793 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
798 /******************************************************************************
799 * NtQueryInformationThread [NTDLL.]
802 DWORD WINAPI
NtQueryInformationThread(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
) {
803 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
808 /******************************************************************************
809 * NtQueryInformationToken [NTDLL.156]
812 DWORD WINAPI
NtQueryInformationToken(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
) {
813 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
818 /******************************************************************************
819 * RtlFormatCurrentUserKeyPath [NTDLL.371]
822 DWORD WINAPI
RtlFormatCurrentUserKeyPath()
824 FIXME(ntdll
,"(): stub\n");
827 DWORD WINAPI
RtlOpenCurrentUser(DWORD x1
, DWORD
*x2
)
829 /* Note: this is not the correct solution,
830 * But this works pretty good on wine and NT4.0 binaries
832 if ( x1
== 0x2000000 ) {
833 *x2
= HKEY_CURRENT_USER
;
839 /******************************************************************************
840 * RtlAllocateAndInitializeSid [NTDLL.265]
843 BOOL32 WINAPI
RtlAllocateAndInitializeSid (LPSID_IDENTIFIER_AUTHORITY pIdentifierAuthority
,DWORD nSubAuthorityCount
,
844 DWORD x3
,DWORD x4
,DWORD x5
,DWORD x6
,DWORD x7
,DWORD x8
,DWORD x9
,DWORD x10
, LPSID pSid
)
845 { FIXME(ntdll
,"(%p,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,%p),stub!\n",
846 pIdentifierAuthority
,nSubAuthorityCount
,x3
,x4
,x5
,x6
,x7
,x8
,x9
,x10
,pSid
);
849 /******************************************************************************
850 * RtlEqualSid [NTDLL.352]
853 DWORD WINAPI
RtlEqualSid(DWORD x1
,DWORD x2
)
854 { FIXME(ntdll
,"(0x%08lx,0x%08lx),stub!\n", x1
,x2
);
858 /******************************************************************************
859 * RtlFreeSid [NTDLL.376]
861 DWORD WINAPI
RtlFreeSid(DWORD x1
)
862 { FIXME(ntdll
,"(0x%08lx),stub!\n", x1
);
866 /******************************************************************************
867 * NtCreatePagingFile [NTDLL]
869 DWORD WINAPI
NtCreatePagingFile(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
) {
870 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
,x4
);
874 /******************************************************************************
875 * RtlGetDaclSecurityDescriptor [NTDLL]
877 DWORD WINAPI
RtlGetDaclSecurityDescriptor(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
) {
878 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
,x4
);
882 /******************************************************************************
883 * NtDuplicateObject [NTDLL]
885 DWORD WINAPI
NtDuplicateObject(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
,
888 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
,x4
,x5
,x6
,x7
);
892 /******************************************************************************
893 * RtlCreateEnvironment [NTDLL]
895 DWORD WINAPI
RtlCreateEnvironment(DWORD x1
,DWORD x2
) {
896 FIXME(ntdll
,"(0x%08lx,0x%08lx),stub!\n",x1
,x2
);
900 /******************************************************************************
901 * RtlDestroyEnvironment [NTDLL]
903 DWORD WINAPI
RtlDestroyEnvironment(DWORD x
) {
904 FIXME(ntdll
,"(0x%08lx),stub!\n",x
);
908 /******************************************************************************
909 * RtlQueryEnvironmentVariable_U [NTDLL]
911 DWORD WINAPI
RtlQueryEnvironmentVariable_U(DWORD x1
,DWORD x2
,DWORD x3
) {
912 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
);
916 /******************************************************************************
917 * RtlSetEnvironmentVariable [NTDLL]
919 DWORD WINAPI
RtlSetEnvironmentVariable(DWORD x1
,DWORD x2
,DWORD x3
) {
920 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
);
924 /******************************************************************************
925 * NtDuplicateToken [NTDLL]
927 DWORD WINAPI
NtDuplicateToken(
928 DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
,DWORD x6
930 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
,x4
,x5
,x6
);
934 /******************************************************************************
935 * NtAdjustPrivilegesToken [NTDLL]
937 DWORD WINAPI
NtAdjustPrivilegesToken(
938 DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
,DWORD x6
940 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
,x4
,x5
,x6
);
944 /******************************************************************************
945 * NtOpenProcessToken [NTDLL]
947 DWORD WINAPI
NtOpenProcessToken(DWORD x1
,DWORD x2
,DWORD x3
) {
948 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
);
952 /******************************************************************************
953 * NtSetInformationThread [NTDLL]
955 DWORD WINAPI
NtSetInformationThread(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
) {
956 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
,x4
);
960 /******************************************************************************
961 * NtOpenThreadToken [NTDLL]
963 DWORD WINAPI
NtOpenThreadToken(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
) {
964 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
,x4
);
968 /******************************************************************************
969 * RtlNewSecurityObject [NTDLL]
971 DWORD WINAPI
RtlNewSecurityObject(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
,DWORD x6
) {
972 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
,x4
,x5
,x6
);
976 /******************************************************************************
977 * RtlDeleteSecurityObject [NTDLL]
979 DWORD WINAPI
RtlDeleteSecurityObject(DWORD x1
) {
980 FIXME(ntdll
,"(0x%08lx),stub!\n",x1
);
984 /******************************************************************************
985 * NtSetVolumeInformationFile [NTDLL]
987 DWORD WINAPI
NtSetVolumeInformationFile(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,
990 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
,x4
,x5
);
994 /******************************************************************************
995 * NtCreatePort [NTDLL]
997 DWORD WINAPI
NtCreatePort(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
,DWORD x5
) {
998 FIXME(ntdll
,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",x1
,x2
,x3
,x4
,x5
);