Changeset 4059 for trunk/src/NTDLL/rtl.cpp
- Timestamp:
- Aug 20, 2000, 5:17:00 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/NTDLL/rtl.cpp
r3930 r4059 1 /* $Id: rtl.cpp,v 1.1 0 2000-08-02 16:31:34 birdExp $ */1 /* $Id: rtl.cpp,v 1.11 2000-08-20 15:16:59 phaller Exp $ */ 2 2 3 3 /* … … 17 17 18 18 #include <stdlib.h> 19 #include <stdio.h> 19 20 #include <string.h> 20 21 #include <odinwrap.h> 21 22 #include <os2win.h> 23 24 #include "debugtools.h" 22 25 #include "ntdll.h" 23 26 24 27 #include "winuser.h" 28 #include "windef.h" 25 29 #include "winerror.h" 30 #include "stackframe.h" 31 #include "ntddk.h" 32 #include "imagehlp.h" 26 33 #include "winreg.h" 27 34 #include "heapstring.h" 28 35 36 #include <misc.h> 37 38 29 39 ODINDEBUGCHANNEL(NTDLL-RTL) 40 41 42 /* 43 * WINE Adoption - we won't support the Win64 model. 44 */ 45 #define SIZE_T UINT 30 46 31 47 /* … … 523 539 * RtlFormatCurrentUserKeyPath [NTDLL.371] 524 540 */ 525 DWORD WINAPI RtlFormatCurrentUserKeyPath(DWORD x) 526 { 527 dprintf(("NTDLL: RtlFormatCurrentUserKeyPath(%08xh) not implemented.\n", 528 x)); 529 530 return 1; 541 DWORD WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING pustrKeyPath) 542 { 543 dprintf(("NTDLL: RtlFormatCurrentUserKeyPath(%08xh) not correctly implemented.\n", 544 pustrKeyPath)); 545 546 LPSTR Path = "\\REGISTRY\\USER\\.DEFAULT"; 547 ANSI_STRING AnsiPath; 548 549 RtlInitAnsiString(&AnsiPath, Path); 550 return RtlAnsiStringToUnicodeString(pustrKeyPath, &AnsiPath, TRUE); 531 551 } 532 552 … … 535 555 * RtlOpenCurrentUser [NTDLL] 536 556 */ 537 DWORD WINAPI RtlOpenCurrentUser(DWORD x1, 538 DWORD *x2) 557 ODINFUNCTION2(DWORD, RtlOpenCurrentUser, 558 ACCESS_MASK,DesiredAccess, 559 PHANDLE, pKeyHandle) 539 560 { 540 561 /* Note: this is not the correct solution, 541 562 * But this works pretty good on wine and NT4.0 binaries 542 563 */ 543 if (x1 == 0x2000000 ) 564 565 if (DesiredAccess == 0x2000000 ) 544 566 { 545 * x2= HKEY_CURRENT_USER;567 *pKeyHandle = HKEY_CURRENT_USER; 546 568 return TRUE; 547 569 } 548 570 549 571 return FALSE; 572 /* PH 2000/08/18 currently disabled 573 OBJECT_ATTRIBUTES ObjectAttributes; 574 UNICODE_STRING ObjectName; 575 NTSTATUS ret; 576 577 RtlFormatCurrentUserKeyPath(&ObjectName); 578 InitializeObjectAttributes(&ObjectAttributes,&ObjectName,OBJ_CASE_INSENSITIVE,0, NULL); 579 ret = NtOpenKey(pKeyHandle, DesiredAccess, &ObjectAttributes); 580 RtlFreeUnicodeString(&ObjectName); 581 return ret; 582 */ 550 583 } 551 584 … … 576 609 577 610 611 /*********************************************************************** 612 * RtlImageNtHeader (NTDLL) 613 */ 614 PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule) 615 { 616 IMAGE_NT_HEADERS *ret = NULL; 617 IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)hModule; 618 619 if (dos->e_magic == IMAGE_DOS_SIGNATURE) 620 { 621 ret = (IMAGE_NT_HEADERS *)((char *)dos + dos->e_lfanew); 622 if (ret->Signature != IMAGE_NT_SIGNATURE) ret = NULL; 623 } 624 return ret; 625 } 626 578 627 /****************************************************************************** 579 628 * RtlCreateEnvironment [NTDLL] … … 617 666 } 618 667 668 /****************************************************************************** 669 * RtlInitializeGenericTable [NTDLL] 670 */ 671 DWORD WINAPI RtlInitializeGenericTable(void) 672 { 673 FIXME("\n"); 674 return 0; 675 } 676 677 /****************************************************************************** 678 * RtlInitializeBitMap [NTDLL] 679 * 680 */ 681 NTSTATUS WINAPI RtlInitializeBitMap(DWORD x1,DWORD x2,DWORD x3) 682 { 683 FIXME("(0x%08lx,0x%08lx,0x%08lx),stub\n",x1,x2,x3); 684 return 0; 685 } 686 687 /****************************************************************************** 688 * RtlSetBits [NTDLL] 689 * 690 */ 691 NTSTATUS WINAPI RtlSetBits(DWORD x1,DWORD x2,DWORD x3) 692 { 693 FIXME("(0x%08lx,0x%08lx,0x%08lx),stub\n",x1,x2,x3); 694 return 0; 695 } 696 697 /****************************************************************************** 698 * RtlFindClearBits [NTDLL] 699 * 700 */ 701 NTSTATUS WINAPI RtlFindClearBits(DWORD x1,DWORD x2,DWORD x3) 702 { 703 FIXME("(0x%08lx,0x%08lx,0x%08lx),stub\n",x1,x2,x3); 704 return 0; 705 } 706 707 /****************************************************************************** 708 * RtlClearBits [NTDLL] 709 * 710 */ 711 NTSTATUS WINAPI RtlClearBits(DWORD x1,DWORD x2,DWORD x3) 712 { 713 FIXME("(0x%08lx,0x%08lx,0x%08lx),stub\n",x1,x2,x3); 714 return 0; 715 } 716 717 /****************************************************************************** 718 * RtlCopyMemory [NTDLL] 719 * 720 */ 721 #undef RtlCopyMemory 722 VOID WINAPI RtlCopyMemory( VOID *Destination, CONST VOID *Source, SIZE_T Length ) 723 { 724 memcpy(Destination, Source, Length); 725 } 726 727 /****************************************************************************** 728 * RtlMoveMemory [NTDLL] 729 */ 730 #undef RtlMoveMemory 731 VOID WINAPI RtlMoveMemory( VOID *Destination, CONST VOID *Source, SIZE_T Length ) 732 { 733 memmove(Destination, Source, Length); 734 } 735 736 /****************************************************************************** 737 * RtlFillMemory [NTDLL] 738 */ 739 #undef RtlFillMemory 740 VOID WINAPI RtlFillMemory( VOID *Destination, SIZE_T Length, UINT Fill ) 741 { 742 memset(Destination, Fill, Length); 743 } 744 745 /****************************************************************************** 746 * RtlZeroMemory [NTDLL] 747 */ 748 #undef RtlZeroMemory 749 VOID WINAPI RtlZeroMemory( VOID *Destination, SIZE_T Length ) 750 { 751 memset(Destination, 0, Length); 752 } 753 754 /****************************************************************************** 755 * RtlCompareMemory [NTDLL] 756 */ 757 SIZE_T WINAPI RtlCompareMemory( const VOID *Source1, const VOID *Source2, SIZE_T Length) 758 { 759 int i; 760 for(i=0; (i<Length) && (((LPBYTE)Source1)[i]==((LPBYTE)Source2)[i]); i++); 761 return i; 762 } 763 764 /****************************************************************************** 765 * RtlAssert [NTDLL] 766 * 767 * Not implemented in non-debug versions. 768 */ 769 void WINAPI RtlAssert(LPVOID x1,LPVOID x2,DWORD x3, DWORD x4) 770 { 771 FIXME("(%p,%p,0x%08lx,0x%08lx),stub\n",x1,x2,x3,x4); 772 } 619 773 620 774 /*****************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.