Changeset 4059 for trunk/src


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

Fix of broken build due to WINE sync

Location:
trunk/src
Files:
7 edited

Legend:

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

    r3807 r4059  
    1 /* $Id: nt.cpp,v 1.8 2000-07-07 19:06:18 sandervl Exp $ */
     1/* $Id: nt.cpp,v 1.9 2000-08-20 15:16:55 phaller Exp $ */
    22
    33
     
    809809  return 0;
    810810}
     811
     812/******************************************************************************
     813 *  NtPowerInformation                          [NTDLL]
     814 *
     815 */
     816NTSTATUS WINAPI NtPowerInformation(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5)
     817{
     818  dprintf(("NTDLL: NtPowerInformation(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx) not implemented\n",
     819           x1,x2,x3,x4,x5));
     820  return 0;
     821}
     822
     823/******************************************************************************
     824 *  NtAllocateLocallyUniqueId
     825 *
     826 * FIXME: the server should do that
     827 */
     828NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID pLuid)
     829{
     830  static LUID luid;
     831
     832  dprintf(("NTDLL: NtAllocateLocallyUniqueId %p (0x%08lx%08lx)\n",
     833           pLuid,
     834           luid.HighPart,
     835           luid.LowPart));
     836
     837  luid.LowPart++;        // PH: why don't we use 64-bit arithmetic here?
     838  if (luid.LowPart == 0) // handle overflow
     839    luid.HighPart++;
     840
     841  pLuid->LowPart  = luid.LowPart;
     842  pLuid->HighPart = luid.HighPart;
     843  return STATUS_SUCCESS;
     844}
     845
  • trunk/src/NTDLL/ntdll.def

    r3276 r4059  
    1 ; $Id: ntdll.def,v 1.33 2000-03-29 17:37:04 sandervl Exp $
     1; $Id: ntdll.def,v 1.34 2000-08-20 15:16:56 phaller Exp $
    22
    33;
     
    7070;   NtAlertResumeThread                                                         @60
    7171    NtAlertThread                 = _NtAlertThread@8              @61
    72 ;   NtAllocateLocallyUniqueId                                                   @62
     72    NtAllocateLocallyUniqueId     = _NtAllocateLocallyUniqueId@4                @62
    7373    NtAllocateUuids               = _NtAllocateUuids@16                 @63
    7474;   NtAllocateVirtualMemory                                                     @64
     
    7676;   NtCancelIoFile                                                              @66
    7777;   NtCancelTimer                                                                       @67
    78 ;   NtClearEvent                                                                        @68
     78    NtClearEvent                  = _NtClearEvent@4                                     @68
    7979    NtClose                       = _NtClose@4                    @69
    8080;   NtCloseObjectAuditAlarm                                                     @70
     
    164164;   NtPrivilegedServiceAuditAlarm                                       @153
    165165;   NtProtectVirtualMemory                                              @154
    166 ;   NtPulseEvent                                                        @155
     166    NtPulseEvent                  = _NtPulseEvent@8                     @155
    167167;   NtQueryAttributesFile                                               @156
    168168;   NtQueryDefaultLocale                                                @157
     
    170170    NtQueryDirectoryObject        = _NtQueryDirectoryObject@28          @159
    171171;   NtQueryEaFile                                                       @160
    172 ;   NtQueryEvent                                                        @161
     172    NtQueryEvent                  = _NtQueryEvent@20                    @161
    173173;   NtQueryFullAttributesFile                                           @162
    174174;   NtQueryInformationAtom                                              @163
     
    312312;   RtlAreBitsSet                                                       @300
    313313
    314 ;   RtlAssert                                                           @301
     314    RtlAssert                     = _RtlAssert@16                       @301
    315315;   RtlCaptureStackBackTrace                                            @302
    316316;   RtlCharToInteger                                                    @303
    317317;   RtlCheckRegistryKey                                                 @304
    318318;   RtlClearAllBits                                                     @305
    319 ;   RtlClearBits                                                        @306
     319    RtlClearBits                  = _RtlClearBits@12                    @306
    320320;   RtlClosePropertySet                                                 @307
    321321;   RtlCompactHeap                                                      @308
    322 ;   RtlCompareMemory                                                    @309
     322    RtlCompareMemory              = _RtlCompareMemory@12                @309
    323323;   RtlCompareMemoryUlong                                               @310
    324324;   RtlCompareString                                                    @311
     
    334334    RtlCopyLuid                   = _RtlCopyLuid@8                      @321
    335335;   RtlCopyLuidAndAttributesArray                                       @322
     336    RtlCopyMemory                 = _RtlCopyMemory@12
    336337;   RtlCopySecurityDescriptor                                           @323
    337338    RtlCopySid                    = _RtlCopySid@12                      @324
     
    405406    RtlFillMemory                  = _RtlFillMemory@12                  @392
    406407;   RtlFillMemoryUlong                                                  @393
    407 ;   RtlFindClearBits                                                    @394
     408    RtlFindClearBits              = _RtlFindClearBits@12                @394
    408409;   RtlFindClearBitsAndSet                                              @395
    409410;   RtlFindLongestRunClear                                              @396
     
    444445    RtlIdentifierAuthoritySid     = _RtlIdentifierAuthoritySid@4        @430
    445446;   RtlImageDirectoryEntryToData                                        @431
    446 ;   RtlImageNtHeader                                                    @432
     447    RtlImageNtHeader              = _RtlImageNtHeader@4                 @432
    447448;   RtlImageRvaToSection                                                @433
    448449;   RtlImageRvaToVa                                                     @434
     
    454455    RtlInitUnicodeString          = _RtlInitUnicodeString@8             @440
    455456;   RtlInitializeAtomPackage                                            @441
    456 ;   RtlInitializeBitMap                                                 @442
     457    RtlInitializeBitMap           = _RtlInitializeBitMap@12             @442
    457458;   RtlInitializeContext                                                @443
    458     RtlInitializeCriticalSection   = _InitializeCriticalSection@4       @444
     459    RtlInitializeCriticalSection  = _InitializeCriticalSection@4        @444
    459460;   RtlInitializeCriticalSectionAndSpinCount                            @445
    460 ;   RtlInitializeGenericTable                                           @446
     461    RtlInitializeGenericTable     = _RtlInitializeGenericTable@0        @446
    461462;   RtlInitializeHandleTable                                            @447
    462463;   RtlInitializeRXact                                                  @448
     
    544545;   RtlSetAllBits                                                       @529
    545546;   RtlSetAttributesSecurityDescriptor                                  @530
    546 ;   RtlSetBits                                                          @531
     547    RtlSetBits                    = _RtlSetBits@12                      @531
    547548;   RtlSetCriticalSectionSpinCount                                      @532
    548549;   RtlSetCurrentDirectory_U                                            @533
     
    10731074    DebugBreak                    = ___regs_DebugBreak@4
    10741075    RtlInitOemString              = _RtlInitOemString@8
     1076    NtPowerInformation            = _NtPowerInformation@20
  • trunk/src/NTDLL/ntdll.h

    r2327 r4059  
    1 /* $Id: ntdll.h,v 1.11 2000-01-05 19:37:29 sandervl Exp $ */
     1/* $Id: ntdll.h,v 1.12 2000-08-20 15:16:57 phaller Exp $ */
    22
    33/*
     
    631631INT WINAPI RtlExtendedLargeIntegerDivide(LARGE_INTEGER dividend, DWORD divisor, LPDWORD rest);
    632632LARGE_INTEGER WINAPI RtlExtendedIntegerMultiply(LARGE_INTEGER factor1,INT factor2);
    633 DWORD WINAPI RtlFormatCurrentUserKeyPath(DWORD x);
     633DWORD WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING pustrKeyPath);
    634634DWORD WINAPI RtlOpenCurrentUser(DWORD x1, DWORD *x2);
    635635BOOLEAN WINAPI RtlDosPathNameToNtPathName_U( LPWSTR from,PUNICODE_STRING us,DWORD x2,DWORD x3);
  • trunk/src/NTDLL/reg.cpp

    r484 r4059  
    1 /* $Id: reg.cpp,v 1.3 1999-08-11 22:23:47 phaller Exp $ */
     1/* $Id: reg.cpp,v 1.4 2000-08-20 15:16:58 phaller Exp $ */
    22
    33/*
     
    1616#include <winreg.h>
    1717
     18#include <heapstring.h>
     19#include "debugtools.h"
    1820#include "ntdll.h"
     21
     22
     23/* translates predefined paths to HKEY_ constants */
     24static BOOLEAN _NtKeyToWinKey(
     25                              IN POBJECT_ATTRIBUTES ObjectAttributes,
     26                              OUT UINT * Offset,/* offset within ObjectName */
     27                              OUT HKEY * KeyHandle)/* translated handle */
     28{
     29  static const WCHAR KeyPath_HKLM[] = {
     30    '\\','R','E','G','I','S','T','R','Y',
     31      '\\','M','A','C','H','I','N','E',0};
     32  static const WCHAR KeyPath_HKU [] = {
     33    '\\','R','E','G','I','S','T','R','Y',
     34      '\\','U','S','E','R',0};
     35  static const WCHAR KeyPath_HCC [] = {
     36    '\\','R','E','G','I','S','T','R','Y',
     37      '\\','M','A','C','H','I','N','E',
     38      '\\','S','Y','S','T','E','M',
     39      '\\','C','U','R','R','E','N','T','C','O','N','T','R','O','L','S','E','T',
     40      '\\','H','A','R','D','W','A','R','E','P','R','O','F','I','L','E','S',
     41      '\\','C','U','R','R','E','N','T',0};
     42  static const WCHAR KeyPath_HCR [] = {
     43    '\\','R','E','G','I','S','T','R','Y',
     44      '\\','M','A','C','H','I','N','E',
     45      '\\','S','O','F','T','W','A','R','E',
     46      '\\','C','L','A','S','S','E','S',0};
     47  int len;
     48  PUNICODE_STRING ObjectName = ObjectAttributes->ObjectName;
     49 
     50  if(ObjectAttributes->RootDirectory)
     51  {
     52    len = 0;
     53    *KeyHandle = ObjectAttributes->RootDirectory;
     54  }
     55  else if((ObjectName->Length > (len=lstrlenW(KeyPath_HKLM)))
     56          && (0==lstrncmpiW(ObjectName->Buffer,KeyPath_HKLM,len)))
     57  {  *KeyHandle = HKEY_LOCAL_MACHINE;
     58  }
     59  else if((ObjectName->Length > (len=lstrlenW(KeyPath_HKU)))
     60          && (0==lstrncmpiW(ObjectName->Buffer,KeyPath_HKU,len)))
     61  {  *KeyHandle = HKEY_USERS;
     62  }
     63  else if((ObjectName->Length > (len=lstrlenW(KeyPath_HCR)))
     64          && (0==lstrncmpiW(ObjectName->Buffer,KeyPath_HCR,len)))
     65  {  *KeyHandle = HKEY_CLASSES_ROOT;
     66  }
     67  else if((ObjectName->Length > (len=lstrlenW(KeyPath_HCC)))
     68          && (0==lstrncmpiW(ObjectName->Buffer,KeyPath_HCC,len)))
     69  {  *KeyHandle = HKEY_CURRENT_CONFIG;
     70  }
     71  else
     72  {
     73    *KeyHandle = 0;
     74    *Offset = 0;
     75    return FALSE;
     76  }
     77 
     78  if (len > 0 && ObjectName->Buffer[len] == (WCHAR)'\\') len++;
     79  *Offset = len;
     80 
     81  TRACE("off=%u hkey=0x%08x\n", *Offset, *KeyHandle);
     82  return TRUE;
     83}
     84
    1985
    2086
  • 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/*****************************************************************************
  • trunk/src/NTDLL/sync.cpp

    r557 r4059  
    1 /* $Id: sync.cpp,v 1.3 1999-08-18 21:45:14 phaller Exp $ */
     1/* $Id: sync.cpp,v 1.4 2000-08-20 15:17:00 phaller Exp $ */
    22
    33/*
     
    158158}
    159159
     160/**************************************************************************
     161 *                 NtClearEvent                   [NTDLL.?]
     162 */
     163NTSTATUS WIN32API NtClearEvent(HANDLE hEvent)
     164{
     165  dprintf(("NTDLL: NtClearEvent(%08xh) not implemented.\n",
     166           hEvent));
     167
     168  return 0;
     169}
     170
     171/**************************************************************************
     172 *                 NtPulseEvent                   [NTDLL.?]
     173 */
     174NTSTATUS WIN32API NtPulseEvent(HANDLE hEvent,
     175                               PULONG PulseCount)
     176{
     177  dprintf(("NTDLL: NtPulseEvent(%08xh,%08xh) not implemented.\n",
     178           hEvent,
     179          PulseCount));
     180
     181  return 0;
     182}
     183
     184/**************************************************************************
     185 *                 NtQueryEvent                   [NTDLL.?]
     186 */
     187NTSTATUS WIN32API NtQueryEvent(HANDLE hEvent,
     188                               UINT   EventInformationClass,
     189                               PVOID  EventInformation,
     190                               ULONG  EventInformationLength,
     191                               PULONG ReturnLength)
     192{
     193  dprintf(("NTDLL: NtQueryEvent() not implemented.\n"));
     194
     195  return 0;
     196}
  • trunk/src/shlwapi/path.c

    r4056 r4059  
    1 /* $Id: path.c,v 1.6 2000-08-20 10:09:20 sandervl Exp $ */
     1/* $Id: path.c,v 1.7 2000-08-20 15:16:35 phaller Exp $ */
    22
    33/*
     
    4343#include <misc.h>
    4444#include <win\shell.h>
     45#include <win/shlobj.h>
    4546#include <win\winerror.h>
    4647#include <win\crtdll.h>
    4748#include <win\winversion.h>
    4849#include <winuser.h>
     50#include <win/wine/undocshell.h>
    4951
    5052#include <win\shlwapi.h>
Note: See TracChangeset for help on using the changeset viewer.