Changeset 9802 for trunk/src


Ignore:
Timestamp:
Feb 13, 2003, 6:16:50 PM (23 years ago)
Author:
sandervl
Message:

Forward RtlZero/Move/FillMemory to ntdll

Location:
trunk/src/kernel32
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/KERNEL32.CPP

    r9653 r9802  
    1 /* $Id: KERNEL32.CPP,v 1.73 2003-01-10 12:57:12 sandervl Exp $ */
     1/* $Id: KERNEL32.CPP,v 1.74 2003-02-13 17:16:47 sandervl Exp $ */
    22
    33/*
     
    398398
    399399
    400 //******************************************************************************
    401 
    402 /***********************************************************************
    403 *           RtlFillMemory   (KERNEL32.441)
    404 */
    405 VOID WIN32API RtlFillMemory(LPVOID ptr,
    406                             UINT len,
    407                             UINT fill )
    408 {
    409 #ifdef DEBUG_LOCAL
    410   dprintf(("KERNEL32: RtlFillMemory(%08x,%08x,%08x)\n",
    411            ptr,
    412            len,
    413            fill));
    414 #endif
    415 
    416   memset(ptr,
    417          fill,
    418          len );
    419 }
    420 
    421 
    422 /***********************************************************************
    423 *           RtlMoveMemory   (KERNEL32.442)
    424 */
    425 VOID WIN32API RtlMoveMemory(LPVOID  dst,
    426                             LPCVOID src,
    427                             UINT  len )
    428 {
    429   dprintf2(("KERNEL32: RtlMoveMemory(%08x,%08x,%08x)\n",
    430            dst,
    431            src,
    432            len));
    433 
    434   memmove(dst,
    435           src,
    436           len );
    437 }
    438 
    439 
    440 /***********************************************************************
    441 *           RtlZeroMemory   (KERNEL32.444)
    442 */
    443 VOID WIN32API RtlZeroMemory(LPVOID ptr,
    444                             UINT len)
    445 {
    446   dprintf2(("KERNEL32: RtlZeroMemory(%08x,%08x)\n",
    447            ptr,
    448            len));
    449 
    450   memset(ptr,
    451          0,
    452          len);
    453 }
    454 
    455 //******************************************************************************
    456 
    457 
    458 
    459 
    460 
    461 
    462 
    463 
    464400/*****************************************************************************
    465401 * Name      : BOOL GetSystemPowerStatus
  • trunk/src/kernel32/KERNEL32.DEF

    r9800 r9802  
    1 ; $Id: KERNEL32.DEF,v 1.150 2003-02-13 15:30:51 sandervl Exp $
     1; $Id: KERNEL32.DEF,v 1.151 2003-02-13 17:16:48 sandervl Exp $
    22
    33;Basis is Windows95 KERNEL32
  • trunk/src/kernel32/dbgwrap.cpp

    r8449 r9802  
    862862DEBUGWRAP8(IsBadStringPtrW);
    863863DEBUGWRAP8(IsBadWritePtr);
    864 DEBUGWRAP_LVL2_12(RtlFillMemory);
    865 DEBUGWRAP_LVL2_12(RtlMoveMemory);
    866 DEBUGWRAP_LVL2_8(RtlZeroMemory);
    867864
    868865
  • trunk/src/kernel32/kernel32.mak

    r9533 r9802  
    1 # $Id: kernel32.mak,v 1.37 2002-12-20 10:38:57 sandervl Exp $
     1# $Id: kernel32.mak,v 1.38 2003-02-13 17:16:49 sandervl Exp $
    22
    33#
     
    161161$(ODIN32_LIB)\WIN32K.LIB \
    162162$(ODIN32_LIB)\UNICODE.LIB \
     163$(ODIN32_LIB)\ntdll.lib \
    163164so32dll.lib \
    164165tcp32dll.lib \
  • trunk/src/kernel32/kernel32dbg.def

    r9800 r9802  
    1 ; $Id: kernel32dbg.def,v 1.25 2003-02-13 15:30:52 sandervl Exp $
     1; $Id: kernel32dbg.def,v 1.26 2003-02-13 17:16:49 sandervl Exp $
    22
    33;Basis is Windows95 KERNEL32
     
    727727    ResetEvent                 = _DbgResetEvent@4               @586
    728728    ResumeThread               = _DbgResumeThread@4             @587
    729     RtlFillMemory              = _DbgRtlFillMemory@12           @588
    730     RtlMoveMemory              = _DbgRtlMoveMemory@12           @589
    731     RtlUnwind                  = _DbgRtlUnwind@16               @590
    732     RtlZeroMemory              = _DbgRtlZeroMemory@8            @591
     729    RtlFillMemory              = _RtlFillMemory@12              @588
     730    RtlMoveMemory              = _RtlMoveMemory@12              @589
     731    RtlUnwind                  = _RtlUnwind@16                  @590
     732    RtlZeroMemory              = _RtlZeroMemory@8               @591
    733733    SMapLS                     = _DbgSMapLS@4                   @592       ;W95
    734734    SMapLS_IP_EBP_12           = _DbgSMapLS_IP_EBP_12@4         @593       ;W95
  • trunk/src/kernel32/wprocess.cpp

    r9800 r9802  
    1 /* $Id: wprocess.cpp,v 1.179 2003-02-13 15:30:53 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.180 2003-02-13 17:16:50 sandervl Exp $ */
    22
    33/*
     
    4949#include "directory.h"
    5050
     51#include <win\ntddk.h>
     52
    5153#define DBG_LOCALLOG    DBG_wprocess
    5254#include "dbglocal.h"
     
    8789static VMutex    threadListMutex;
    8890
    89 //TODO: This should not be here: (need to rearrange NTDLL; kernel32 can't depend on ntdll)
    90 static BOOLEAN (* WINAPI NTDLL_RtlAllocateAndInitializeSid) ( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
    91                                                               BYTE nSubAuthorityCount,
    92                                                               DWORD nSubAuthority0,
    93                                                               DWORD nSubAuthority1,
    94                                                               DWORD nSubAuthority2,
    95                                                               DWORD nSubAuthority3,
    96                                                               DWORD nSubAuthority4,
    97                                                               DWORD nSubAuthority5,
    98                                                               DWORD nSubAuthority6,
    99                                                               DWORD nSubAuthority7,
    100                                                               PSID *pSid);
    101 static HINSTANCE hInstNTDll = 0;
    10291
    10392//******************************************************************************
     
    310299
    311300    //Initialize thread security objects (TODO: Not complete)
    312     if(hInstNTDll == 0) {
    313         hInstNTDll = LoadLibraryA("NTDLL.DLL");
    314         *(ULONG *)&NTDLL_RtlAllocateAndInitializeSid = (ULONG)GetProcAddress(hInstNTDll, "RtlAllocateAndInitializeSid");
    315         if(NTDLL_RtlAllocateAndInitializeSid == NULL) {
    316             DebugInt3();
    317         }
    318     }
    319301    SID_IDENTIFIER_AUTHORITY sidIdAuth = {0};
    320302    winteb->o.odin.threadinfo.dwType = SECTYPE_PROCESS | SECTYPE_INITIALIZED;
    321303
    322     if (NULL != NTDLL_RtlAllocateAndInitializeSid) {
    323         NTDLL_RtlAllocateAndInitializeSid(&sidIdAuth, 1, 0, 0, 0, 0, 0, 0, 0, 0, &winteb->o.odin.threadinfo.SidUser.User.Sid);
    324     }
    325     else DebugInt3();
     304    RtlAllocateAndInitializeSid(&sidIdAuth, 1, 0, 0, 0, 0, 0, 0, 0, 0, &winteb->o.odin.threadinfo.SidUser.User.Sid);
    326305
    327306    winteb->o.odin.threadinfo.SidUser.User.Attributes = 0; //?????????
     
    330309    winteb->o.odin.threadinfo.pTokenGroups->GroupCount = 1;
    331310
    332     if (NULL != NTDLL_RtlAllocateAndInitializeSid) {
    333          NTDLL_RtlAllocateAndInitializeSid(&sidIdAuth, 1, 0, 0, 0, 0, 0, 0, 0, 0, &winteb->o.odin.threadinfo.PrimaryGroup.PrimaryGroup);
    334     }
    335     else DebugInt3();
     311    RtlAllocateAndInitializeSid(&sidIdAuth, 1, 0, 0, 0, 0, 0, 0, 0, 0, &winteb->o.odin.threadinfo.PrimaryGroup.PrimaryGroup);
    336312
    337313    winteb->o.odin.threadinfo.pTokenGroups->Groups[0].Sid = winteb->o.odin.threadinfo.PrimaryGroup.PrimaryGroup;
Note: See TracChangeset for help on using the changeset viewer.