Ignore:
Timestamp:
Aug 20, 2000, 5:17:00 PM (25 years ago)
Author:
phaller
Message:

Fix of broken build due to WINE sync

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/NTDLL/rtl.cpp

    r3930 r4059  
    1 /* $Id: rtl.cpp,v 1.10 2000-08-02 16:31:34 bird Exp $ */
     1/* $Id: rtl.cpp,v 1.11 2000-08-20 15:16:59 phaller Exp $ */
    22
    33/*
     
    1717
    1818#include <stdlib.h>
     19#include <stdio.h>
    1920#include <string.h>
    2021#include <odinwrap.h>
    21 
     22#include <os2win.h>
     23
     24#include "debugtools.h"
    2225#include "ntdll.h"
    2326
    2427#include "winuser.h"
     28#include "windef.h"
    2529#include "winerror.h"
     30#include "stackframe.h"
     31#include "ntddk.h"
     32#include "imagehlp.h"
    2633#include "winreg.h"
    2734#include "heapstring.h"
    2835
     36#include <misc.h>
     37
     38
    2939ODINDEBUGCHANNEL(NTDLL-RTL)
     40
     41
     42/*
     43 *  WINE Adoption -  we won't support the Win64 model.
     44 */
     45#define SIZE_T UINT
    3046
    3147/*
     
    523539 *  RtlFormatCurrentUserKeyPath             [NTDLL.371]
    524540 */
    525 DWORD WINAPI RtlFormatCurrentUserKeyPath(DWORD x)
    526 {
    527   dprintf(("NTDLL: RtlFormatCurrentUserKeyPath(%08xh) not implemented.\n",
    528            x));
    529 
    530   return 1;
     541DWORD 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);
    531551}
    532552
     
    535555 *  RtlOpenCurrentUser                      [NTDLL]
    536556 */
    537 DWORD WINAPI RtlOpenCurrentUser(DWORD x1,
    538                                 DWORD *x2)
     557ODINFUNCTION2(DWORD,      RtlOpenCurrentUser,
     558              ACCESS_MASK,DesiredAccess,
     559              PHANDLE,    pKeyHandle)
    539560{
    540561  /* Note: this is not the correct solution,
    541562   * But this works pretty good on wine and NT4.0 binaries
    542563   */
    543   if (x1 == 0x2000000 )
     564
     565  if (DesiredAccess == 0x2000000 )
    544566  {
    545     *x2 = HKEY_CURRENT_USER;
     567    *pKeyHandle = HKEY_CURRENT_USER;
    546568    return TRUE;
    547569  }
    548 
     570 
    549571  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  */
    550583}
    551584
     
    576609
    577610
     611/***********************************************************************
     612 *           RtlImageNtHeader   (NTDLL)
     613 */
     614PIMAGE_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
    578627/******************************************************************************
    579628 *  RtlCreateEnvironment                    [NTDLL]
     
    617666}
    618667
     668/******************************************************************************
     669 *  RtlInitializeGenericTable           [NTDLL]
     670 */
     671DWORD WINAPI RtlInitializeGenericTable(void)
     672{
     673        FIXME("\n");
     674        return 0;
     675}
     676
     677/******************************************************************************
     678 *  RtlInitializeBitMap                 [NTDLL]
     679 *
     680 */
     681NTSTATUS 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 */
     691NTSTATUS 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 */
     701NTSTATUS 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 */
     711NTSTATUS 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
     722VOID 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
     731VOID 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
     740VOID 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
     749VOID WINAPI RtlZeroMemory( VOID *Destination, SIZE_T Length )
     750{
     751    memset(Destination, 0, Length);
     752}
     753
     754/******************************************************************************
     755 *  RtlCompareMemory   [NTDLL]
     756 */
     757SIZE_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 */
     769void 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}
    619773
    620774/*****************************************************************************
Note: See TracChangeset for help on using the changeset viewer.