Index: trunk/src/NTDLL/file.c
===================================================================
--- trunk/src/NTDLL/file.c	(revision 47)
+++ 	(revision )
@@ -1,298 +1,0 @@
-/*
- * Project Odin Software License can be found in LICENSE.TXT
- * Win32 NT Runtime / NTDLL for OS/2
- *
- * Copyright 1998       original WINE Author
- * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "ntdll.h"
-
-
-//******************************************************************************
-//NtClose has to call CloseHandle since the Handlemanager has to be
-//called.
-//******************************************************************************
-NTSTATUS WIN32API NtClose(HANDLE hHandle)
-{
-  dprintf(("NTDLL: NtClose(%08x) not properly implemented.\n",
-           hHandle));
-
-  /* @@@PH 98/05/05 function from NTDLL */
-  return (CloseHandle(hHandle));
-}
-
-
-
-/**************************************************************************
- *                 NtOpenFile                     [NTDLL.127]
- * FUNCTION: Opens a file
- * ARGUMENTS:
- *  FileHandle    Variable that receives the file handle on return
- *  DesiredAccess Access desired by the caller to the file
- *  ObjectAttributes                     Structue describing the file to be opened
- *  IoStatusBlock Receives details about the result of the operation
- *  ShareAccess                          Type of shared access the caller requires
- *  OpenOptions                          Options for the file open
- */
-NTSTATUS WIN32API NtOpenFile(PHANDLE            FileHandle,
-                             ACCESS_MASK        DesiredAccess,
-                             POBJECT_ATTRIBUTES ObjectAttributes,
-                             PIO_STATUS_BLOCK   IoStatusBlock,
-                             ULONG              ShareAccess,
-                             ULONG              OpenOptions)
-{
-  dprintf(("NTDLL: NtOpenFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           FileHandle,
-           DesiredAccess,
-           ObjectAttributes,
-           IoStatusBlock,
-           ShareAccess,
-           OpenOptions));
-
-  return 0;
-}
-
-
-/**************************************************************************
- *    NtCreateFile                                [NTDLL.73]
- * FUNCTION: Either causes a new file or directory to be created, or it opens
- *  an existing file, device, directory or volume, giving the caller a handle
- *  for the file object. This handle can be used by subsequent calls to
- *  manipulate data within the file or the file object's state of attributes.
- * ARGUMENTS:
- * FileHandle     Points to a variable which receives the file handle on return
- * DesiredAccess                         Desired access to the file
- * ObjectAttributes                      Structure describing the file
- * IoStatusBlock                         Receives information about the operation on return
- * AllocationSize                        Initial size of the file in bytes
- * FileAttributes                        Attributes to create the file with
- * ShareAccess    Type of shared access the caller would like to the file
- * CreateDisposition                     Specifies what to do, depending on whether the file already exists
- * CreateOptions                         Options for creating a new file
- * EaBuffer    Undocumented
- * EaLength    Undocumented
- */
-NTSTATUS WIN32API NtCreateFile(PHANDLE            FileHandle,
-                               ACCESS_MASK        DesiredAccess,
-                               POBJECT_ATTRIBUTES ObjectAttributes,
-                               PIO_STATUS_BLOCK   IoStatusBlock,
-                               PLARGE_INTEGER     AllocateSize,
-                               ULONG              FileAttributes,
-                               ULONG              ShareAccess,
-                               ULONG              CreateDisposition,
-                               ULONG              CreateOptions,
-                               PVOID              EaBuffer,
-                               ULONG              EaLength)
-{
-  dprintf(("NTDLL: NtCreateFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           FileHandle,
-           DesiredAccess,
-           ObjectAttributes,
-           IoStatusBlock,
-           AllocateSize,
-           FileAttributes,
-           ShareAccess,
-           CreateDisposition,
-           CreateOptions,
-           EaBuffer,
-           EaLength));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtReadFile                                 [NTDLL]
- *  ZwReadFile
- *
- * Parameters
- *   HANDLE32     FileHandle
- *   HANDLE32     Event                     OPTIONAL
- *   PIO_APC_ROUTINE                     ApcRoutine  OPTIONAL
- *   PVOID     ApcContext                OPTIONAL
- *   PIO_STATUS_BLOCK                    IoStatusBlock
- *   PVOID     Buffer
- *   ULONG     Length
- *   PLARGE_INTEGER                      ByteOffset  OPTIONAL
- *   PULONG       Key                       OPTIONAL
- */
-NTSTATUS WIN32API NtReadFile (HANDLE           FileHandle,
-                              HANDLE           EventHandle,
-                              PIO_APC_ROUTINE  ApcRoutine,
-                              PVOID            ApcContext,
-                              PIO_STATUS_BLOCK IoStatusBlock,
-                              PVOID            Buffer,
-                              ULONG            Length,
-                              PLARGE_INTEGER   ByteOffset,
-                              PULONG           Key)
-{
-  dprintf(("NTDLL: NtReadFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           FileHandle,
-           EventHandle,
-           ApcRoutine,
-           ApcContext,
-           IoStatusBlock,
-           Buffer,
-           Length,
-           ByteOffset,
-           Key));
-
-  return 0;
-}
-
-
-/**************************************************************************
- *    NtDeviceIoControlFile                    [NTDLL.94]
- */
-NTSTATUS WIN32API NtDeviceIoControlFile(HANDLE           DeviceHandle,
-                                        HANDLE           Event,
-                                        PIO_APC_ROUTINE  UserApcRoutine,
-                                        PVOID            UserApcContext,
-                                        PIO_STATUS_BLOCK IoStatusBlock,
-                                        ULONG            IoControlCode,
-                                        PVOID            InputBuffer,
-                                        ULONG            InputBufferSize,
-                                        PVOID            OutputBuffer,
-                                        ULONG            OutputBufferSize)
-{
-  dprintf(("NTDLL: NtDeviceIoControlFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           DeviceHandle,
-           Event,
-           UserApcRoutine,
-           UserApcContext,
-           IoStatusBlock,
-           IoControlCode,
-           InputBuffer,
-           InputBufferSize,
-           OutputBuffer,
-           OutputBufferSize));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtFsControlFile [NTDLL.108]
- */
-NTSTATUS WIN32API NtFsControlFile(HANDLE           DeviceHandle,
-                                  HANDLE           Event,
-                                  PIO_APC_ROUTINE  UserApcRoutine,
-                                  PVOID            UserApcContext,
-                                  PIO_STATUS_BLOCK IoStatusBlock,
-                                  ULONG            IoControlCode,
-                                  PVOID            InputBuffer,
-                                  ULONG            InputBufferSize,
-                                  PVOID            OutputBuffer,
-                                  ULONG            OutputBufferSize)
-{
-  dprintf(("NTDLL: NtFsControlFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           DeviceHandle,
-           Event,
-           UserApcRoutine,
-           UserApcContext,
-           IoStatusBlock,
-           IoControlCode,
-           InputBuffer,
-           InputBufferSize,
-           OutputBuffer,
-           OutputBufferSize));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtSetVolumeInformationFile              [NTDLL]
- */
-NTSTATUS WIN32API NtSetVolumeInformationFile(HANDLE FileHandle,
-                                             PVOID  VolumeInformationClass,
-                                             PVOID  VolumeInformation,
-                                             ULONG  Length)
-{
-  dprintf(("NTDLL: NtSetVolumeInformationFile(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           FileHandle,
-           VolumeInformationClass,
-           VolumeInformation,
-           Length));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtQueryInformationFile                  [NTDLL]
- */
-NTSTATUS WIN32API NtQueryInformationFile(HANDLE                 FileHandle,
-                                         PIO_STATUS_BLOCK       IoStatusBlock,
-                                         PVOID                  FileInformation,
-                                         ULONG                  Length,
-                                         FILE_INFORMATION_CLASS FileInformationClass)
-{
-  dprintf(("NTDLL: NtQueryInformationFile(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           FileHandle,
-           IoStatusBlock,
-           FileInformation,
-           Length,
-           FileInformationClass));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtSetInformationFile                    [NTDLL]
- */
-NTSTATUS WIN32API NtSetInformationFile(HANDLE                 FileHandle,
-                                       PIO_STATUS_BLOCK       IoStatusBlock,
-                                       PVOID                  FileInformation,
-                                       ULONG                  Length,
-                                       FILE_INFORMATION_CLASS FileInformationClass)
-{
-  dprintf(("NTDLL: NtSetInformationFile(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           FileHandle,
-           IoStatusBlock,
-           FileInformation,
-           Length,
-           FileInformationClass));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtQueryDirectoryFile                 [NTDLL]
- *  ZwQueryDirectoryFile
- */
-NTSTATUS WIN32API NtQueryDirectoryFile(HANDLE                 FileHandle,
-                                       HANDLE                 Event,
-                                       PIO_APC_ROUTINE        ApcRoutine,
-                                       PVOID                  ApcContext,
-                                       PIO_STATUS_BLOCK       IoStatusBlock,
-                                       PVOID                  FileInformation,
-                                       ULONG                  Length,
-                                       FILE_INFORMATION_CLASS FileInformationClass,
-                                       BOOLEAN                ReturnSingleEntry,
-                                       PUNICODE_STRING        FileName,
-                                       BOOLEAN                RestartScan)
-{
-  dprintf(("NTDLL: NtQueryDirectoryFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           FileHandle,
-           Event,
-           ApcRoutine,
-           ApcContext,
-           IoStatusBlock,
-           FileInformation,
-           Length,
-           FileInformationClass,
-           ReturnSingleEntry,
-           FileName,
-           RestartScan));
-
-  return 0;
-}
-
-
Index: trunk/src/NTDLL/nt.c
===================================================================
--- trunk/src/NTDLL/nt.c	(revision 47)
+++ 	(revision )
@@ -1,729 +1,0 @@
-
-/*
- * NT basis DLL
- *
- * This file contains the Nt* API functions of NTDLL.DLL.
- * In the original ntdll.dll they all seem to just call int 0x2e (down to the HAL)
- *
- * Copyright 1996-1998 Marcus Meissner
- * Copyright 1999      Patrick Haller
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include "ntdll.h"
-
-
-/* move to winbase.h */
-
-// @@@PH can't compile this WINE code
-//typedef VOID (CALLBACK *PTIMERAPCROUTINE)(LPVOID lpArgToCompletionRoutine,DWORD dwTimerLowValue,DWORD dwTimerHighValue);
-typedef PVOID PTIMERAPCROUTINE;
-
-
-/*
- * Timer object
- */
-
-/**************************************************************************
- *    NtCreateTimer                               [NTDLL.87]
- */
-NTSTATUS WINAPI NtCreateTimer(PHANDLE            TimerHandle,
-                              ACCESS_MASK        DesiredAccess,
-                              POBJECT_ATTRIBUTES ObjectAttributes,
-                              TIMER_TYPE         TimerType)
-{
-  dprintf(("NTDLL: NtCreateTimer(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           TimerHandle,
-           DesiredAccess,
-           ObjectAttributes,
-           TimerType));
-
-  return 0;
-}
-
-
-/**************************************************************************
- *    NtSetTimer                               [NTDLL.221]
- */
-NTSTATUS WINAPI NtSetTimer(HANDLE           TimerHandle,
-                           PLARGE_INTEGER   DueTime,
-                           PTIMERAPCROUTINE TimerApcRoutine,
-                           PVOID            TimerContext,
-                           BOOLEAN          WakeTimer,
-                           ULONG            Period,
-                           PBOOLEAN         PreviousState)
-{
-  dprintf(("NTDLL: NtSetTimer(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           TimerHandle,
-           DueTime,
-           TimerApcRoutine,
-           TimerContext,
-           WakeTimer,
-           Period,
-           PreviousState));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtQueryTimerResolution [NTDLL.129]
- */
-NTSTATUS WINAPI NtQueryTimerResolution(DWORD x1,
-                                       DWORD x2,
-                                       DWORD x3)
-{
-  dprintf(("NTDLL: NtQueryTimerResolution(%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           x2,
-           x3));
-
-  return 1;
-}
-
-
-/*
- * Process object
- */
-
-/******************************************************************************
- *  NtTerminateProcess                         [NTDLL.]
- *
- *  Native applications must kill themselves when done
- * FIXME: return value 0-success
- */
-NTSTATUS WINAPI NtTerminateProcess(HANDLE ProcessHandle,
-                                   LONG   ExitStatus)
-{
-  dprintf(("NTDLL: NtTerminateProcess(%08xh,%08xh)",
-           ProcessHandle,
-           ExitStatus));
-
-  /* win32 (0x7fffffff) to nt (-1) */
-  if ( NtCurrentProcess() == ProcessHandle )
-    ProcessHandle = GetCurrentProcess();
-
-  /* @@@PH return code looks suspicious ! */
-  return (! TerminateProcess( ProcessHandle, ExitStatus ));
-}
-
-
-/******************************************************************************
-*  NtQueryInformationProcess                [NTDLL.]
-*
-*/
-NTSTATUS WINAPI NtQueryInformationProcess(HANDLE           ProcessHandle,
-                                          PROCESSINFOCLASS ProcessInformationClass,
-                                          PVOID            ProcessInformation,
-                                          ULONG            ProcessInformationLength,
-                                          PULONG           ReturnLength)
-{
-  dprintf(("NTDLL: NtQueryInformationProcess(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           ProcessHandle,
-           ProcessInformationClass,
-           ProcessInformation,
-           ProcessInformationLength,
-           Returnlength));
-
-  return 0;
-}
-
-/******************************************************************************
- * NtSetInformationProcess [NTDLL.207]
- */
-NTSTATUS WINAPI NtSetInformationProcess(HANDLE           ProcessHandle,
-                                        PROCESSINFOCLASS ProcessInformationClass,
-                                        PVOID            ProcessInformation,
-                                        ULONG            ProcessInformationLength)
-{
-  dprintf(("NTDLL: NtSetInformationProcess(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           ProcessHandle,
-           ProcessInformationClass,
-           ProcessInformation,
-           ProcessInformationLength));
-
-  return 0;
-}
-
-
-/*
- * Thread
- */
-
-/******************************************************************************
- *  NtResumeThread                       [NTDLL]
- */
-NTSTATUS WINAPI NtResumeThread(HANDLE ThreadHandle,
-                               PULONG SuspendCount)
-{
-  dprintf(("NTDLL: NtResumeThread(%08xh,%08x) not implemented.\n",
-           ThreadHandle,
-           SuspendCount));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtTerminateThread                    [NTDLL]
- */
-NTSTATUS WINAPI NtTerminateThread(HANDLE ThreadHandle,
-                                  NTSTATUS ExitStatus)
-{
-  dprintf(("NTDLL: NtTerminateThread(%08xh,%08xh) not correctly implemented.\n",
-           ThreadHandle,
-           ExitStatus));
-
-  if ( TerminateThread(ThreadHandle,ExitStatus) )
-    return 0;
-
-  return 0xc0000000; /* FIXME: lasterror->ntstatus */
-}
-
-
-/******************************************************************************
-*  NtQueryInformationThread                 [NTDLL.]
-*
-*/
-NTSTATUS WINAPI NtQueryInformationThread(HANDLE          ThreadHandle,
-                                         THREADINFOCLASS ThreadInformationClass,
-                                         PVOID           ThreadInformation,
-                                         ULONG           ThreadInformationLength,
-                                         PULONG          ReturnLength)
-{
-  dprintf(("NTDLL: NtQueryInformationThread(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           ThreadHandle,
-           ThreadInformationClass,
-           ThreadInformation,
-           ThreadInformationLength,
-           ReturnLength));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtSetInformationThread                  [NTDLL]
- */
-NTSTATUS WINAPI NtSetInformationThread(HANDLE          ThreadHandle,
-                                       THREADINFOCLASS ThreadInformationClass,
-                                       PVOID           ThreadInformation,
-                                       ULONG           ThreadInformationLength)
-{
-  dprintf(("NTDLL: NtSetInformationThread(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           ThreadHandle,
-           ThreadInformationClass,
-           ThreadInformation,
-           ThreadInformationLength));
-
-  return 0;
-}
-
-
-/*
- * Token
- */
-
-/******************************************************************************
- *  NtDuplicateToken                        [NTDLL]
- */
-NTSTATUS WINAPI NtDuplicateToken(HANDLE                       ExistingToken,
-                                 ACCESS_MASK                  DesiredAccess,
-                                 POBJECT_ATTRIBUTES           ObjectAttributes,
-                                 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
-                                 TOKEN_TYPE                   TokenType,
-                                 PHANDLE                      NewToken)
-{
-  dprintf(("NTDLL: NtDuplicateToken(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           ExistingToken,
-           DesiredAccess,
-           ObjectAttributes,
-           ImpersonationLevel,
-           TokenType,
-           NewToken));
-
-  return 0;
-}
-
-/******************************************************************************
- *  NtOpenProcessToken                      [NTDLL]
- */
-NTSTATUS WINAPI NtOpenProcessToken(HANDLE  ProcessHandle,
-                                   DWORD   DesiredAccess,
-                                   PHANDLE TokenHandle)
-{
-  dprintf(("NTDLL: NtOpenProcessToken(%08xh,%08xh,%08xh) not implemented.\n",
-           ProcessHandle,
-           DesiredAccess,
-           TokenHandle));
-
-  *TokenHandle = 0xcafe;
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtOpenThreadToken                       [NTDLL]
- */
-NTSTATUS WINAPI NtOpenThreadToken(HANDLE  ThreadHandle,
-                                  DWORD   DesiredAccess,
-                                  BOOLEAN OpenAsSelf,
-                                  PHANDLE TokenHandle)
-{
-  dprintf(("NTDLL: NtOpenThreadToken(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           ThreadHandle,
-           DesiredAccess,
-           OpenAsSelf,
-           TokenHandle));
-
-  *TokenHandle = 0xcafe;
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtAdjustPrivilegesToken                 [NTDLL]
- *
- * FIXME: parameters unsafe
- */
-NTSTATUS WINAPI NtAdjustPrivilegesToken(HANDLE            TokenHandle,
-                                        BOOLEAN           DisableAllPrivileges,
-                                        PTOKEN_PRIVILEGES NewState,
-                                        DWORD             BufferLength,
-                                        PTOKEN_PRIVILEGES PreviousState,
-                                        PDWORD            ReturnLength)
-{
-  dprintf(("NTDLL: NtAdjustPrivilegesToken(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           TokenHandle,
-           DisableAllPrivileges,
-           NewState,
-           BufferLength,
-           PreviousState,
-           ReturnLength));
-
-  return 0;
-}
-
-
-/******************************************************************************
-*  NtQueryInformationToken                  [NTDLL.156]
-*
-*/
-NTSTATUS WINAPI NtQueryInformationToken(HANDLE  Token,
-                                        DWORD   TokenInformationClass,
-                                        LPVOID  TokenInformation,
-                                        DWORD   TokenInformationLength,
-                                        LPDWORD ReturnLength)
-{
-  dprintf(("NTDLL: NtQueryInformationToken(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           TokenHandle,
-           TokenInformationClass,
-           TokenInformation,
-           TokenInformationLength,
-           ReturnLength));
-
-  switch (TokenInformationClass)
-  {
-    case TokenGroups:                    /* 2 */
-      *ReturnLength = sizeof (TOKEN_GROUPS);
-#if 0
-    case TokenUser:                     /* 1 */
-    case TokenPrivileges:
-    case TokenOwner:
-    case TokenPrimaryGroup:
-    case TokenDefaultDacl:
-    case TokenSource:
-    case TokenType:
-    case TokenImpersonationLevel:
-    case TokenStatistics:
-#endif /* 0 */
-  }
-
-  return 0;
-}
-
-
-/*
- * Section
- */
-
-/******************************************************************************
- *  NtCreateSection                      [NTDLL]
- */
-NTSTATUS WINAPI NtCreateSection(PHANDLE SectionHandle,
-                                ACCESS_MASK DesiredAccess,
-                                POBJECT_ATTRIBUTES ObjectAttributes,
-                                PLARGE_INTEGER MaximumSize,
-                                ULONG SectionPageProtection,
-                                ULONG AllocationAttributes,
-                                HANDLE FileHandle)
-{
-  dprintf(("NTDLL: NtCreateSection(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           SectionHandle,
-           DesiredAccess,
-           ObjectAttributes,
-           MaximumSize,
-           SectionPageProtection,
-           AllocationAttributes,
-           FileHandle));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtOpenSection [NTDLL]
- */
-NTSTATUS WINAPI NtOpenSection(PHANDLE SectionHandle,
-                              ACCESS_MASK DesiredAccess,
-                              POBJECT_ATTRIBUTES ObjectAttributes)
-{
-  dprintf(("NTDLL: NtOpenSection(%08xh,%08xh,%08xh) not implemented.\n",
-           SectionHandle,
-           DesiredAccess,
-           ObjectAttributes));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtQuerySection                       [NTDLL]
- */
-NTSTATUS WINAPI NtQuerySection(HANDLE SectionHandle,
-                               PVOID SectionInformationClass,
-                               PVOID SectionInformation,
-                               ULONG Length,
-                               PULONG ResultLength)
-{
-  dprintf(("NTDLL: NtQuerySection(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           SectionHandle,
-           SectionInformationClass,
-           SectionInformation,
-           Length,
-           ResultLength));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtMapViewOfSection                    [NTDLL]
- * FUNCTION: Maps a view of a section into the virtual address space of a process
- *
- * ARGUMENTS:
- *  SectionHandle Handle of the section
- *  ProcessHandle Handle of the process
- *  BaseAddress                          Desired base address (or NULL) on entry
- *       Actual base address of the view on exit
- *  ZeroBits      Number of high order address bits that must be zero
- *  CommitSize    Size bytes of the initially committed section of the view
- *  SectionOffset Offset bytes from the beginning of the section to the beginning of the view
- *  ViewSize      Desired length of map (or zero to map all) on entry
-         Actual length mapped on exit
- *  InheritDisposition                   Specified how the view is to be shared with
- *       child processes
- *  AllocateType  Type of allocation for the pages
- *  Protect    Protection for the committed region of the view
- */
-NTSTATUS WINAPI NtMapViewOfSection(HANDLE          SectionHandle,
-                                   HANDLE          ProcessHandle,
-                                   PVOID*          BaseAddress,
-                                   ULONG           ZeroBits,
-                                   ULONG           CommitSize,
-                                   PLARGE_INTEGER  SectionOffset,
-                                   PULONG          ViewSize,
-                                   SECTION_INHERIT InheritDisposition,
-                                   ULONG           AllocationType,
-                                   ULONG           Protect)
-{
-  dprintf(("NTDLL: NtMapViewOfSection(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           SectionHandle,
-           ProcessHandle,
-           BaseAddress,
-           ZeroBits,
-           CommitSize,
-           SectionOffset,
-           ViewSize,
-           InheritDisposition,
-           AllocationType,
-           Protect));
-
-  return 0;
-}
-
-
-/*
- * ports
- */
-
-/******************************************************************************
- *  NtCreatePort                         [NTDLL]
- */
-NTSTATUS WINAPI NtCreatePort(DWORD x1,
-                             DWORD x2,
-                             DWORD x3,
-                             DWORD x4,
-                             DWORD x5)
-{
-  dprintf(("NTDLL: NtCreatePort(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           x2,
-           x3,
-           x4,
-           x5));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtConnectPort                        [NTDLL]
- */
-NTSTATUS WINAPI NtConnectPort(DWORD           x1,
-                              PUNICODE_STRING uni,
-                              DWORD           x3,
-                              DWORD           x4,
-                              DWORD           x5,
-                              DWORD           x6,
-                              DWORD           x7,
-                              DWORD           x8)
-{
-  dprintf(("NTDLL: NtConnectPort(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           uni,
-           x3,
-           x4,
-           x5,
-           x6,
-           x7,
-           x8));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtListenPort                         [NTDLL]
- */
-NTSTATUS WINAPI NtListenPort(DWORD x1,
-                             DWORD x2)
-{
-  dprintf(("NTDLL: NtListenPort(%08xh,%08xh) not implemented.\n",
-           x1,
-           x2));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtAcceptConnectPort                  [NTDLL]
- */
-NTSTATUS WINAPI NtAcceptConnectPort(DWORD x1,
-                                    DWORD x2,
-                                    DWORD x3,
-                                    DWORD x4,
-                                    DWORD x5,
-                                    DWORD x6)
-{
-  dprintf(("NTDLL: NtAcceptConnectPort(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           x2,
-           x3,
-           x4,
-           x5,
-           x6));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtCompleteConnectPort                [NTDLL]
- */
-NTSTATUS WINAPI NtCompleteConnectPort(DWORD x1)
-{
-  dprintf(("NTDLL: NtCompleteConnectPort(%08xh) not implemented.\n",
-           x1));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtRegisterThreadTerminatePort        [NTDLL]
- */
-NTSTATUS WINAPI NtRegisterThreadTerminatePort(DWORD x1)
-{
-  dprintf(("NTDLL: NtRegisterThreadTerminatePort(%08xh) not implemented.\n",
-           x1));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtRequestWaitReplyPort                  [NTDLL]
- */
-NTSTATUS WINAPI NtRequestWaitReplyPort(DWORD x1,
-                                       DWORD x2,
-                                       DWORD x3)
-{
-  dprintf(("NTDLL: NtRequestWaitReplyPort(%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           x2,
-           x3));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtReplyWaitReceivePort               [NTDLL]
- */
-NTSTATUS WINAPI NtReplyWaitReceivePort(DWORD x1,
-                                       DWORD x2,
-                                       DWORD x3,
-                                       DWORD x4)
-{
-  dprintf(("NTDLL: NtReplyWaitReceivePort(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           x2,
-           x3,
-           x4));
-
-  return 0;
-}
-
-
-/*
- * Misc
- */
-
- /******************************************************************************
- *  NtSetIntervalProfile                 [NTDLL]
- */
-NTSTATUS WINAPI NtSetIntervalProfile(DWORD x1,
-                                     DWORD x2)
-{
-  dprintf(("NTDLL: NtSetIntervalProfile(%08xh,%08xh) not implemented.\n",
-           x1,
-           x2));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtQueryPerformanceCounter            [NTDLL]
- */
-NTSTATUS WINAPI NtQueryPerformanceCounter(PLARGE_INTEGER Counter,
-                                          PLARGE_INTEGER Frequency)
-{
-  dprintf(("NTDLL: NtQueryPerformanceCounter(%08xh,%08xh) not implemented.\n",
-           Counter,
-           Frequency));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtCreateMailSlotFile                 [NTDLL]
- */
-NTSTATUS WINAPI NtCreateMailslotFile(DWORD x1,
-                                     DWORD x2,
-                                     DWORD x3,
-                                     DWORD x4,
-                                     DWORD x5,
-                                     DWORD x6,
-                                     DWORD x7,
-                                     DWORD x8)
-{
-  dprintf(("NTDLL: NtCreateMailslotFile(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           x2,
-           x3,
-           x4,
-           x5,
-           x6,
-           x7,
-           x8));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtQuerySystemInformation [NTDLL.168]
- *
- * ARGUMENTS:
- *  SystemInformationClass               Index to a certain information structure
- * SystemTimeAdjustmentInformation       SYSTEM_TIME_ADJUSTMENT
- * SystemCacheInformation                   SYSTEM_CACHE_INFORMATION
- * SystemConfigurationInformation        CONFIGURATION_INFORMATION
- * observed (class/len):
- *    0x0/0x2c
- *    0x12/0x18
- *    0x2/0x138
- *    0x8/0x600
- *  SystemInformation                    caller supplies storage for the information structure
- *  Length     size of the structure
- *  ResultLength  Data written
- */
-NTSTATUS WINAPI NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS SystemInformationClass,
-                                         PVOID                    SystemInformation,
-                                         ULONG                    Length,
-                                         PULONG                   ResultLength)
-{
-  dprintf(("NTDLL: NtQuerySystemInformation(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           SystemInformationClass,
-           SystemInformation,
-           Length,
-           ResultLength));
-
-  ZeroMemory (SystemInformation, Length);
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtCreatePagingFile                      [NTDLL]
- */
-NTSTATUS WINAPI NtCreatePagingFile(PUNICODE_STRING PageFileName,
-                                   ULONG MiniumSize,
-                                   ULONG MaxiumSize,
-                                   PULONG ActualSize)
-{
-  dprintf(("NTDLL: NtCreatePagingFile(%08xh, %08xh, %08xh, %08xh) not implemented.\n",
-           PageFileName,
-           MinimumSize,
-           MaximumSize,
-           ActualSize));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtDisplayString                               [NTDLL.95]
- *
- * writes a string to the nt-textmode screen eg. during startup
- */
-NTSTATUS WINAPI NtDisplayString (PUNICODE_STRING string)
-{
-  dprintf(("NTDLL: NtDisplayString(%08xh\n",
-           string));
-
-  WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE),
-                string->Buffer,
-                string->Length,
-                0,
-                0);
-
-  return 0;
-}
Index: trunk/src/NTDLL/ntdll.c
===================================================================
--- trunk/src/NTDLL/ntdll.c	(revision 47)
+++ 	(revision )
@@ -1,181 +1,0 @@
-/* $Id: ntdll.c,v 1.2 1999-06-01 21:52:15 phaller Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- * Win32 NT Runtime / NTDLL for OS/2
- *
- * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
- *
- * @(#) ntdll.cpp  1.0.1   1999/05/08 SvL: Changes for compilation with Wine headers
- *                 1.0.0   1998/05/20 PH Start from WINE/NTDLL.C
- *
- * NT basis DLL
- *
- * Copyright 1996 Marcus Meissner
- * Copyright 1998 Patrick Haller (adapted for win32os2)
- */
-
- /* Changes to the original NTDLL.C from the WINE project
-
-  - includes replaced by the win32os2 standard includes
-  - replaced WINAPI by WIN32API
-  - moved in some string functions
-  - replaced HANDLE32 by HANDLE
-  - lstrlen32A -> OS2lstrlenA
-  - lstrlen32W -> OS2lstrlenW
-*/
-
-/*****************************************************************************
- * Includes                                                                  *
- *****************************************************************************/
-
-#include <os2win.h>
-#include <winnt.h>
-#include <ntdef.h>
-#include <builtin.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include "misc.h"
-#include "unicode.h"
-
-#include "ntdll.h"
-
-
-/*****************************************************************************
- * Types & Defines                                                           *
- *****************************************************************************/
-
-#define NTSTATUS DWORD
-
-
-/***********************************************************************
-*           lstrcpynAtoW   (Not a Windows API)
-* Note: this function differs from the UNIX strncpy, it _always_ writes
-* a terminating \0
-*/
-LPWSTR WIN32API lstrcpynAtoW(LPWSTR dst,
-                             LPCSTR src,
-                             INT  n)
-{
-  LPWSTR p = dst;
-  while ((n-- > 1) && *src) *p++ = (WCHAR)(unsigned char)*src++;
-  if (n >= 0) *p = 0;
-  return dst;
-}
-
-
-/***********************************************************************
-*           lstrcpynWtoA   (Not a Windows API)
-* Note: this function differs from the UNIX strncpy, it _always_ writes
-* a terminating \0
-*/
-LPSTR WIN32API lstrcpynWtoA(LPSTR   dst,
-                            LPCWSTR src,
-                            INT   n)
-{
-  LPSTR p = dst;
-  while ((n-- > 1) && *src) *p++ = (CHAR)*src++;
-  if (n >= 0) *p = 0;
-  return dst;
-}
-
-
-/***********************************************************************
- *           lstrncmp32W   (Not a Windows API)
- */
-INT WIN32API lstrncmpW( LPCWSTR str1, LPCWSTR str2, INT n )
-{
-  if (!n)
-    return 0;
-
-  while ((--n > 0) && *str1 && (*str1 == *str2))
-  {
-    str1++;
-    str2++;
-  }
-
-  return (INT)(*str1 - *str2);
-}
-
-
-
-/***********************************************************************
-*           HEAP_strdupA
-*/
-LPSTR HEAP_strdupA(HANDLE heap,
-                   DWORD  flags,
-                   LPCSTR str)
-{
-  LPSTR p = HeapAlloc(heap,
-                      flags,
-                      lstrlenA(str) + 1 );
-
-  lstrcpyA(p, str);
-  return p;
-}
-
-
-/***********************************************************************
-*           HEAP_strdupW
-*/
-LPWSTR HEAP_strdupW(HANDLE  heap,
-                    DWORD   flags,
-                    LPCWSTR str)
-{
-  INT len = lstrlenW(str) + 1;
-  LPWSTR p = HeapAlloc(heap,
-                       flags,
-                       len * sizeof(WCHAR) );
-  lstrcpyW(p,
-              str);
-  return p;
-}
-
-
-/***********************************************************************
-*           HEAP_strdupWtoA
-*/
-LPSTR HEAP_strdupWtoA(HANDLE  heap,
-                      DWORD   flags,
-                      LPCWSTR str )
-{
-  LPSTR ret;
-
-  if (!str)
-    return NULL;
-
-  ret = HeapAlloc(heap,
-                  flags,
-                  lstrlenW(str) + 1 );
-  UnicodeToAscii((LPWSTR)str,
-                 ret);
-/*  lstrcpyWtoA(ret,
-              str);*/
-  return ret;
-}
-
-/***********************************************************************
-*           HEAP_strdupAtoW
-*/
-LPWSTR HEAP_strdupAtoW(HANDLE heap,
-                       DWORD  flags,
-                       LPCSTR str)
-{
-  LPWSTR ret;
-
-  if (!str)
-    return NULL;
-
-  ret = HeapAlloc(heap,
-                     flags,
-                     (lstrlenA(str)+1) * sizeof(WCHAR) );
-  AsciiToUnicode((char *)str,
-                 ret);
-  /* lstrcpyAtoW(ret,
-              str );*/
-
-  return ret;
-}
-
Index: trunk/src/NTDLL/ntdll.vpj
===================================================================
--- trunk/src/NTDLL/ntdll.vpj	(revision 47)
+++ 	(revision )
@@ -1,26 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd ntdll.dll
-execute=:Execute:E&xecute,ntdll.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-makefile
-ntdll.c
-ntdll.def
-ntdll.h
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/NTDLL/om.c
===================================================================
--- trunk/src/NTDLL/om.c	(revision 47)
+++ 	(revision )
@@ -1,246 +1,0 @@
-/*
- * Project Odin Software License can be found in LICENSE.TXT
- * Win32 NT Runtime / NTDLL for OS/2
- *
- * Copyright 1998       original WINE Author
- * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
- *
- * Object management functions
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "ntdll.h"
-
-/* move to somewhere */
-typedef void * POBJDIR_INFORMATION;
-
-/*
- * Generic object functions
- */
-
-/******************************************************************************
- * NtQueryObject [NTDLL.161]
- */
-NTSTATUS WINAPI NtQueryObject(HANDLE                   ObjectHandle,
-                              OBJECT_INFORMATION_CLASS ObjectInformationClass,
-                              PVOID                    ObjectInformation,
-                              ULONG                    Length,
-                              PULONG                   ResultLength)
-{
-  dprintf(("NTDLL: NtQueryObject(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           ObjectHandle,
-           ObjectInformationClass,
-           ObjectInformation,
-           Length,
-           ResultLength));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtQuerySecurityObject                [NTDLL]
- */
-NTSTATUS WINAPI NtQuerySecurityObject(DWORD x1,
-                                      DWORD x2,
-                                      DWORD x3,
-                                      DWORD x4,
-                                      DWORD x5)
-{
-  dprintf(("NTDLL: NtQuerySecurityObject(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           x2,
-           x3,
-           x4,
-           x5));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtDuplicateObject                       [NTDLL]
- */
-NTSTATUS WINAPI NtDuplicateObject(HANDLE      SourceProcessHandle,
-                                  PHANDLE     SourceHandle,
-                                  HANDLE      TargetProcessHandle,
-                                  PHANDLE     TargetHandle,
-                                  ACCESS_MASK DesiredAccess,
-                                  BOOLEAN     InheritHandle,
-                                  ULONG       Options)
-{
-  dprintf (("NTDLL: NtDuplicateObject(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-            SourceProcessHandle,
-            SourceHandle,
-            TargetProcessHandle,
-            TargetHandle,
-            DesiredAccess,
-            InheritHandle,
-            Options));
-
-  *TargetHandle = 0;
-  return 0;
-}
-
-
-/**************************************************************************
- *                 NtClose                        [NTDLL.65]
- * FUNCTION: Closes a handle reference to an object
- * ARGUMENTS:
- * Handle   handle to close
- */
-//NTSTATUS WINAPI NtClose(
-//   HANDLE Handle)
-//{
-//   FIXME(ntdll,"(0x%08x),stub!\n",Handle);
-//   return 1;
-//}
-
-
-/******************************************************************************
- *  NtWaitForSingleObject                   [NTDLL]
- */
-NTSTATUS WINAPI NtWaitForSingleObject(PHANDLE        Object,
-                                      BOOLEAN        Alertable,
-                                      PLARGE_INTEGER Time)
-{
-  dprintf(("NTDLL: NtWaitForSingleObject(%08xh,%08xh,%08xh) not implemented.\n",
-           Object,
-           Alertable,
-           Time));
-
-  return 0;
-}
-
-
-/*
- * Directory functions
- */
-
-/**************************************************************************
- * NtOpenDirectoryObject [NTDLL.124]
- * FUNCTION: Opens a namespace directory object
- * ARGUMENTS:
- *  DirectoryHandle                      Variable which receives the directory handle
- *  DesiredAccess Desired access to the directory
- *  ObjectAttributes                     Structure describing the directory
- * RETURNS: Status
- */
-NTSTATUS WINAPI NtOpenDirectoryObject(PHANDLE            DirectoryHandle,
-                                      ACCESS_MASK        DesiredAccess,
-                                      POBJECT_ATTRIBUTES ObjectAttributes)
-{
-  dprintf(("NTDLL: NtOpenDirectoryObject(%08xh,%08xh,%08xh) not implemented.\n",
-           DirectoryHandle,
-           DesiredAccess,
-           ObjectAttributes));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtCreateDirectoryObject              [NTDLL]
- */
-NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE            DirectoryHandle,
-                                        ACCESS_MASK        DesiredAccess,
-                                        POBJECT_ATTRIBUTES ObjectAttributes)
-{
-  dprintf(("NTDLL: NtCreateDirectoryObject(%08xh,%08xh,%08xh) not implemented.\n",
-           DirectoryHandle,
-           DesiredAccess,
-           ObjectAttributes));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtQueryDirectoryObject [NTDLL.149]
- * FUNCTION: Reads information from a namespace directory
- * ARGUMENTS:
- *  DirObjInformation                    Buffer to hold the data read
- *  BufferLength  Size of the buffer in bytes
- *  GetNextIndex  If TRUE then set ObjectIndex to the index of the next object
- *       If FALSE then set ObjectIndex to the number of objects in the directory
- *  IgnoreInputIndex                     If TRUE start reading at index 0
- *       If FALSE start reading at the index specified by object index
- *  ObjectIndex                          Zero based index into the directory, interpretation depends on IgnoreInputIndex and GetNextIndex
- *  DataWritten                          Caller supplied storage for the number of bytes written (or NULL)
- */
-NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE              DirObjHandle,
-                                       POBJDIR_INFORMATION DirObjInformation,
-                                       ULONG               BufferLength,
-                                       BOOLEAN             GetNextIndex,
-                                       BOOLEAN             IgnoreInputIndex,
-                                       PULONG              ObjectIndex,
-                                       PULONG              DataWritten)
-{
-  dprintf(("NTDLL: NtQueryDirectoryObject(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           DirObjHandle,
-           DirObjInformation,
-           BufferLength,
-           GetNextIndex,
-           IgnoreInputIndex,
-           ObjectIndex,
-           DataWritten));
-
-  return 0xc0000000; /* We don't have any. Whatever. (Yet.) */
-}
-
-
-/*
- * Link objects
- */
-
-/******************************************************************************
- *  NtOpenSymbolicLinkObject             [NTDLL]
- */
-NTSTATUS WINAPI NtOpenSymbolicLinkObject(PHANDLE            LinkHandle,
-                                         ACCESS_MASK        DesiredAccess,
-                                         POBJECT_ATTRIBUTES ObjectAttributes)
-{
-  dprintf(("NTDLL: NtOpenSymbolicLinkObject(%08xh,%08xh,%08xh) not implemented.\n",
-           LinkHandle,
-           DesiredAccess,
-           ObjectAttributes));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtCreateSymbolicLinkObject           [NTDLL]
- */
-NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE            SymbolicLinkHandle,
-                                           ACCESS_MASK        DesiredAccess,
-                                           POBJECT_ATTRIBUTES ObjectAttributes,
-                                           PUNICODE_STRING    Name)
-{
-  dprintf(("NTDLL: NtCreateSymbolicLinkObject(%08xh,%08xh,%08xh,%08x) not implemented.\n",
-           SymbolicLinkHandle,
-           DesiredAccess,
-           ObjectAttributes,
-           Name));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtQuerySymbolicLinkObject            [NTDLL]
- */
-NTSTATUS WINAPI NtQuerySymbolicLinkObject(HANDLE          LinkHandle,
-                                          PUNICODE_STRING LinkTarget,
-                                          PULONG          ReturnedLength)
-{
-  dprintf(("NTDLL: NtQuerySymbolicLinkObject(%08xh,%08xh,%08xh) not implemented.\n",
-           LinkHandle,
-           LinkTarget,
-           ReturnedLength));
-
-  return 0;
-}
-
Index: trunk/src/NTDLL/reg.c
===================================================================
--- trunk/src/NTDLL/reg.c	(revision 47)
+++ 	(revision )
@@ -1,362 +1,0 @@
-/*
- * Project Odin Software License can be found in LICENSE.TXT
- * Win32 NT Runtime / NTDLL for OS/2
- *
- * Copyright 1998       original WINE Author
- * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
- *
- * registry functions
- */
-
-#include "winreg.h"
-
-#include "ntdll.h"
-
-
-/******************************************************************************
- * NtCreateKey [NTDLL]
- * ZwCreateKey
- */
-NTSTATUS WINAPI NtCreateKey(PHANDLE            KeyHandle,
-                            ACCESS_MASK        DesiredAccess,
-                            POBJECT_ATTRIBUTES ObjectAttributes,
-                            ULONG              TitleIndex,
-                            PUNICODE_STRING    Class,
-                            ULONG              CreateOptions,
-                            PULONG             Disposition)
-{
-  dprintf (("NTDLL: NtCreateKey(%08xh,  %08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-            KeyHandle,
-            DesiredAccess,
-            ObjectAttributes,
-            TitleIndex,
-            Class,
-            CreateOptions,
-            Disposition));
-
-  return (0);
-}
-
-
-/******************************************************************************
- * NtDeleteKey [NTDLL]
- * ZwDeleteKey
- */
-NTSTATUS WINAPI NtDeleteKey(HANDLE KeyHandle)
-{
-  dprintf(("NTDLL: NtDeleteKey(%08xh) not implemented\n",
-           KeyHandle));
-
-  return (0);
-}
-
-
-/******************************************************************************
- * NtDeleteValueKey [NTDLL]
- * ZwDeleteValueKey
- */
-NTSTATUS WINAPI NtDeleteValueKey(HANDLE          KeyHandle,
-                                 PUNICODE_STRING ValueName)
-{
-  dprintf(("NTDLL: NtDeleteValueKey(%08xh, %08xh) not implemented\n",
-           KeyHandle,
-           ValueName));
-
-  return(0);
-}
-
-
-/******************************************************************************
- * NtEnumerateKey [NTDLL]
- * ZwEnumerateKey
- */
-NTSTATUS WINAPI NtEnumerateKey(HANDLE                KeyHandle,
-                               ULONG                 Index,
-                               KEY_INFORMATION_CLASS KeyInformationClass,
-                               PVOID                 KeyInformation,
-                               ULONG                 Length,
-                               PULONG                ResultLength)
-{
-  dprintf(("NTDLL: NtEnumerateKey(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           KeyHandle,
-           Index,
-           KeyInformationClass,
-           KeyInformation,
-           Length,
-           ResultLength));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtEnumerateValueKey                  [NTDLL]
- *  ZwEnumerateValueKey
- */
-NTSTATUS WINAPI NtEnumerateValueKey(HANDLE                      KeyHandle,
-                                    ULONG                       Index,
-                                    KEY_VALUE_INFORMATION_CLASS KeyInformationClass,
-                                    PVOID                       KeyInformation,
-                                    ULONG                       Length,
-                                    PULONG                      ResultLength)
-{
-  dprintf(("NTDLL: NtEnumerateValueKey(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           KeyHandle,
-           Index,
-           KeyInformationClass,
-           KeyInformation,
-           Length,
-           ResultLength));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtFlushKey [NTDLL]
- *  ZwFlushKey
- */
-NTSTATUS WINAPI NtFlushKey(HANDLE KeyHandle)
-{
-  dprintf(("NTDLL: NtFlushKey(%08xh)\n",
-           KeyHandle));
-
-  return ERROR_SUCCESS;
-}
-
-
-/******************************************************************************
- *  NtLoadKey  [NTDLL]
- *  ZwLoadKey
- */
-NTSTATUS WINAPI NtLoadKey(PHANDLE            KeyHandle,
-                          POBJECT_ATTRIBUTES ObjectAttributes)
-{
-  dprintf(("NTDLL: NtLoadKey(%08xh,%08xh) not implemented.\n",
-           KeyHandle,
-           ObjectAttributes));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtNotifyChangeKey                    [NTDLL]
- *  ZwNotifyChangeKey
- */
-NTSTATUS WINAPI NtNotifyChangeKey(HANDLE           KeyHandle,
-                                  HANDLE           Event,
-                                  PIO_APC_ROUTINE  ApcRoutine,
-                                  PVOID            ApcContext,
-                                  PIO_STATUS_BLOCK IoStatusBlock,
-                                  ULONG            CompletionFilter,
-                                  BOOLEAN          Asynchroneous,
-                                  PVOID            ChangeBuffer,
-                                  ULONG            Length,
-                                  BOOLEAN          WatchSubtree)
-{
-  dprintf(("NTDLL: NtNotifyChangeKey(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           KeyHandle,
-           Event,
-           ApcRoutine,
-           ApcContext,
-           IoStatusBlock,
-           CompletionFilter,
-           Asynchronous,
-           ChangeBuffer,
-           Length,
-           WatchSubTree));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtOpenKey [NTDLL.129]
- * ZwOpenKey
- *   OUT PHANDLE                            KeyHandle,
- *   IN     ACCESS_MASK                     DesiredAccess,
- *   IN     POBJECT_ATTRIBUTES           ObjectAttributes
- */
-NTSTATUS WINAPI NtOpenKey(PHANDLE            KeyHandle,
-                          ACCESS_MASK        DesiredAccess,
-                          POBJECT_ATTRIBUTES ObjectAttributes)
-{
-  dprintf(("NTDLL: NtOpenKey(%08xh,%08xh,%08xh) not implemented.\n",
-           KeyHandle,
-           DesiredAccess,
-           ObjectAttributes));
-  return 0;
-}
-
-
-/******************************************************************************
- * NtQueryKey [NTDLL]
- * ZwQueryKey
- */
-NTSTATUS WINAPI NtQueryKey(HANDLE                KeyHandle,
-                           KEY_INFORMATION_CLASS KeyInformationClass,
-                           PVOID                 KeyInformation,
-                           ULONG                 Length,
-                           PULONG                ResultLength)
-{
-  dprintf(("NTDLL: NtQueryKey(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           KeyHandle,
-           KeyInformationClass,
-           KeyInformation,
-           Length,
-           ResultLength));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtQueryMultipleValueKey [NTDLL]
- * ZwQueryMultipleValueKey
- */
-
-NTSTATUS WINAPI NtQueryMultipleValueKey(HANDLE KeyHandle,
-                                        PVALENTW ListOfValuesToQuery,
-                                        ULONG NumberOfItems,
-                                        PVOID MultipleValueInformation,
-                                        ULONG Length,
-                                        PULONG  ReturnLength)
-{
-  dprintf(("NTDLL: NtQueryMultipleValueKey(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           KeyHandle,
-           ListOfValuesToQuery,
-           NumberOfItems,
-           MultipleValueInformation,
-           Length,
-           ReturnLength));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtQueryValueKey [NTDLL]
- * ZwQueryValueKey
- */
-NTSTATUS WINAPI NtQueryValueKey(HANDLE                      KeyHandle,
-                                PUNICODE_STRING             ValueName,
-                                KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
-                                PVOID                       KeyValueInformation,
-                                ULONG                       Length,
-                                PULONG                      ResultLength)
-{
-  dprintf(("NTDLL: NtQueryValueKey(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           KeyHandle,
-           ValueName,
-           KeyValueInformationClass,
-           KeyValueInformation,
-           Length,
-           ResultLength));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtReplaceKey [NTDLL]
- * ZwReplaceKey
- */
-NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES ObjectAttributes,
-                             HANDLE             Key,
-                             POBJECT_ATTRIBUTES ReplacedObjectAttributes)
-{
-  dprintf(("NTDLL: NtReplaceKey(%08xh,%08xh,%08xh) not implemented.\n",
-           ObjectAttributes,
-           Key,
-           ReplacedObjectAttributes));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtRestoreKey [NTDLL]
- * ZwRestoreKey
- */
-NTSTATUS WINAPI NtRestoreKey(HANDLE KeyHandle,
-                             HANDLE FileHandle,
-                             ULONG RestoreFlags)
-{
-  dprintf(("NTDLL: NtRestoreKey(%08xh,%08xh,%08xh) not implemented.\n",
-           KeyHandle,
-           FileHandle,
-           RestoreFlags));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtSaveKey [NTDLL]
- * ZwSaveKey
- */
-NTSTATUS WINAPI NtSaveKey(HANDLE KeyHandle,
-                          HANDLE FileHandle)
-{
-  dprintf(("NTDLL NtSaveKey(%08xh,%08xh) not implemented.\n",
-           KeyHandle,
-           FileHandle));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtSetInformationKey [NTDLL]
- * ZwSetInformationKey
- */
-NTSTATUS WINAPI NtSetInformationKey(HANDLE    KeyHandle,
-                                    const int KeyInformationClass,
-                                    PVOID     KeyInformation,
-                                    ULONG     KeyInformationLength)
-{
-  dprintf(("NTDLL: NtSetInformationKey(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           KeyHandle,
-           KeyInformationClass,
-           KeyInformation,
-           KeyInformationLength));
-
-  return 0;
-}
-
-
-/******************************************************************************
- * NtSetValueKey [NTDLL]
- * ZwSetValueKey
- */
-NTSTATUS WINAPI NtSetValueKey(HANDLE          KeyHandle,
-                              PUNICODE_STRING ValueName,
-                              ULONG           TitleIndex,
-                              ULONG           Type,
-                              PVOID           Data,
-                              ULONG           DataSize)
-{
-  dprintf(("NTDLL: NtSetValueKey(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           KeyHandle,
-           ValueName,
-           TitleIndex,
-           Type,
-           Data,
-           DataSize));
-
-  return (0);
-}
-
-
-/******************************************************************************
- * NtUnloadKey [NTDLL]
- * ZwUnloadKey
- */
-NTSTATUS WINAPI NtUnloadKey(HANDLE KeyHandle)
-{
-  dprintf(("NTDLL: NtUnloadKey(%08xh) not implemented.\n",
-           KeyHandle));
-
-  return 0;
-}
Index: trunk/src/NTDLL/rtl.c
===================================================================
--- trunk/src/NTDLL/rtl.c	(revision 47)
+++ 	(revision )
@@ -1,667 +1,0 @@
-/*
- * Project Odin Software License can be found in LICENSE.TXT
- * Win32 NT Runtime / NTDLL for OS/2
- *
- * Copyright 1998       original WINE Author
- * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
- *
- * NT basis DLL
- *
- * This file contains the Rtl* API functions. These should be implementable.
- *
- * Copyright 1996-1998 Marcus Meissner
- *      1999 Alex Korobka
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "ntdll.h"
-
-#include "winuser.h"
-#include "winerror.h"
-#include "winreg.h"
-
-
-
-/*
- * resource functions
- */
-
-/***********************************************************************
- *           RtlInitializeResource       (NTDLL.409)
- *
- * xxxResource() functions implement multiple-reader-single-writer lock.
- * The code is based on information published in WDJ January 1999 issue.
- */
-void WINAPI RtlInitializeResource(LPRTL_RWLOCK rwl)
-{
-  dprintf(("NTDLL: RtlInitializeResource(%08xh)\n",
-           rwl));
-
-  if( rwl )
-  {
-    rwl->iNumberActive     = 0;
-    rwl->uExclusiveWaiters = 0;
-    rwl->uSharedWaiters    = 0;
-    rwl->hOwningThreadId   = 0;
-    rwl->dwTimeoutBoost    = 0; /* no info on this one, default value is 0 */
-    InitializeCriticalSection( &rwl->rtlCS );
-    rwl->hExclusiveReleaseSemaphore = CreateSemaphoreA( NULL, 0, 65535, NULL );
-    rwl->hSharedReleaseSemaphore    = CreateSemaphoreA( NULL, 0, 65535, NULL );
-  }
-}
-
-
-/***********************************************************************
- *           RtlDeleteResource              (NTDLL.330)
- */
-void WINAPI RtlDeleteResource(LPRTL_RWLOCK rwl)
-{
-  dprintf(("NTDLL: RtlDeleteResource(%08xh)\n",
-           rwl));
-
-  if( rwl )
-  {
-    EnterCriticalSection( &rwl->rtlCS );
-    if( rwl->iNumberActive || rwl->uExclusiveWaiters || rwl->uSharedWaiters )
-       dprintf(("NTDLL: RtlDeleteResource active MRSW lock (%p), expect failure\n",
-                rwl));
-
-    rwl->hOwningThreadId   = 0;
-    rwl->uExclusiveWaiters = rwl->uSharedWaiters = 0;
-    rwl->iNumberActive     = 0;
-    CloseHandle( rwl->hExclusiveReleaseSemaphore );
-    CloseHandle( rwl->hSharedReleaseSemaphore );
-    LeaveCriticalSection( &rwl->rtlCS );
-    DeleteCriticalSection( &rwl->rtlCS );
-  }
-}
-
-
-/***********************************************************************
- *          RtlAcquireResourceExclusive  (NTDLL.256)
- */
-BYTE WINAPI RtlAcquireResourceExclusive(LPRTL_RWLOCK rwl,
-                                        BYTE         fWait)
-{
-  BYTE retVal = 0;
-
-  if( !rwl )
-    return 0;
-
-  dprintf(("NTDLL: RtlAcquireResourceExclusive(%08xh,%08xh)\n",
-           rwl,
-           fWait));
-
-start:
-    EnterCriticalSection( &rwl->rtlCS );
-    if( rwl->iNumberActive == 0 ) /* lock is free */
-    {
-   rwl->iNumberActive = -1;
-   retVal = 1;
-    }
-    else if( rwl->iNumberActive < 0 ) /* exclusive lock in progress */
-    {
-    if( rwl->hOwningThreadId == GetCurrentThreadId() )
-    {
-        retVal = 1;
-        rwl->iNumberActive--;
-        goto done;
-    }
-wait:
-    if( fWait )
-    {
-        rwl->uExclusiveWaiters++;
-
-        LeaveCriticalSection( &rwl->rtlCS );
-        if( WaitForSingleObject( rwl->hExclusiveReleaseSemaphore, INFINITE ) == WAIT_FAILED )
-       goto done;
-        goto start; /* restart the acquisition to avoid deadlocks */
-    }
-    }
-    else  /* one or more shared locks are in progress */
-    if( fWait )
-        goto wait;
-
-    if( retVal == 1 )
-   rwl->hOwningThreadId = GetCurrentThreadId();
-done:
-    LeaveCriticalSection( &rwl->rtlCS );
-    return retVal;
-}
-
-/***********************************************************************
- *          RtlAcquireResourceShared     (NTDLL.257)
- */
-BYTE WINAPI RtlAcquireResourceShared(LPRTL_RWLOCK rwl,
-                                     BYTE         fWait)
-{
-  DWORD dwWait = WAIT_FAILED;
-  BYTE retVal = 0;
-
-  if( !rwl )
-    return 0;
-
-  dprintf(("NTDLL: RtlAcquireResourceShared(%08xh,%08xh)\n",
-           rwl,
-           fWait));
-
-start:
-    EnterCriticalSection( &rwl->rtlCS );
-    if( rwl->iNumberActive < 0 )
-    {
-   if( rwl->hOwningThreadId == GetCurrentThreadId() )
-   {
-       rwl->iNumberActive--;
-       retVal = 1;
-       goto done;
-   }
-
-   if( fWait )
-   {
-       rwl->uSharedWaiters++;
-       LeaveCriticalSection( &rwl->rtlCS );
-       if( (dwWait = WaitForSingleObject( rwl->hSharedReleaseSemaphore, INFINITE )) == WAIT_FAILED )
-      goto done;
-       goto start;
-   }
-    }
-    else
-    {
-   if( dwWait != WAIT_OBJECT_0 ) /* otherwise RtlReleaseResource() has already done it */
-       rwl->iNumberActive++;
-   retVal = 1;
-    }
-done:
-    LeaveCriticalSection( &rwl->rtlCS );
-    return retVal;
-}
-
-
-/***********************************************************************
- *           RtlReleaseResource             (NTDLL.471)
- */
-void WINAPI RtlReleaseResource(LPRTL_RWLOCK rwl)
-{
-  dprintf(("NTDLL: RtlReleaseResource(%08xh)\n",
-           rwl));
-
-    EnterCriticalSection( &rwl->rtlCS );
-
-    if( rwl->iNumberActive > 0 ) /* have one or more readers */
-    {
-   if( --rwl->iNumberActive == 0 )
-   {
-       if( rwl->uExclusiveWaiters )
-       {
-wake_exclusive:
-      rwl->uExclusiveWaiters--;
-      ReleaseSemaphore( rwl->hExclusiveReleaseSemaphore, 1, NULL );
-       }
-   }
-    }
-    else
-    if( rwl->iNumberActive < 0 ) /* have a writer, possibly recursive */
-    {
-   if( ++rwl->iNumberActive == 0 )
-   {
-       rwl->hOwningThreadId = 0;
-       if( rwl->uExclusiveWaiters )
-      goto wake_exclusive;
-       else
-      if( rwl->uSharedWaiters )
-      {
-          UINT n = rwl->uSharedWaiters;
-          rwl->iNumberActive = rwl->uSharedWaiters; /* prevent new writers from joining until
-                                                * all queued readers have done their thing */
-          rwl->uSharedWaiters = 0;
-          ReleaseSemaphore( rwl->hSharedReleaseSemaphore, n, NULL );
-      }
-   }
-    }
-    LeaveCriticalSection( &rwl->rtlCS );
-}
-
-
-/***********************************************************************
- *           RtlDumpResource                (NTDLL.340)
- */
-void WINAPI RtlDumpResource(LPRTL_RWLOCK rwl)
-{
-  dprintf(("NTDLL: RtlDumpResource(%08x)\n",
-           rwl));
-
-  if( rwl )
-  {
-    dprintf(("NTDLL: RtlDumpResource(%p):\n\tactive count = %i\n\twaiting readers = %i\n\twaiting writers = %i\n",
-             rwl,
-             rwl->iNumberActive,
-             rwl->uSharedWaiters,
-             rwl->uExclusiveWaiters));
-
-    if( rwl->iNumberActive )
-       dprintf(("NTDLL: \towner thread = %08x\n",
-                rwl->hOwningThreadId ));
-  }
-}
-
-
-/*
- * heap functions
- */
-
-/******************************************************************************
- *  RtlCreateHeap                        [NTDLL]
- */
-HANDLE WINAPI RtlCreateHeap(ULONG                Flags,
-                            PVOID                BaseAddress,
-                            ULONG                SizeToReserve,
-                            ULONG                SizeToCommit,
-                            PVOID                Unknown,
-                            PRTL_HEAP_DEFINITION Definition)
-{
-  dprintf(("NTDLL: RtlCreateHeap(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh).\n",
-           Flags,
-           BaseAddress,
-           SizeToReserve,
-           SizeToCommit,
-           Unknown,
-           Definition));
-
-  return HeapCreate(Flags,
-                    SizeToCommit,
-                    SizeToReserve);
-}
-
-
-/******************************************************************************
- *  RtlAllocateHeap                         [NTDLL]
- */
-PVOID WINAPI RtlAllocateHeap(HANDLE Heap,
-                             ULONG  Flags,
-                             ULONG  Size)
-{
-  dprintf(("NTDLL: RtlAllocateHeap(%08xh,%08xh,%08xh).\n",
-           Heap,
-           Flags,
-           Size));
-
-  return HeapAlloc(Heap,
-                   Flags,
-                   Size);
-}
-
-
-/******************************************************************************
- *  RtlFreeHeap                          [NTDLL]
- */
-BOOLEAN WINAPI RtlFreeHeap(HANDLE Heap,
-                           ULONG Flags,
-                           PVOID Address)
-{
-  dprintf(("NTDLL: RtlFreeHeap(%08xh,%08xh,%08xh)\n",
-           Heap,
-           Flags,
-           Address));
-
-  return HeapFree(Heap, Flags, Address);
-}
-
-
-/******************************************************************************
- *  RtlDestroyHeap                          [NTDLL]
- *
- * FIXME: prototype guessed
- */
-BOOLEAN WINAPI RtlDestroyHeap(HANDLE Heap)
-{
-  dprintf(("NTDLL: RtlDestroyHeap(%08xh)\n",
-           Heap));
-
-  return HeapDestroy(Heap);
-}
-
-
-/*
- * misc functions
- */
-
-/******************************************************************************
- * DbgPrint [NTDLL]
- */
-/* @@@PH how to port ? */
-#if 0
-void __cdecl DbgPrint(LPCSTR fmt,LPVOID args)
-{
-  dprintf(("NTDLL: DbgPrint(%s,08xh) not supported.\n",
-           fmt,
-           args));
-
-   /* hmm, raise exception? */
-}
-
-DWORD WINAPI NtRaiseException (DWORD           dwExceptionCode,
-                               DWORD           dwExceptionFlags,
-                               DWORD           nNumberOfArguments,
-                               CONST ULONG_PTR *lpArguments)
-{
-  dprintf(("NTDLL: NtRaiseException(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           dwExceptionCode,
-           dwExceptionFlags,
-           nNumberOfArguments,
-           lpArguments));
-
-  return 0;
-}
-
-
-DWORD WINAPI RtlRaiseException (DWORD x)
-{
-  dprintf(("NTDLL: RtlRaiseException(%08xh) not implemented.\n",
-           x));
-
-  return 0;
-}
-#endif
-
-
-/******************************************************************************
- *  RtlAcquirePebLock                       [NTDLL]
- */
-VOID WINAPI RtlAcquirePebLock(void)
-{
-  dprintf(("NTDLL: RtlAcquirePebLock() not implemented.\n"));
-
-  /* enter critical section ? */
-}
-
-
-/******************************************************************************
- *  RtlReleasePebLock                       [NTDLL]
- */
-VOID WINAPI RtlReleasePebLock(void)
-{
-  dprintf(("NTDLL: RtlReleasePebLock() not implemented.\n"));
-
-  /* leave critical section ? */
-}
-
-
-/******************************************************************************
- *  RtlIntegerToChar                     [NTDLL]
- */
-DWORD WINAPI RtlIntegerToChar(DWORD x1,
-                              DWORD x2,
-                              DWORD x3,
-                              DWORD x4)
-{
-  dprintf(("NTDLL: RtlIntegerToChar(%08xh,%08xh,%08xh,%08xh) not implemented.\n";
-           x1,
-           x2,
-           x3,
-           x4));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  RtlSetEnvironmentVariable               [NTDLL]
- */
-DWORD WINAPI RtlSetEnvironmentVariable(DWORD           x1,
-                                       PUNICODE_STRING key,
-                                       PUNICODE_STRING val)
-{
-  dprintf(("NTDLL: RtlSetEnvironmentVariable(%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           key,
-           val));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  RtlNewSecurityObject                    [NTDLL]
- */
-DWORD WINAPI RtlNewSecurityObject(DWORD x1,
-                                  DWORD x2,
-                                  DWORD x3,
-                                  DWORD x4,
-                                  DWORD x5,
-                                  DWORD x6)
-{
-  dprintf(("NTDLL: RtlNewSecurityObject(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n";
-           x1,
-           x2,
-           x3,
-           x4,
-           x5,
-           x6));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  RtlDeleteSecurityObject                 [NTDLL]
- */
-DWORD WINAPI RtlDeleteSecurityObject(DWORD x1)
-{
-  dprintf(("NTDLL: RtlDeleteSecurityObject(%08xh) not implemented.\n",
-           x1));
-
-  return 0;
-}
-
-
-/**************************************************************************
- *                 RtlNormalizeProcessParams      [NTDLL.441]
- */
-LPVOID WINAPI RtlNormalizeProcessParams(LPVOID x)
-{
-  dprintf(("NTDLL: RtlNormalizeProcessParams(%08xh) not implemented.\n",
-           x));
-
-  return x;
-}
-
-
-/**************************************************************************
- *                 RtlNtStatusToDosError       [NTDLL.442]
- */
-DWORD WINAPI RtlNtStatusToDosError(DWORD error)
-{
-  dprintf(("NTDLL: RtlNtStatusToDosError(%08xh) partially implemented.\n",
-           error));
-
-  switch (error)
-  {
-    case STATUS_SUCCESS:                return ERROR_SUCCESS;
-    case STATUS_INVALID_PARAMETER:      return ERROR_BAD_ARGUMENTS;
-    case STATUS_BUFFER_TOO_SMALL:       return ERROR_INSUFFICIENT_BUFFER;
-/*   case STATUS_INVALID_SECURITY_DESCR: return ERROR_INVALID_SECURITY_DESCR;*/
-    case STATUS_NO_MEMORY:              return ERROR_NOT_ENOUGH_MEMORY;
-/*   case STATUS_UNKNOWN_REVISION:
-     case STATUS_BUFFER_OVERFLOW:*/
-  }
-
-  dprintf(("NTDLL: RtlNtStatusToDosError(%08xh is unknown !)\n",
-           error));
-
-  return ERROR_SUCCESS;
-}
-
-
-/**************************************************************************
- *                 RtlGetNtProductType         [NTDLL.390]
- */
-BOOLEAN WINAPI RtlGetNtProductType(LPDWORD type)
-{
-  dprintf(("NTDLL: RtlGetNtProductType(%08xh) not correctly implemented.\n",
-           type));
-
-  *type=3; /* dunno. 1 for client, 3 for server? */
-  return 1;
-}
-
-
-/**************************************************************************
- *                 NTDLL_chkstk                   [NTDLL.862]
- *                 NTDLL_alloca_probe             [NTDLL.861]
- * Glorified "enter xxxx".
- */
-/* @@@PH how to port this to VAC ?
-REGS_ENTRYPOINT(NTDLL_chkstk)
-{
-    ESP_reg(context) -= EAX_reg(context);
-}
-
-REGS_ENTRYPOINT(NTDLL_alloca_probe)
-{
-    ESP_reg(context) -= EAX_reg(context);
-}
-*/
-
-/******************************************************************************
- * RtlExtendedLargeIntegerDivide [NTDLL.359]
- */
-INT WINAPI RtlExtendedLargeIntegerDivide(LARGE_INTEGER dividend,
-                                         DWORD         divisor,
-                                         LPDWORD       rest)
-{
-#if SIZEOF_LONG_LONG==8
-   long long x1 = *(long long*)&dividend;
-
-   if (*rest)
-      *rest = x1 % divisor;
-   return x1/divisor;
-#else
-  dprintf(("NTDLL: RtlExtendedLargeIntegerDevice(%08xh,%08xh,%08xh) not implemented.\n",
-           dividend,
-           divisor,
-           rest));
-
-  return 0;
-#endif
-}
-
-/******************************************************************************
- * RtlExtendedLargeIntegerMultiply [NTDLL.359]
- * Note: This even works, since gcc returns 64bit values in eax/edx just like
- * the caller expects. However... The relay code won't grok this I think.
- */
-#if 0
-/* longlong in VAC++ ? */
-long long WINAPI RtlExtendedIntegerMultiply(LARGE_INTEGER factor1,
-                                            INT factor2)
-{
-#if SIZEOF_LONG_LONG==8
-   return (*(long long*)&factor1) * factor2;
-#else
-  dprintf(("NTDLL: RtlExtendedLargeIntegerMultiply(%08xh,%08xh) not implemented.\n",
-           factor1,
-           factor2));
-
-  return 0;
-#endif
-}
-#endif
-/******************************************************************************
- *  RtlFormatCurrentUserKeyPath             [NTDLL.371]
- */
-DWORD WINAPI RtlFormatCurrentUserKeyPath(DWORD x)
-{
-  dprintf(("NTDLL: RtlFormatCurrentUserKeyPath(%08xh) not implemented.\n",
-           x));
-
-  return 1;
-}
-
-
-/******************************************************************************
- *  RtlOpenCurrentUser                      [NTDLL]
- */
-DWORD WINAPI RtlOpenCurrentUser(DWORD x1,
-                                DWORD *x2)
-{
-  /* Note: this is not the correct solution,
-   * But this works pretty good on wine and NT4.0 binaries
-   */
-  if (x1 == 0x2000000 )
-  {
-    *x2 = HKEY_CURRENT_USER;
-    return TRUE;
-  }
-
-  return FALSE;
-}
-
-
-/**************************************************************************
- *                 RtlDosPathNameToNtPathName_U      [NTDLL.338]
- *
- * FIXME: convert to UNC or whatever is expected here
- */
-BOOLEAN  WINAPI RtlDosPathNameToNtPathName_U(LPWSTR          from,
-                                             PUNICODE_STRING us,
-                                             DWORD           x2,
-                                             DWORD           x3)
-{
-  LPSTR fromA = HEAP_strdupWtoA(GetProcessHeap(),0,from);
-
-  dprintf(("NTDLL: RtlDosPathNameToNtPathName_U(%08xh,%08h,%08xh,%08xh) not implemented.\n",
-           from,
-           us,
-           x2,
-           x3));
-
-  if (us)
-    RtlInitUnicodeString(us,HEAP_strdupW(GetProcessHeap(),0,from));
-
-  return TRUE;
-}
-
-
-/******************************************************************************
- *  RtlCreateEnvironment                    [NTDLL]
- */
-DWORD WINAPI RtlCreateEnvironment(DWORD x1,
-                                  DWORD x2)
-{
-  dprintf(("NTDLL: RtlCreateEnvironment(%08xh, %08xh) not implemented.\n",
-           x1,
-           x2));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  RtlDestroyEnvironment                   [NTDLL]
- */
-DWORD WINAPI RtlDestroyEnvironment(DWORD x)
-{
-  dprintf(("NTDLL: RtlDestroyEnvironment(%08xh) not implemented.\n",
-           x));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  RtlQueryEnvironmentVariable_U           [NTDLL]
- */
-DWORD WINAPI RtlQueryEnvironmentVariable_U(DWORD           x1,
-                                           PUNICODE_STRING key,
-                                           PUNICODE_STRING val)
-{
-  dprintf(("NTDLL: RtlQueryEnvironmentVariable_U(%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           key,
-           val));
-
-  return 0;
-}
-
Index: trunk/src/NTDLL/rtlstr.c
===================================================================
--- trunk/src/NTDLL/rtlstr.c	(revision 47)
+++ 	(revision )
@@ -1,541 +1,0 @@
-/*
- * Project Odin Software License can be found in LICENSE.TXT
- * Win32 NT Runtime / NTDLL for OS/2
- *
- * Copyright 1998       original WINE Author
- * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
- *
- * Rtl string functions
- *
- * Copyright 1996-1998 Marcus Meissner
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "ntdll.h"
-#include "windef.h"
-
-#ifdef HAVE_WCTYPE_H
-# include <wctype.h>
-#endif
-#include "wine/winestring.h"
-#include "winnls.h"
-
-
-
-/*
- * STRING FUNCTIONS
- */
-
-/**************************************************************************
- *                 RtlAnsiStringToUnicodeString      [NTDLL.269]
- */
-DWORD WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING uni,
-                                             PANSI_STRING    ansi,
-                                             BOOLEAN         doalloc)
-{
-  DWORD unilen = (ansi->Length+1)*sizeof(WCHAR);
-
-  dprintf(("NTDLL: RtlAnsiStringToUnicodeString(%08xh,%08xh,%08xh)\n",
-           uni,
-           ansi,
-           doalloc));
-
-  if (unilen>0xFFFF)
-    return STATUS_INVALID_PARAMETER_2;
-
-  uni->Length = unilen;
-  if (doalloc)
-  {
-    uni->MaximumLength = unilen;
-    uni->Buffer = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,unilen);
-    if (!uni->Buffer)
-      return STATUS_NO_MEMORY;
-  }
-
-  if (unilen>uni->MaximumLength)
-    return STATUS_BUFFER_OVERFLOW;
-
-  lstrcpynAtoW(uni->Buffer,ansi->Buffer,unilen/2);
-
-  return STATUS_SUCCESS;
-}
-
-
-/**************************************************************************
- *                 RtlOemStringToUnicodeString    [NTDLL.447]
- */
-DWORD WINAPI RtlOemStringToUnicodeString(PUNICODE_STRING uni,
-                                            PSTRING         ansi,
-                                            BOOLEAN         doalloc)
-{
-  DWORD unilen = (ansi->Length+1)*sizeof(WCHAR);
-
-  dprintf(("NTDLL: RtlOemStringToUnicodeString(%08xh,%08xh,%08xh)\n",
-           uni,
-           ansi,
-           doalloc));
-
-  if (unilen>0xFFFF)
-    return STATUS_INVALID_PARAMETER_2;
-
-  uni->Length = unilen;
-  if (doalloc)
-  {
-    uni->MaximumLength = unilen;
-    uni->Buffer = HeapAlloc(GetProcessHeap(),
-                            HEAP_ZERO_MEMORY,
-                            unilen);
-
-    if (!uni->Buffer)
-      return STATUS_NO_MEMORY;
-  }
-
-  if (unilen>uni->MaximumLength)
-    return STATUS_BUFFER_OVERFLOW;
-
-  lstrcpynAtoW(uni->Buffer,
-               ansi->Buffer,
-               unilen/2);
-  return STATUS_SUCCESS;
-}
-
-
-/**************************************************************************
- *                 RtlMultiByteToUnicodeN      [NTDLL.436]
- * FIXME: multibyte support
- */
-DWORD WINAPI RtlMultiByteToUnicodeN(LPWSTR  unistr,
-                                       DWORD   unilen,
-                                       LPDWORD reslen,
-                                       LPSTR   oemstr,
-                                       DWORD   oemlen)
-{
-  DWORD len;
-  LPWSTR x;
-
-  dprintf(("NTDLL: RtlMultiByteToUnicodeN(%08xh,%08xh,%08xh,%08xh,%08xh)\n",
-           unistr,
-           unilen,
-           reslen,
-           oemstr,
-           oemlen));
-
-  len = oemlen;
-
-  if (unilen/2 < len)
-     len = unilen/2;
-
-  x=(LPWSTR)HeapAlloc(GetProcessHeap(),
-                      HEAP_ZERO_MEMORY,
-                      (len+1)*sizeof(WCHAR));
-
-  lstrcpynAtoW(x,
-               oemstr,
-               len+1);
-
-  memcpy(unistr,
-         x,
-         len*2);
-
-  if (reslen)
-    *reslen = len*2;
-
-  return 0;
-}
-
-
-/**************************************************************************
- *                 RtlOemToUnicodeN            [NTDLL.448]
- */
-DWORD WINAPI RtlOemToUnicodeN(LPWSTR  unistr,
-                                 DWORD   unilen,
-                                 LPDWORD reslen,
-                                 LPSTR   oemstr,
-                                 DWORD   oemlen)
-{
-  DWORD len;
-  LPWSTR x;
-
-  dprintf(("NTDLL: RtlOemToUnicodeN(%08xh,%08xh,%08xh,%08xh,%08xh)\n",
-           unistr,
-           unilen,
-           reslen,
-           oemstr,
-           oemlen));
-
-  len = oemlen;
-
-  if (unilen/2 < len)
-    len = unilen/2;
-
-  x=(LPWSTR)HeapAlloc(GetProcessHeap(),
-                      HEAP_ZERO_MEMORY,
-                      (len+1)*sizeof(WCHAR));
-
-  lstrcpynAtoW(x,
-               oemstr,
-               len+1);
-
-  memcpy(unistr,
-         x,
-         len*2);
-
-  if (reslen)
-    *reslen = len*2;
-
-  return 0;
-}
-
-
-/**************************************************************************
- *                 RtlInitAnsiString           [NTDLL.399]
- */
-VOID WINAPI RtlInitAnsiString(PANSI_STRING target,
-                              LPCSTR       source)
-{
-  dprintf(("NTDLL: RtlInitAnsiString(%08xh, %08xh)\n",
-           target,
-           source));
-
-  target->Length        = target->MaximumLength = 0;
-  target->Buffer        = (LPSTR)source;
-  if (!source)
-     return;
-
-  target->MaximumLength = lstrlenA(target->Buffer);
-  target->Length        = target->MaximumLength+1;
-}
-
-
-/**************************************************************************
- *                 RtlInitString               [NTDLL.402]
- */
-VOID WINAPI RtlInitString(PSTRING target,
-                          LPCSTR  source)
-{
-  dprintf (("NTDLL: RtlInitString(%08xh, %08xh)\n",
-            target,
-            source));
-
-  target->Length        = target->MaximumLength = 0;
-  target->Buffer        = (LPSTR)source;
-  if (!source)
-     return;
-
-  target->MaximumLength = lstrlenA(target->Buffer);
-  target->Length        = target->MaximumLength+1;
-}
-
-
-/**************************************************************************
- *                 RtlInitUnicodeString        [NTDLL.403]
- */
-VOID WINAPI RtlInitUnicodeString(PUNICODE_STRING target,
-                                 LPCWSTR         source)
-{
-  dprintf(("NTDLL: RtlInitUnicodeString(%08xh,%08xh)\n",
-           target,
-           source));
-
-   target->Length = target->MaximumLength = 0;
-   target->Buffer = (LPWSTR)source;
-   if (!source)
-      return;
-
-   target->MaximumLength = lstrlenW(target->Buffer)*2;
-   target->Length        = target->MaximumLength+2;
-}
-
-
-/**************************************************************************
- *                 RtlFreeUnicodeString        [NTDLL.377]
- */
-VOID WINAPI RtlFreeUnicodeString(PUNICODE_STRING str)
-{
-  dprintf(("NTDLL: RtlFreeUnicodeString(%08xh)\n",
-           str));
-
-  if (str->Buffer)
-    HeapFree(GetProcessHeap(),
-             0,
-             str->Buffer);
-}
-
-
-/**************************************************************************
- * RtlFreeAnsiString [NTDLL.373]
- */
-VOID WINAPI RtlFreeAnsiString(PANSI_STRING AnsiString)
-{
-  dprintf(("NTDLL: RtlFreeAnsiString(%08xh)\n",
-           AnsiString));
-
-  if( AnsiString->Buffer )
-      HeapFree(GetProcessHeap(),
-               0,
-               AnsiString->Buffer);
-}
-
-
-/**************************************************************************
- *                 RtlUnicodeToOemN            [NTDLL.515]
- */
-DWORD WINAPI RtlUnicodeToOemN(LPSTR   oemstr,
-                                 DWORD   oemlen,
-                                 LPDWORD reslen,
-                                 LPWSTR  unistr,
-                                 DWORD   unilen)
-{
-  DWORD len;
-  LPSTR x;
-
-  dprintf(("NTDLL: RtlUnicodeToOemN(%08xh,%08xh,%08xh,%08xh,%08xh)\n",
-           oemstr,
-           oemlen,
-           reslen,
-           unistr,
-           unilen));
-
-  len = oemlen;
-
-  if (unilen/2 < len)
-    len = unilen/2;
-
-  x=(LPSTR)HeapAlloc(GetProcessHeap(),
-                     HEAP_ZERO_MEMORY,
-                     len+1);
-
-  lstrcpynWtoA(x,
-               unistr,
-               len+1);
-
-  memcpy(oemstr,
-         x,
-         len);
-
-  if (reslen)
-    *reslen = len;
-
-  return 0;
-}
-
-
-/**************************************************************************
- *                 RtlUnicodeStringToOemString    [NTDLL.511]
- */
-DWORD WINAPI RtlUnicodeStringToOemString(PANSI_STRING    oem,
-                                            PUNICODE_STRING uni,
-                                            BOOLEAN         alloc)
-{
-  dprintf(("NTDLL: RtlUnicodeStringToOemString(%08xh,%08xh,%08xh)\n",
-           oem,
-           uni,
-           alloc));
-
-  if (alloc)
-  {
-    oem->Buffer = (LPSTR)HeapAlloc(GetProcessHeap(),
-                                   HEAP_ZERO_MEMORY,
-                                   uni->Length/2)+1;
-    oem->MaximumLength = uni->Length/2+1;
-  }
-
-  oem->Length = uni->Length/2;
-  lstrcpynWtoA(oem->Buffer,
-               uni->Buffer,
-               uni->Length/2+1);
-  return 0;
-}
-
-/**************************************************************************
- *                 RtlUnicodeStringToAnsiString      [NTDLL.507]
- */
-DWORD WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING    oem,
-                                             PUNICODE_STRING uni,
-                                             BOOLEAN         alloc)
-{
-  dprintf(("NTDLL: RtlUnicodeStringToAnsiString(%08xh,%08xh,%08xh)\n",
-           oem,
-           uni,
-           alloc));
-
-  if (alloc)
-  {
-     oem->Buffer = (LPSTR)HeapAlloc(GetProcessHeap(),
-                                    HEAP_ZERO_MEMORY,
-                                    uni->Length/2)+1;
-     oem->MaximumLength = uni->Length/2+1;
-  }
-
-  oem->Length = uni->Length/2;
-  lstrcpynWtoA(oem->Buffer,
-               uni->Buffer,
-               uni->Length/2+1);
-
-  return 0;
-}
-
-/**************************************************************************
- *                 RtlEqualUnicodeString    [NTDLL]
- */
-DWORD WINAPI RtlEqualUnicodeString(PUNICODE_STRING s1,
-                                   PUNICODE_STRING s2,
-                                   DWORD           x)
-{
-  dprintf(("NTDLL: RtlEqualUnicodeString(%08xh,%08xh,%08xh)\n",
-           s1,
-           s2,
-           x));
-
-  if (s1->Length != s2->Length)
-    return 1;
-
-  return !lstrncmpW(s1->Buffer,
-                    s2->Buffer,
-                    s1->Length/2);
-}
-
-
-/**************************************************************************
- *                 RtlUpcaseUnicodeString      [NTDLL.520]
- */
-DWORD WINAPI RtlUpcaseUnicodeString(PUNICODE_STRING dest,
-                                    PUNICODE_STRING src,
-                                    BOOLEAN         doalloc)
-{
-  LPWSTR s,t;
-  DWORD  i,len;
-
-  dprintf(("NTDLL: RtlUpcaseUnicodeString(%08xh,%08xh,%08xh)\n",
-           dest,
-           src,
-           doalloc));
-
-  len = src->Length;
-  if (doalloc)
-  {
-    dest->MaximumLength = len;
-    dest->Buffer = (LPWSTR)HeapAlloc(GetProcessHeap(),
-                                     HEAP_ZERO_MEMORY,
-                                     len);
-    if (!dest->Buffer)
-      return STATUS_NO_MEMORY;
-   }
-
-  if (dest->MaximumLength < len)
-    return STATUS_BUFFER_OVERFLOW;
-
-  s=dest->Buffer;
-  t=src->Buffer;
-
-  /* len is in bytes */
-  for (i = 0;
-       i < len/2;
-       i++)
-    s[i] = towupper(t[i]);
-
-  return STATUS_SUCCESS;
-}
-
-
-/**************************************************************************
- *                 RtlxOemStringToUnicodeSize     [NTDLL.549]
- */
-UINT WINAPI RtlxOemStringToUnicodeSize(PSTRING str)
-{
-  dprintf(("NTDLL: RtlxOemStringToUnicodeSize(%08xh)\n",
-           str));
-
-  return str->Length*2+2;
-}
-
-
-/**************************************************************************
- *                 RtlxAnsiStringToUnicodeSize    [NTDLL.548]
- */
-UINT WINAPI RtlxAnsiStringToUnicodeSize(PANSI_STRING str)
-{
-  dprintf(("NTDLL: RtlxAnsiStringToUnicodeSize(%08xh)\n",
-           str));
-
-  return str->Length*2+2;
-}
-
-
-/**************************************************************************
- *                 RtlIsTextUnicode            [NTDLL.417]
- *
- * Apply various feeble heuristics to guess whether
- * the text buffer contains Unicode.
- * FIXME: should implement more tests.
- */
-DWORD WINAPI RtlIsTextUnicode(LPVOID buf,
-                              DWORD  len,
-                              DWORD  *pf)
-{
-  LPWSTR s = buf;
-  DWORD  flags = -1,
-         out_flags = 0;
-
-  dprintf(("NTDLL: RtlIsTextUnicode(%08xh,%08xh,%08xh)\n",
-           buf,
-           len,
-           pf));
-
-  if (!len)
-    goto out;
-
-  if (pf)
-    flags = *pf;
-
-  /*
-   * Apply various tests to the text string. According to the
-   * docs, each test "passed" sets the corresponding flag in
-   * the output flags. But some of the tests are mutually
-   * exclusive, so I don't see how you could pass all tests ...
-   */
-
-  /* Check for an odd length ... pass if even. */
-  if (!(len & 1))
-    out_flags |= IS_TEXT_UNICODE_ODD_LENGTH;
-
-  /* Check for the special unicode marker byte. */
-  if (*s == 0xFEFF)
-    out_flags |= IS_TEXT_UNICODE_SIGNATURE;
-
-  /*
-   * Check whether the string passed all of the tests.
-   */
-  flags &= ITU_IMPLEMENTED_TESTS;
-  if ((out_flags & flags) != flags)
-    len = 0;
-
-out:
-  if (pf)
-    *pf = out_flags;
-
-  return len;
-}
-
-
-/******************************************************************************
- * RtlCompareUnicodeString               [NTDLL]
- */
-DWORD WINAPI RtlCompareUnicodeString(PUNICODE_STRING String1,
-                                        PUNICODE_STRING String2,
-                                        BOOLEAN         CaseInSensitive)
-{
-  dprintf(("NTDLL: RtlCompareUnicodeString(%08xh,%08xh,%08xh) not implemented.\n",
-           String1,
-           String2,
-           CaseInSensitive));
-
-  return 0;
-}
-
-
Index: trunk/src/NTDLL/sec.c
===================================================================
--- trunk/src/NTDLL/sec.c	(revision 47)
+++ 	(revision )
@@ -1,712 +1,0 @@
-/*
- * Project Odin Software License can be found in LICENSE.TXT
- * Win32 NT Runtime / NTDLL for OS/2
- *
- * Copyright 1998       original WINE Author
- * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
- *
- * Security functions
- *
- * Copyright 1996-1998 Marcus Meissner
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <ctype.h>
-#include <math.h>
-
-#include <os2win.h>
-#include "ntdll.h"
-
-/*
-#include "windef.h"
-#include "winbase.h"
-#include "winuser.h"
-#include "wine/winestring.h"
-#include "heap.h"
-#include "winnls.h"
-#include "winuser.h"
-#include "winerror.h"
-#include "stackframe.h"
-
-#include "winreg.h"
-*/
-
-/*
- * SID FUNCTIONS
- */
-
-/******************************************************************************
- *  RtlAllocateAndInitializeSid             [NTDLL.265]
- *
- */
-BOOLEAN WINAPI RtlAllocateAndInitializeSid (PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
-                                            DWORD                     nSubAuthorityCount,
-                                            DWORD                     x3,
-                                            DWORD                     x4,
-                                            DWORD                     x5,
-                                            DWORD                     x6,
-                                            DWORD                     x7,
-                                            DWORD                     x8,
-                                            DWORD                     x9,
-                                            DWORD                     x10,
-                                            PSID                      pSid)
-{
-  dprintf(("NTDLL: RtlAllocateAndInitializeSid(%08xh,%08xh,%08xh,"
-           "%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           pIdentifierAuthority,
-           nSubAuthorityCount,
-           x3,
-           x4,
-           x5,
-           x6,
-           x7,
-           x8,
-           x9,
-           x10,
-           pSid));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  RtlEqualSid                          [NTDLL.352]
- *
- */
-DWORD WINAPI RtlEqualSid(DWORD x1,
-                         DWORD x2)
-{
-  dprintf(("NTDLL: RtlEqualSid(%08x, %08x) not implemented.\n",
-           x1,
-           x2));
-
-  return TRUE;
-}
-
-
-/******************************************************************************
- *  RtlFreeSid    [NTDLL.376]
- */
-DWORD WINAPI RtlFreeSid(DWORD x1)
-{
-  dprintf(("NTDLL: RtlFreeSid(%08xh) not implemented.\n",
-           x1));
-
-  return TRUE;
-}
-
-
-/**************************************************************************
- *                 RtlLengthRequiredSid        [NTDLL.427]
- */
-DWORD WINAPI RtlLengthRequiredSid(DWORD nrofsubauths)
-{
-  dprintf (("NTDLL: RtlLengthRequiredSid(%08xh)\n",
-            nrofsubauths));
-
-  return sizeof(DWORD)*nrofsubauths+sizeof(SID);
-}
-
-
-/**************************************************************************
- *                 RtlLengthSid                   [NTDLL.429]
- */
-DWORD WINAPI RtlLengthSid(PSID sid)
-{
-  dprintf(("NTDLL: RtlLengthSid(%08xh)\n",
-           sid));
-
-  if (!sid)
-    return FALSE;
-
-  return sizeof(DWORD)*sid->SubAuthorityCount+sizeof(SID);
-}
-
-
-/**************************************************************************
- *                 RtlInitializeSid            [NTDLL.410]
- */
-DWORD WINAPI RtlInitializeSid(PSID                      psid,
-                              PSID_IDENTIFIER_AUTHORITY psidauth,
-                              DWORD                     c)
-{
-  BYTE  a = c & 0xff;
-
-  dprintf(("NTDLL: RtlInitializeSid(%08xh,%08xh,%08xh)\n",
-           psid,
-           psidauth,
-           c));
-
-  if (a>=SID_MAX_SUB_AUTHORITIES)
-    return a;
-
-  psid->SubAuthorityCount = a;
-  psid->Revision          = SID_REVISION;
-  memcpy(&(psid->IdentifierAuthority),
-         psidauth,
-         sizeof(SID_IDENTIFIER_AUTHORITY));
-
-  return STATUS_SUCCESS;
-}
-
-
-/**************************************************************************
- *                 RtlSubAuthoritySid          [NTDLL.497]
- */
-LPDWORD WINAPI RtlSubAuthoritySid(PSID  psid,
-                                  DWORD nr)
-{
-  dprintf(("NTDLL: RtlSubAuthoritySid(%08xh,%08xh)\n",
-           psid,
-           nr));
-
-  return &(psid->SubAuthority[nr]);
-}
-
-
-/**************************************************************************
- *                 RtlSubAuthorityCountSid     [NTDLL.496]
- */
-
-LPBYTE WINAPI RtlSubAuthorityCountSid(PSID psid)
-{
-  dprintf(("NTDLL: RtlSubAUthorityCountSid(%08xh)\n",
-           psid));
-
-  return ((LPBYTE)psid)+1;
-}
-
-
-/**************************************************************************
- *                 RtlCopySid                     [NTDLL.302]
- */
-DWORD WINAPI RtlCopySid(DWORD len,
-                        PSID  to,
-                        PSID  from)
-{
-  dprintf(("NTDLL: RtlCopySid(%08xh,%08xh,%08xh)\n",
-           len,
-           to,
-           from));
-
-  if (!from)
-    return 0;
-
-  if (len<(from->SubAuthorityCount*4+8))
-     return STATUS_BUFFER_TOO_SMALL;
-
-  memmove(to,
-          from,
-          from->SubAuthorityCount*4+8);
-
-  return STATUS_SUCCESS;
-}
-
-
-/*
- * security descriptor functions
- */
-
-/**************************************************************************
- * RtlCreateSecurityDescriptor                 [NTDLL.313]
- *
- * RETURNS:
- *  0 success,
- *  STATUS_INVALID_OWNER, STATUS_PRIVILEGE_NOT_HELD, STATUS_NO_INHERITANCE,
- *  STATUS_NO_MEMORY
- */
-NTSTATUS WINAPI RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR lpsd,
-                                            DWORD                rev)
-{
-  dprintf(("NTDLL: RtlCreateSecurityDescriptor(%08xh,%08xh)\n",
-           lpsd,
-           rev));
-
-  if (rev!=SECURITY_DESCRIPTOR_REVISION)
-    return STATUS_UNKNOWN_REVISION;
-
-  memset(lpsd,
-         '\0',
-         sizeof(*lpsd));
-
-  lpsd->Revision = SECURITY_DESCRIPTOR_REVISION;
-
-  return STATUS_SUCCESS;
-}
-
-
-/**************************************************************************
- * RtlValidSecurityDescriptor                  [NTDLL.313]
- *
- */
-NTSTATUS WINAPI RtlValidSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor)
-{
-  dprintf(("NTDLL: RtlValidSecurityDescriptor(%08xh)\n",
-           SecurityDescriptor));
-
-  if ( ! SecurityDescriptor )
-    return STATUS_INVALID_SECURITY_DESCR;
-
-  if ( SecurityDescriptor->Revision != SECURITY_DESCRIPTOR_REVISION )
-    return STATUS_UNKNOWN_REVISION;
-
-  return STATUS_SUCCESS;
-}
-
-
-/**************************************************************************
- *  RtlLengthSecurityDescriptor                [NTDLL]
- */
-ULONG WINAPI RtlLengthSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor)
-{
-  ULONG Size;
-
-  dprintf(("NTDLL: RtlLengthSecurityDescriptor(%08xh)\n",
-           SecurityDescriptor));
-
-  Size = SECURITY_DESCRIPTOR_MIN_LENGTH;
-  if ( SecurityDescriptor == NULL )
-    return 0;
-
-  if ( SecurityDescriptor->Owner != NULL )
-    Size += SecurityDescriptor->Owner->SubAuthorityCount;
-  if ( SecurityDescriptor->Group != NULL )
-    Size += SecurityDescriptor->Group->SubAuthorityCount;
-
-
-  if ( SecurityDescriptor->Sacl != NULL )
-    Size += SecurityDescriptor->Sacl->AclSize;
-  if ( SecurityDescriptor->Dacl != NULL )
-    Size += SecurityDescriptor->Dacl->AclSize;
-
-  return Size;
-}
-
-/******************************************************************************
- *  RtlGetDaclSecurityDescriptor            [NTDLL]
- *
- */
-NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor,
-                                             PBOOLEAN             lpbDaclPresent,
-                                             PACL                 *pDacl,
-                                             PBOOLEAN             lpbDaclDefaulted)
-{
-  dprintf(("NTDLL: RtlGetDaclSecurityDescriptor(%08xh,%08xh,%08xh,%08xh)\n",
-           pSecurityDescriptor,
-           lpbDaclPresent,
-           pDacl,
-           lpbDaclDefaulted));
-
-  if (pSecurityDescriptor->Revision != SECURITY_DESCRIPTOR_REVISION)
-    return STATUS_UNKNOWN_REVISION ;
-
-  if ( (*lpbDaclPresent = (SE_DACL_PRESENT & pSecurityDescriptor->Control) ? 1 : 0) )
-  {
-    if ( SE_SELF_RELATIVE & pSecurityDescriptor->Control)
-    {
-      *pDacl = (PACL) ((LPBYTE)pSecurityDescriptor + (DWORD)pSecurityDescriptor->Dacl);
-    }
-    else
-    {
-      *pDacl = pSecurityDescriptor->Dacl;
-    }
-  }
-
-  *lpbDaclDefaulted = (( SE_DACL_DEFAULTED & pSecurityDescriptor->Control ) ? 1 : 0);
-
-  return STATUS_SUCCESS;
-}
-
-
-/**************************************************************************
- *  RtlSetDaclSecurityDescriptor            [NTDLL.483]
- */
-NTSTATUS WINAPI RtlSetDaclSecurityDescriptor (PSECURITY_DESCRIPTOR lpsd,
-                                              BOOLEAN              daclpresent,
-                                              PACL                 dacl,
-                                              BOOLEAN              dacldefaulted)
-{
-  dprintf(("NTDLL: RtlSetDaclSecurityDescriptor(%08xh,%08xh,%08xh,%08xh)\n",
-           lpsd,
-           daclpresent,
-           dacl,
-           dacldefaulted));
-
-  if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION)
-    return STATUS_UNKNOWN_REVISION;
-  if (lpsd->Control & SE_SELF_RELATIVE)
-    return STATUS_INVALID_SECURITY_DESCR;
-
-  if (!daclpresent)
-  {
-    lpsd->Control &= ~SE_DACL_PRESENT;
-    return TRUE;
-  }
-
-  lpsd->Control |= SE_DACL_PRESENT;
-  lpsd->Dacl = dacl;
-
-  if (dacldefaulted)
-    lpsd->Control |= SE_DACL_DEFAULTED;
-  else
-    lpsd->Control &= ~SE_DACL_DEFAULTED;
-
-  return STATUS_SUCCESS;
-}
-
-
-/******************************************************************************
- *  RtlGetSaclSecurityDescriptor            [NTDLL]
- *
- */
-NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor,
-                                             PBOOLEAN             lpbSaclPresent,
-                                             PACL                 *pSacl,
-                                             PBOOLEAN             lpbSaclDefaulted)
-{
-  dprintf(("NTDLL: RtlGetSaclSecurityDescriptor(%08xh,%08xh,%08xh,%08xh)\n",
-           pSecurityDescriptor,
-           lpbSaclPresent,
-           pSacl,
-           lpbSaclDefaulted));
-
-  if (pSecurityDescriptor->Revision != SECURITY_DESCRIPTOR_REVISION)
-    return STATUS_UNKNOWN_REVISION ;
-
-  if ( (*lpbSaclPresent = (SE_SACL_PRESENT & pSecurityDescriptor->Control) ? 1 : 0) )
-  {
-    if ( SE_SELF_RELATIVE & pSecurityDescriptor->Control)
-    {
-      *pSacl = (PACL) ((LPBYTE)pSecurityDescriptor + (DWORD)pSecurityDescriptor->Sacl);
-    }
-    else
-    {
-      *pSacl = pSecurityDescriptor->Sacl;
-    }
-  }
-
-  *lpbSaclDefaulted = (( SE_SACL_DEFAULTED & pSecurityDescriptor->Control ) ? 1 : 0);
-
-  return STATUS_SUCCESS;
-}
-
-
-/**************************************************************************
- * RtlSetSaclSecurityDescriptor                [NTDLL.488]
- */
-NTSTATUS WINAPI RtlSetSaclSecurityDescriptor (PSECURITY_DESCRIPTOR lpsd,
-                                              BOOLEAN              saclpresent,
-                                              PACL                 sacl,
-                                              BOOLEAN              sacldefaulted)
-{
-  dprintf(("NTDLL: RtlSetSaclSecurityDescriptor(%08xh,%08xh,%08xh,%08xh)\n",
-           lpsd,
-           saclpresent,
-           sacl,
-           sacldefaulted));
-
-  if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION)
-    return STATUS_UNKNOWN_REVISION;
-
-  if (lpsd->Control & SE_SELF_RELATIVE)
-    return STATUS_INVALID_SECURITY_DESCR;
-
-  if (!saclpresent)
-  {
-    lpsd->Control &= ~SE_SACL_PRESENT;
-    return 0;
-  }
-
-  lpsd->Control |= SE_SACL_PRESENT;
-  lpsd->Sacl = sacl;
-
-  if (sacldefaulted)
-    lpsd->Control |= SE_SACL_DEFAULTED;
-  else
-    lpsd->Control &= ~SE_SACL_DEFAULTED;
-
-  return STATUS_SUCCESS;
-}
-
-
-/**************************************************************************
- * RtlGetOwnerSecurityDescriptor            [NTDLL.488]
- */
-NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
-                                              PSID                 *Owner,
-                                              PBOOLEAN             OwnerDefaulted)
-{
-  dprintf(("NTDLL: RtlGetOwnerSecurityDescriptor(%08xh,%08xh,%08xh)\n",
-           SecurityDescriptor,
-           Owner,
-           OwnerDefaulted));
-
-  if ( !SecurityDescriptor  || !Owner || !OwnerDefaulted )
-    return STATUS_INVALID_PARAMETER;
-
-  *Owner = SecurityDescriptor->Owner;
-  if ( *Owner != NULL )
-  {
-    if ( SecurityDescriptor->Control & SE_OWNER_DEFAULTED )
-       *OwnerDefaulted = TRUE;
-    else
-       *OwnerDefaulted = FALSE;
-  }
-
-  return STATUS_SUCCESS;
-}
-
-
-/**************************************************************************
- *                 RtlSetOwnerSecurityDescriptor     [NTDLL.487]
- */
-NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR lpsd,
-                                              PSID                 owner,
-                                              BOOLEAN              ownerdefaulted)
-{
-  dprintf(("NTDLL: RtlSetOwnerSecurityDescriptor(%08x,%08xh,%08xh)\n",
-           lpsd,
-           owner,
-           ownerdefaulted));
-
-  if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION)
-    return STATUS_UNKNOWN_REVISION;
-  if (lpsd->Control & SE_SELF_RELATIVE)
-    return STATUS_INVALID_SECURITY_DESCR;
-
-  lpsd->Owner = owner;
-  if (ownerdefaulted)
-    lpsd->Control |= SE_OWNER_DEFAULTED;
-  else
-    lpsd->Control &= ~SE_OWNER_DEFAULTED;
-
-  return STATUS_SUCCESS;
-}
-
-
-/**************************************************************************
- *                 RtlSetGroupSecurityDescriptor     [NTDLL.485]
- */
-NTSTATUS WINAPI RtlSetGroupSecurityDescriptor (PSECURITY_DESCRIPTOR lpsd,
-                                               PSID                 group,
-                                               BOOLEAN              groupdefaulted)
-{
-  dprintf(("NTDLL: RtlSetGroupSecurityDescriptor(%08xh,%08xh,%08xh)\n",
-           lpsd,
-           group,
-           groupdefaulted));
-
-  if (lpsd->Revision!=SECURITY_DESCRIPTOR_REVISION)
-    return STATUS_UNKNOWN_REVISION;
-  if (lpsd->Control & SE_SELF_RELATIVE)
-    return STATUS_INVALID_SECURITY_DESCR;
-
-  lpsd->Group = group;
-  if (groupdefaulted)
-    lpsd->Control |= SE_GROUP_DEFAULTED;
-  else
-    lpsd->Control &= ~SE_GROUP_DEFAULTED;
-
-  return STATUS_SUCCESS;
-}
-
-
-/**************************************************************************
- *                 RtlGetGroupSecurityDescriptor     [NTDLL]
- */
-NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,
-                                              PSID                 *Group,
-                                              PBOOLEAN             GroupDefaulted)
-{
-  dprintf(("NTDLL: RtlGetGroupSecurityDescriptor(%08xh,%08xh,%08xh)\n",
-           SecurityDescriptor,
-           Group,
-           GrouDefaulted));
-
-  if ( !SecurityDescriptor || !Group || !GroupDefaulted )
-    return STATUS_INVALID_PARAMETER;
-
-  *Group = SecurityDescriptor->Group;
-  if ( *Group != NULL )
-  {
-    if ( SecurityDescriptor->Control & SE_GROUP_DEFAULTED )
-      *GroupDefaulted = TRUE;
-    else
-      *GroupDefaulted = FALSE;
-  }
-
-  return STATUS_SUCCESS;
-}
-
-
-/*
- * access control list's
- */
-
-/**************************************************************************
- *                 RtlCreateAcl                   [NTDLL.306]
- *
- * NOTES
- *    This should return NTSTATUS
- */
-DWORD WINAPI RtlCreateAcl(PACL  acl,
-                          DWORD size,
-                          DWORD rev)
-{
-  dprintf(("NTDLL: RtlCreateAcl(%08xh,%08xh,%08xh)\n",
-           acl,
-           size,
-           rev));
-
-  if (rev!=ACL_REVISION)
-    return STATUS_INVALID_PARAMETER;
-  if (size<sizeof(ACL))
-    return STATUS_BUFFER_TOO_SMALL;
-  if (size>0xFFFF)
-    return STATUS_INVALID_PARAMETER;
-
-  memset(acl,'\0',sizeof(ACL));
-  acl->AclRevision                      = rev;
-  acl->AclSize                          = size;
-  acl->AceCount                         = 0;
-
-  return 0;
-}
-
-
-/**************************************************************************
- *                 RtlFirstFreeAce             [NTDLL.370]
- * looks for the AceCount+1 ACE, and if it is still within the alloced
- * ACL, return a pointer to it
- */
-BOOLEAN WINAPI RtlFirstFreeAce(PACL        acl,
-                               PACE_HEADER *x)
-{
-  PACE_HEADER ace;
-  int      i;
-
-  dprintf(("NTDLL: RtlFirstFreeAct(%08xh,%08xh)\n",
-           acl,
-           x));
-
-  *x = 0;
-  ace = (PACE_HEADER)(acl+1);
-  for (i=0;
-       i<acl->AceCount;
-       i++)
-  {
-    if ((DWORD)ace>=(((DWORD)acl)+acl->AclSize))
-       return 0;
-
-    ace = (PACE_HEADER)(((BYTE*)ace)+ace->AceSize);
-  }
-
-  if ((DWORD)ace>=(((DWORD)acl)+acl->AclSize))
-     return 0;
-
-  *x = ace;
-  return 1;
-}
-
-
-/**************************************************************************
- *                 RtlAddAce                      [NTDLL.260]
- */
-NTSTATUS WINAPI RtlAddAce(PACL acl,
-                          DWORD rev,
-                          DWORD xnrofaces,
-                          PACE_HEADER acestart,
-                          DWORD acelen)
-{
-  PACE_HEADER ace,targetace;
-  int      nrofaces;
-
-  dprintf(("NTDLL: RtlAddAce(%08xh,%08xh,%08xh,%08xh,%08xh)\n",
-           acl,
-           rev,
-           xnrofaces,
-           acestart,
-           acelen));
-
-  if (acl->AclRevision != ACL_REVISION)
-    return STATUS_INVALID_PARAMETER;
-
-  if (!RtlFirstFreeAce(acl,&targetace))
-    return STATUS_INVALID_PARAMETER;
-
-  nrofaces=0;
-  ace=acestart;
-
-  while (((DWORD)ace-(DWORD)acestart)<acelen)
-  {
-    nrofaces++;
-    ace = (PACE_HEADER)(((BYTE*)ace)+ace->AceSize);
-  }
-
-  if ((DWORD)targetace+acelen>(DWORD)acl+acl->AclSize) /* too much aces */
-    return STATUS_INVALID_PARAMETER;
-
-  memcpy((LPBYTE)targetace,acestart,acelen);
-  acl->AceCount+=nrofaces;
-
-  return STATUS_SUCCESS;
-}
-
-
-/******************************************************************************
- *  RtlAddAccessAllowedAce                  [NTDLL]
- */
-DWORD WINAPI RtlAddAccessAllowedAce(DWORD x1,
-                                    DWORD x2,
-                                    DWORD x3,
-                                    DWORD x4)
-{
-  dprintf(("NTDLL: RtlAddAccessAllowedAce(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           x2,
-           x3,
-           x4));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  RtlGetAce     [NTDLL]
- */
-DWORD WINAPI RtlGetAce(PACL  pAcl,
-                       DWORD dwAceIndex,
-                       LPVOID *pAce )
-{
-  dprintf(("NTDLL: RtlGetAce(%08x,%08x,%08x) not implemented.\n",
-           pAcl,
-           dwAceIndex,
-           pAce));
-
-  return 0;
-}
-
-
-/*
- * misc
- */
-
-/******************************************************************************
- *  RtlAdjustPrivilege                      [NTDLL]
- */
-DWORD WINAPI RtlAdjustPrivilege(DWORD x1,
-                                DWORD x2,
-                                DWORD x3,
-                                DWORD x4)
-{
-  dprintf(("NTDLL: RtlAdjustPrivilege(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           x1,
-           x2,
-           x3,
-           x4));
-
-  return 0;
-}
-
Index: trunk/src/NTDLL/sync.c
===================================================================
--- trunk/src/NTDLL/sync.c	(revision 47)
+++ 	(revision )
@@ -1,146 +1,0 @@
-/*
- * Project Odin Software License can be found in LICENSE.TXT
- * Win32 NT Runtime / NTDLL for OS/2
- *
- * Copyright 1998       original WINE Author
- * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
- *
- * Process synchronisation
- */
-
-#include "ntdll.h"
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-
-
-/*
- * Semaphore
- */
-
-/******************************************************************************
- *  NtCreateSemaphore                    [NTDLL]
- */
-NTSTATUS WINAPI NtCreateSemaphore(PHANDLE            SemaphoreHandle,
-                                  ACCESS_MASK        DesiredAccess,
-                                  POBJECT_ATTRIBUTES ObjectAttributes,
-                                  ULONG              InitialCount,
-                                  ULONG              MaximumCount)
-{
-  dprintf(("NTDLL: NtCreateSemaphore(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           SemaphoreHandle,
-           DesiredAccess,
-           ObjectAttributes,
-           InitialCount,
-           MaximumCount));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtOpenSemaphore                      [NTDLL]
- */
-NTSTATUS WINAPI NtOpenSemaphore(HANDLE             SemaphoreHandle,
-                                ACCESS_MASK        DesiredAccess,
-                                POBJECT_ATTRIBUTES ObjectAttributes)
-{
-  dprintf(("NTDLL: NtOpenSemaphore(%08xh,%08xh,%08xh) not implemented.\n",
-           SemaphoreHandle,
-           DesiredAccess,
-           ObjectAttributes));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtQuerySemaphore                     [NTDLL]
- */
-NTSTATUS WINAPI NtQuerySemaphore(HANDLE SemaphoreHandle,
-                                 PVOID  SemaphoreInformationClass,
-                                 PVOID SemaphoreInformation,
-                                 ULONG Length,
-                                 PULONG ReturnLength)
-{
-  dprintf(("NTDLL: NtQuerySemaphore(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           SemaphoreHandle,
-           SemaphoreInformationClass,
-           SemaphoreInformation,
-           Length,
-           ReturnLength));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtReleaseSemaphore                   [NTDLL]
- */
-NTSTATUS WINAPI NtReleaseSemaphore(HANDLE SemaphoreHandle,
-                                   ULONG  ReleaseCount,
-                                   PULONG PreviousCount)
-{
-  dprintf(("NTDLL: NtReleaseSemaphore(%08xh,%08xh,%08xh) not implemented.\n",
-           SemaphoreHandle,
-           ReleaseCount,
-           PreviousCount));
-
-  return 0;
-}
-
-
-/*
- * Event
- */
-
-/**************************************************************************
- *    NtCreateEvent                               [NTDLL.71]
- */
-NTSTATUS WINAPI NtCreateEvent(PHANDLE            EventHandle,
-                              ACCESS_MASK        DesiredAccess,
-                              POBJECT_ATTRIBUTES ObjectAttributes,
-                              BOOLEAN            ManualReset,
-                              BOOLEAN            InitialState)
-{
-  dprintf(("NTDLL: NtCreateEvent(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           EventHandle,
-           DesiredAccess,
-           ObjectAttributes,
-           ManuelReset,
-           InitialState));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtOpenEvent                          [NTDLL]
- */
-NTSTATUS WINAPI NtOpenEvent(PHANDLE            EventHandle,
-                            ACCESS_MASK        DesiredAccess,
-                            POBJECT_ATTRIBUTES ObjectAttributes)
-{
-  dprintf(("NTDLL: NtOpenEvent(%08xh,%08xh,%08xh) not implemented.\n",
-           EventHandle,
-           DesiredAccess,
-           ObjectAttributes));
-
-  return 0;
-}
-
-
-/******************************************************************************
- *  NtSetEvent    [NTDLL]
- */
-NTSTATUS WINAPI NtSetEvent(HANDLE EventHandle,
-                           PULONG NumberOfThreadsReleased)
-{
-  dprintf(("NTDLL: NtSetEvent(%08xh,%08xh) not implemented.\n",
-           EventHandle,
-           NumberOfThreadReleased));
-
-  return 0;
-}
-
Index: trunk/src/NTDLL/time.c
===================================================================
--- trunk/src/NTDLL/time.c	(revision 47)
+++ 	(revision )
@@ -1,237 +1,0 @@
-/*
- * Project Odin Software License can be found in LICENSE.TXT
- * Win32 NT Runtime / NTDLL for OS/2
- *
- * Copyright 1998       original WINE Author
- * Copyright 1998, 1999 Patrick Haller (phaller@gmx.net)
- *
- * Conversion between Time and TimeFields
- *
- * RtlTimeToTimeFields, RtlTimeFieldsToTime and defines are taken from ReactOS and
- * adapted to wine with special permissions of the author
- * Rex Jolliff (rex@lvcablemodem.com)
- *
- *
- */
-
-#include "ntdll.h"
-#include <string.h>
-
-
-#define TICKSPERSEC        10000000
-#define TICKSPERMSEC       10000
-#define SECSPERDAY         86400
-#define SECSPERHOUR        3600
-#define SECSPERMIN         60
-#define MINSPERHOUR        60
-#define HOURSPERDAY        24
-#define EPOCHWEEKDAY       0
-#define DAYSPERWEEK        7
-#define EPOCHYEAR          1601
-#define DAYSPERNORMALYEAR  365
-#define DAYSPERLEAPYEAR    366
-#define MONSPERYEAR        12
-
-static const int YearLengths[2] = {DAYSPERNORMALYEAR, DAYSPERLEAPYEAR};
-static const int MonthLengths[2][MONSPERYEAR] =
-{
-   { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
-   { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
-};
-
-static int IsLeapYear(int Year)
-{
-   return Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0) ? 1 : 0;
-}
-
-static void NormalizeTimeFields(CSHORT *FieldToNormalize,
-                                CSHORT *CarryField,
-                                int    Modulus)
-{
-   *FieldToNormalize = (CSHORT) (*FieldToNormalize - Modulus);
-   *CarryField = (CSHORT) (*CarryField + 1);
-}
-
-/******************************************************************************
- *  RtlTimeToTimeFields                     [NTDLL.265]
- *
- */
-
-/* @@@PH we need 64-bit arithmetics here */
-#if 0
-VOID WINAPI RtlTimeToTimeFields(
-   PLARGE_INTEGER liTime,
-   PTIME_FIELDS TimeFields)
-{
-   const int *Months;
-   int LeapSecondCorrections, SecondsInDay, CurYear;
-   int LeapYear, CurMonth, GMTOffset;
-   long int Days;
-   long long int Time = *(long long int *)&liTime;
-
-   /* Extract millisecond from time and convert time into seconds */
-   TimeFields->Milliseconds = (CSHORT) ((Time % TICKSPERSEC) / TICKSPERMSEC);
-   Time = Time / TICKSPERSEC;
-
-   /* FIXME: Compute the number of leap second corrections here */
-   LeapSecondCorrections = 0;
-
-   /* FIXME: get the GMT offset here */
-   GMTOffset = 0;
-
-   /* Split the time into days and seconds within the day */
-   Days = Time / SECSPERDAY;
-   SecondsInDay = Time % SECSPERDAY;
-
-   /* Adjust the values for GMT and leap seconds */
-   SecondsInDay += (GMTOffset - LeapSecondCorrections);
-   while (SecondsInDay < 0)
-   { SecondsInDay += SECSPERDAY;
-     Days--;
-   }
-   while (SecondsInDay >= SECSPERDAY)
-   { SecondsInDay -= SECSPERDAY;
-     Days++;
-   }
-
-   /* compute time of day */
-   TimeFields->Hour = (CSHORT) (SecondsInDay / SECSPERHOUR);
-   SecondsInDay = SecondsInDay % SECSPERHOUR;
-   TimeFields->Minute = (CSHORT) (SecondsInDay / SECSPERMIN);
-   TimeFields->Second = (CSHORT) (SecondsInDay % SECSPERMIN);
-
-   /* FIXME: handle the possibility that we are on a leap second (i.e. Second = 60) */
-
-   /* compute day of week */
-   TimeFields->Weekday = (CSHORT) ((EPOCHWEEKDAY + Days) % DAYSPERWEEK);
-
-   /* compute year */
-   CurYear = EPOCHYEAR;
-   /* FIXME: handle calendar modifications */
-   while (1)
-   { LeapYear = IsLeapYear(CurYear);
-     if (Days < (long) YearLengths[LeapYear])
-     { break;
-     }
-     CurYear++;
-     Days = Days - (long) YearLengths[LeapYear];
-   }
-   TimeFields->Year = (CSHORT) CurYear;
-
-   /* Compute month of year */
-   Months = MonthLengths[LeapYear];
-   for (CurMonth = 0; Days >= (long) Months[CurMonth]; CurMonth++)
-     Days = Days - (long) Months[CurMonth];
-   TimeFields->Month = (CSHORT) (CurMonth + 1);
-   TimeFields->Day = (CSHORT) (Days + 1);
-}
-
-
-/******************************************************************************
- *  RtlTimeFieldsToTime                     [NTDLL.265]
- *
- */
-BOOLEAN WINAPI RtlTimeFieldsToTime(
-   PTIME_FIELDS tfTimeFields,
-   PLARGE_INTEGER Time)
-{
-   int CurYear, CurMonth;
-   long long int rcTime;
-   TIME_FIELDS TimeFields = *tfTimeFields;
-
-   rcTime = 0;
-
-   /* FIXME: normalize the TIME_FIELDS structure here */
-   while (TimeFields.Second >= SECSPERMIN)
-   { NormalizeTimeFields(&TimeFields.Second, &TimeFields.Minute, SECSPERMIN);
-   }
-   while (TimeFields.Minute >= MINSPERHOUR)
-   { NormalizeTimeFields(&TimeFields.Minute, &TimeFields.Hour, MINSPERHOUR);
-   }
-   while (TimeFields.Hour >= HOURSPERDAY)
-   { NormalizeTimeFields(&TimeFields.Hour, &TimeFields.Day, HOURSPERDAY);
-   }
-   while (TimeFields.Day > MonthLengths[IsLeapYear(TimeFields.Year)][TimeFields.Month - 1])
-   { NormalizeTimeFields(&TimeFields.Day, &TimeFields.Month, SECSPERMIN);
-   }
-   while (TimeFields.Month > MONSPERYEAR)
-   { NormalizeTimeFields(&TimeFields.Month, &TimeFields.Year, MONSPERYEAR);
-   }
-
-   /* FIXME: handle calendar corrections here */
-   for (CurYear = EPOCHYEAR; CurYear < TimeFields.Year; CurYear++)
-   { rcTime += YearLengths[IsLeapYear(CurYear)];
-   }
-   for (CurMonth = 1; CurMonth < TimeFields.Month; CurMonth++)
-   { rcTime += MonthLengths[IsLeapYear(CurYear)][CurMonth - 1];
-   }
-   rcTime += TimeFields.Day - 1;
-   rcTime *= SECSPERDAY;
-   rcTime += TimeFields.Hour * SECSPERHOUR + TimeFields.Minute * SECSPERMIN + TimeFields.Second;
-   rcTime *= TICKSPERSEC;
-   rcTime += TimeFields.Milliseconds * TICKSPERMSEC;
-   *Time = *(LARGE_INTEGER *)&rcTime;
-
-   return TRUE;
-}
-#endif
-
-/************* end of code by Rex Jolliff (rex@lvcablemodem.com) *******************/
-
-/******************************************************************************
- *  RtlSystemTimeToLocalTime             [NTDLL]
- */
-VOID WINAPI RtlSystemTimeToLocalTime(PLARGE_INTEGER SystemTime,
-                                     PLARGE_INTEGER LocalTime)
-{
-  dprintf(("NTDLL: RtlSystemTimeToLocalTime(%08xh,%08xh) not implemented.\n",
-           SystemTime,
-           LocalTime));
-
-  memcpy (LocalTime,
-          SystemTime,
-          sizeof (PLARGE_INTEGER));
-}
-
-
-/******************************************************************************
- *  RtlToTimeInSecondsSince1980             [NTDLL]
- */
-BOOLEAN WINAPI RtlTimeToSecondsSince1980(LPFILETIME ft,
-                                         LPDWORD    timeret)
-{
-  dprintf(("NTDLL: RtlTimeToSecondsSince1980(%08xh,%08xh) not implemented.\n",
-           ft,
-           timeret));
-
-  /* 1980 = 1970+10*365 days +  29. februar 1972 + 29.februar 1976 */
-  //*timeret = DOSFS_FileTimeToUnixTime(ft,NULL) - (10*365+2)*24*3600;
-  return 1;
-}
-
-/******************************************************************************
- *  RtlToTimeInSecondsSince1970             [NTDLL]
- */
-BOOLEAN WINAPI RtlTimeToSecondsSince1970(LPFILETIME ft,
-                                         LPDWORD timeret)
-{
-  dprintf(("NTDLL: RtlTimeToSecondsSince1970(%08xh,%08xh) not implemented.\n",
-           ft,
-           timeret));
-
-  //*timeret = DOSFS_FileTimeToUnixTime(ft,NULL);
-  return 1;
-}
-
-
-/******************************************************************************
- * RtlTimeToElapsedTimeFields [NTDLL.502]
- * FIXME: prototype guessed
- */
-VOID WINAPI RtlTimeToElapsedTimeFields(PLARGE_INTEGER liTime,
-                                       PTIME_FIELDS   TimeFields)
-{
-  dprintf(("NTDLL: RtlTimeToElapsedTimeFields(%08xh,%08xh) not implemented.\n",
-           liTime,
-           TimeFields));
-}
Index: trunk/src/advapi32/advapi32.c
===================================================================
--- trunk/src/advapi32/advapi32.c	(revision 47)
+++ 	(revision )
@@ -1,5500 +1,0 @@
-/* $Id: advapi32.c,v 1.2 1999-06-01 21:59:16 phaller Exp $ */
-
-/*
- * Win32 advanced API functions for OS/2
- *
- * 1998/06/12
- *
- * Copyright 1998 Sander van Leeuwen
- * Copyright 1998 Patrick Haller
- *
- * @(#) ADVAPI32.C            1.0.1 1998/06/14 PH added stubs
- *
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-
-
-/*****************************************************************************
- * Includes                                                                  *
- *****************************************************************************/
-
-#include <os2win.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include "misc.h"
-#include "advapi32.h"
-#include "unicode.h"
-#include <winreg.h>
-
-/*****************************************************************************
- * Defines                                                                   *
- *****************************************************************************/
-
-                /* this define enables certain less important debug messages */
-//#define DEBUG_LOCAL 1
-
-//******************************************************************************
-//******************************************************************************
-HKEY ConvertKey(HKEY winkey)
-{
-  switch((int)winkey)
-  {
-   case WINHKEY_CLASSES_ROOT:   return HKEY_CLASSES_ROOT;
-   case WINHKEY_CURRENT_USER:   return HKEY_CURRENT_USER;
-   case WINHKEY_LOCAL_MACHINE:  return HKEY_LOCAL_MACHINE;
-   case WINHKEY_USERS:          return HKEY_USERS;
-  }
-  return(winkey);
-}
-
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegCloseKey( HKEY arg1)
-{
-    dprintf(("RegCloseKey %X\n", arg1));
-    return O32_RegCloseKey(ConvertKey(arg1));
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegCreateKeyA( HKEY arg1, LPCSTR arg2, PHKEY  arg3)
-{
-#ifdef DEBUG
-    WriteLog("RegCreateKey\n");
-#endif
-    return O32_RegCreateKey(ConvertKey(arg1), arg2, arg3);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegCreateKeyW(HKEY arg1, LPCWSTR arg2, PHKEY  arg3)
-{
- char *astring = UnicodeToAsciiString((LPWSTR)arg2);
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegCreateKeyW %s\n", astring);
-#endif
-    rc = O32_RegCreateKey(ConvertKey(arg1), astring, arg3);
-    FreeAsciiString(astring);
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegCreateKeyExA( HKEY arg1, LPCSTR arg2, DWORD arg3, LPSTR arg4, DWORD arg5, REGSAM arg6, LPSECURITY_ATTRIBUTES arg7, PHKEY arg8, LPDWORD  arg9)
-{
-#ifdef DEBUG
-    WriteLog("RegCreateKeyEx\n");
-#endif
-    return O32_RegCreateKeyEx(ConvertKey(arg1), arg2, arg3, arg4, arg5, arg6 | KEY_READ, arg7, arg8, arg9);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegCreateKeyExW( HKEY arg1, LPCWSTR arg2, DWORD arg3, LPWSTR arg4, DWORD arg5, REGSAM arg6, LPSECURITY_ATTRIBUTES arg7, PHKEY arg8, LPDWORD  arg9)
-{
- char *astring1 = UnicodeToAsciiString((LPWSTR)arg2);
- char *astring2 = UnicodeToAsciiString(arg4);
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegCreateKeyExW\n");
-#endif
-    rc = O32_RegCreateKeyEx(ConvertKey(arg1), astring1, arg3, astring2, arg5, arg6 | KEY_READ, arg7, arg8, arg9);
-    FreeAsciiString(astring1);
-    FreeAsciiString(astring2);
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegDeleteKeyW(HKEY arg1, LPWSTR  arg2)
-{
- char *astring = UnicodeToAsciiString(arg2);
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegDeleteKeyW\n");
-#endif
-    rc = O32_RegDeleteKey(ConvertKey(arg1), astring);
-    FreeAsciiString(astring);
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegDeleteKeyA(HKEY arg1, LPCSTR  arg2)
-{
-#ifdef DEBUG
-    WriteLog("RegDeleteKey\n");
-#endif
-    return O32_RegDeleteKey(ConvertKey(arg1), arg2);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegDeleteValueA(HKEY arg1, LPSTR arg2)
-{
-#ifdef DEBUG
-    WriteLog("RegDeleteValue\n");
-#endif
-    return O32_RegDeleteValue(ConvertKey(arg1), arg2);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegDeleteValueW(HKEY arg1, LPWSTR arg2)
-{
- char *astring = UnicodeToAsciiString(arg2);
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegDeleteValueW\n");
-#endif
-    rc = O32_RegDeleteValue(ConvertKey(arg1), astring);
-    FreeAsciiString(astring);
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegEnumKeyA(HKEY arg1, DWORD arg2, LPSTR arg3, DWORD  arg4)
-{
-#ifdef DEBUG
-    WriteLog("RegEnumKey\n");
-#endif
-    return O32_RegEnumKey(ConvertKey(arg1), arg2, arg3, arg4);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegEnumKeyW(HKEY arg1, DWORD arg2, LPWSTR arg3, DWORD  arg4)
-{
- char *astring;
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegEnumKeyW\n");
-#endif
-    rc = O32_RegEnumKey(ConvertKey(arg1), arg2, (char *)arg3, arg4);
-    if(rc == ERROR_SUCCESS) {
-   	astring = (char *)malloc(arg4);
-   	strcpy(astring, (char *)arg3);
-   	AsciiToUnicode(astring, arg3);
-   	free(astring);
-    }
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegEnumKeyExA(HKEY arg1, DWORD arg2, LPSTR arg3, LPDWORD arg4, LPDWORD arg5, LPSTR arg6, LPDWORD arg7, LPFILETIME  arg8)
-{
-#ifdef DEBUG
-    WriteLog("RegEnumKeyEx\n");
-#endif
-    return O32_RegEnumKeyEx(ConvertKey(arg1), arg2, arg3, arg4, arg5, arg6, arg7, arg8);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegEnumKeyExW(HKEY arg1, DWORD arg2, LPWSTR arg3, LPDWORD arg4, LPDWORD arg5, LPWSTR arg6, LPDWORD arg7, LPFILETIME  arg8)
-{
- char *astring;
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegEnumKeyExW\n");
-#endif
-    rc = O32_RegEnumKeyEx(ConvertKey(arg1), arg2, (char *)arg3, arg4, arg5, (char *)arg6, arg7, arg8);
-    if(rc == ERROR_SUCCESS) {
-   	astring = (char *)malloc(max(*arg4, *arg7));   //class & keyname
-   	strcpy(astring, (char *)arg3);
-   	AsciiToUnicode(astring, arg3);
-   	if(arg6 != NULL) {
-      		strcpy(astring, (char *)arg6);
-      		AsciiToUnicode(astring, arg6);
-   	}
-   	free(astring);
-    }
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegEnumValueA(HKEY arg1, DWORD arg2, LPSTR arg3, LPDWORD arg4, LPDWORD arg5, LPDWORD arg6, LPBYTE arg7, LPDWORD  arg8)
-{
-#ifdef DEBUG
-    WriteLog("RegEnumValue\n");
-#endif
-    return O32_RegEnumValue(ConvertKey(arg1), arg2, arg3, arg4, arg5, arg6, arg7, arg8);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegEnumValueW(HKEY arg1, DWORD arg2, LPWSTR arg3, LPDWORD arg4, LPDWORD arg5, LPDWORD arg6, LPBYTE arg7, LPDWORD  arg8)
-{
- char *astring;
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegEnumValueW\n");
-#endif
-    rc = O32_RegEnumValue(ConvertKey(arg1), arg2, (char *)arg3, arg4, arg5, arg6, arg7, arg8);
-    if(rc == ERROR_SUCCESS) {
-   astring = (char *)malloc(*arg4);
-   strcpy(astring, (char *)arg3);
-   AsciiToUnicode(astring, arg3);
-   free(astring);
-    }
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegOpenKeyA(HKEY    arg1,
-                             LPCSTR arg2, 
-                             PHKEY   arg3)
-{
- LONG rc;
-
-    rc = O32_RegOpenKey(ConvertKey(arg1), arg2, arg3);
-#ifdef DEBUG
-    WriteLog("RegOpenKey returned %s %d (%d)\n", arg2, *arg3, rc);
-#endif
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegOpenKeyW(HKEY arg1, LPCWSTR arg2, PHKEY  arg3)
-{
- char *astring = UnicodeToAsciiString((LPWSTR)arg2);
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegOpenKeyW\n");
-#endif
-    rc = O32_RegOpenKey(ConvertKey(arg1), astring, arg3);
-    FreeAsciiString(astring);
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegOpenKeyExA(HKEY arg1, LPCSTR arg2, DWORD arg3, REGSAM arg4, PHKEY arg5)
-{
- LONG rc;
-
-    rc = O32_RegOpenKeyEx(ConvertKey(arg1), arg2, arg3, arg4, arg5);
-#ifdef DEBUG
-    WriteLog("RegOpenKeyExA %X %s returned %X (%d)\n", arg1, arg2, *arg5, rc);
-#endif
-    //SvL: This fixes crashes in pmwinx.dll. (if an app doesn't check the
-    //     return value and uses the whatever *arg5 contains)
-    if(rc) {
-   *arg5 = 0;
-    }
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegOpenKeyExW(HKEY arg1, LPCWSTR arg2, DWORD arg3, REGSAM arg4, PHKEY arg5)
-{
- char *astring = UnicodeToAsciiString((LPWSTR)arg2);
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegOpenKeyExW %X %s\n", arg1, astring);
-#endif
-    rc = O32_RegOpenKeyEx(ConvertKey(arg1), astring, arg3, arg4, arg5);
-    //SvL: This fixes crashes in pmwinx.dll. (if an app doesn't check the
-    //     return value and uses the whatever *arg5 contains)
-    if(rc) {
-   *arg5 = 0;
-    }
-    FreeAsciiString(astring);
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegQueryInfoKeyA(HKEY arg1, LPSTR arg2, LPDWORD arg3, LPDWORD arg4, LPDWORD arg5, LPDWORD arg6, LPDWORD arg7, LPDWORD arg8, LPDWORD arg9, LPDWORD arg10, LPDWORD arg11, LPFILETIME  arg12)
-{
-#ifdef DEBUG
-    WriteLog("RegQueryInfoKey\n");
-#endif
-    return O32_RegQueryInfoKey(ConvertKey(arg1), arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegQueryInfoKeyW(HKEY arg1, LPWSTR arg2, LPDWORD arg3, LPDWORD arg4, LPDWORD arg5, LPDWORD arg6, LPDWORD arg7, LPDWORD arg8, LPDWORD arg9, LPDWORD arg10, LPDWORD arg11, LPFILETIME  arg12)
-{
- char *astring;
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegQueryInfoKeyW\n");
-#endif
-    rc = O32_RegQueryInfoKey(ConvertKey(arg1), (char *)arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12);
-    if(rc == ERROR_SUCCESS) {
-   	astring = (char *)malloc(*arg3);
-	strcpy(astring, (char *)arg2);
-	AsciiToUnicode(astring, arg2);
-	free(astring);
-    }
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegQueryValueA(HKEY arg1, LPCSTR arg2, LPSTR arg3, PLONG  arg4)
-{
-#ifdef DEBUG
-    WriteLog("RegQueryValue\n");
-#endif
-    return O32_RegQueryValue(ConvertKey(arg1), arg2, arg3, arg4);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegQueryValueW(HKEY hkey, LPCWSTR lpszSubKey, LPWSTR lpszValue, PLONG pcbValue)
-{
- char *astring1 = UnicodeToAsciiString((LPWSTR)lpszSubKey);
- char *astring2;
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegQueryValueW\n");
-#endif
-    rc = O32_RegQueryValue(ConvertKey(hkey), astring1, (char *)lpszValue, pcbValue);
-    if(rc == ERROR_SUCCESS) {
-   astring2 = (char *)malloc(*pcbValue);
-   strcpy(astring2, (char *)lpszValue);
-   AsciiToUnicode(astring2, lpszValue);
-   free(astring2);
-    }
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegQueryValueExA(HKEY arg1, LPSTR arg2, LPDWORD arg3, LPDWORD arg4, LPBYTE arg5, LPDWORD  arg6)
-{
-#ifdef DEBUG
-    WriteLog("RegQueryValueEx %s\n", arg2);
-#endif
-    return O32_RegQueryValueEx(ConvertKey(arg1), arg2, arg3, arg4, arg5, arg6);
-}
-//******************************************************************************
-//TODO: DOESN'T WORK FOR STRING DATA!!
-//******************************************************************************
-DWORD WIN32API RegQueryValueExW(HKEY arg1, LPWSTR arg2, LPDWORD arg3, LPDWORD arg4, LPBYTE arg5, LPDWORD  arg6)
-{
- char *astring = UnicodeToAsciiString(arg2);
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegQueryValueExW %s\n", astring);
-#endif
-    rc = O32_RegQueryValueEx(ConvertKey(arg1), astring, arg3, arg4, arg5, arg6);
-    FreeAsciiString(astring);
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegSetValueA(HKEY hkey, LPCSTR lpSubKey, DWORD dwType, LPCSTR lpData, DWORD cbData)
-{
-#ifdef DEBUG
-   WriteLog("RegSetValueA %d, %s, %d, %s, %d\n", hkey, lpSubKey, dwType, lpData, cbData);
-#endif
-   //SvL: 8-11-'97: Bugfix: crash in pmwinx if size == 0 and string is large
-   if(cbData == 0)
-   cbData = strlen(lpData);
-
-   return(O32_RegSetValue(ConvertKey(hkey), lpSubKey, dwType, lpData, cbData));
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegSetValueW(HKEY    hkey, 
-                            LPCWSTR lpSubKey, 
-                            DWORD   dwType, 
-                            LPCWSTR lpData, 
-                            DWORD cbData)
-{
- char *astring1 = UnicodeToAsciiString((LPWSTR)lpSubKey);
- char *astring2 = UnicodeToAsciiString((LPWSTR)lpData);
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegSetValue\n");
-#endif
-   //SvL: 8-11-'97: Bugfix: crash in pmwinx if size == 0 and string is large
-   if(cbData == 0)
-   cbData = strlen(astring2);
-
-   rc = O32_RegSetValue(ConvertKey(hkey), astring1, dwType, astring2, cbData);
-   FreeAsciiString(astring1);
-   FreeAsciiString(astring2);
-   return(rc);
-}
-//******************************************************************************
-//TODO:Check for string length here too?
-//******************************************************************************
-DWORD WIN32API RegSetValueExA(HKEY arg1, LPSTR arg2, DWORD arg3, DWORD arg4, BYTE * arg5, DWORD  arg6)
-{
-#ifdef DEBUG
-    WriteLog("RegSetValueEx\n");
-#endif
-    return O32_RegSetValueEx(ConvertKey(arg1), arg2, arg3, arg4, arg5, arg6);
-}
-//******************************************************************************
-//TODO:Check for string length here too?
-//******************************************************************************
-DWORD WIN32API RegSetValueExW(HKEY arg1, LPWSTR arg2, DWORD arg3, DWORD arg4, BYTE * arg5, DWORD  arg6)
-{
- char *astring = UnicodeToAsciiString(arg2);
- LONG  rc;
-
-#ifdef DEBUG
-    WriteLog("RegSetValueExW, NOT COMPLETE!!\n");
-#endif
-    rc = O32_RegSetValueEx(ConvertKey(arg1), astring, arg3, arg4, arg5, arg6);
-    FreeAsciiString(astring);
-    return(rc);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API RegFlushKey(HKEY hkey)
-{
-#ifdef DEBUG
-    WriteLog("OS2RegFlushKey, not implemented\n");
-#endif
-    return(ERROR_SUCCESS);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API GetFileSecurityA(LPCSTR               lpFileName,
-                               SECURITY_INFORMATION RequestedInformation,
-                               PSECURITY_DESCRIPTOR pSecurityDescriptor,
-                               DWORD                nLength,
-                               LPDWORD              lpnLengthNeeded)
-{
-#ifdef DEBUG
-  WriteLog("GetFileSecurityA %s, not implemented\n", lpFileName);
-#endif
-  return(FALSE);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API GetFileSecurityW(LPCWSTR               lpFileName,
-                               SECURITY_INFORMATION  RequestedInformation,
-                               PSECURITY_DESCRIPTOR  pSecurityDescriptor,
-                               DWORD                 nLength,
-                               LPDWORD               lpnLengthNeeded)
-{
-#ifdef DEBUG
-  WriteLog("GetFileSecurityW %s, not implemented\n",
-           lpFileName);
-#endif
-  return(FALSE);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API SetFileSecurityA(LPCSTR lpFileName,
-		               SECURITY_INFORMATION RequestedInformation,
-              		       PSECURITY_DESCRIPTOR pSecurityDescriptor)
-{
-#ifdef DEBUG
-  WriteLog("SetFileSecurityA %s, not implemented\n", lpFileName);
-#endif
-  return(FALSE);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API SetFileSecurityW(LPCWSTR lpFileName,
-              			SECURITY_INFORMATION RequestedInformation,
-              			PSECURITY_DESCRIPTOR pSecurityDescriptor)
-{
-#ifdef DEBUG
-  WriteLog("SetFileSecurityW %s, not implemented\n", lpFileName);
-#endif
-  return(FALSE);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API GetUserNameA(  /*PLF Wed  98-02-11 13:33:39*/
-    LPTSTR lpBuffer,        /* address of name buffer       */
-    LPDWORD lpcchBuffer)    /* address of size of name buffer       */
-
-
-    /* The GetUserName function retrieves the user name of the current
-     *  thread. This is the name of the user currently logged onto the
-     *  system.
-     */
-
-{
-    #define USERNAME "USER"
-    if(*lpcchBuffer < sizeof(USERNAME))
-        return FALSE;
-    strcpy(lpBuffer, USERNAME);
-    return TRUE;
-}
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API GetUserNameW( /*KSO Thu 21.05.1998 */
-   LPWSTR lpBuffer,
-   LPDWORD lpccBuffer
-   )
-{
-
-   if ( *lpccBuffer >= sizeof(USERNAME)*2 )
-   {
-      AsciiToUnicode(USERNAME, lpBuffer);
-      return TRUE;
-   }
-      return FALSE;
-}
-//******************************************************************************
-//******************************************************************************
-
-
-
-BOOL WIN32API ReportEventA(     /*PLF Sat  98-03-07 00:36:43*/
-     HANDLE     hEventLog,
-     WORD       wType,
-     WORD       wCategory,
-     DWORD      dwEventID,
-     PSID       lpUserSid,
-     WORD       wNumStrings,
-     DWORD      dwDataSize,
-     LPCSTR   *lpStrings,
-     LPVOID     lpRawData
-    )
-{
-    dprintf(("ReportEventA(): NIY\n"));
-    return TRUE;
-}
-
-
-BOOL WIN32API ReportEventW(     /*PLF Sat  98-03-07 00:36:43*/
-     HANDLE     hEventLog,
-     WORD       wType,
-     WORD       wCategory,
-     DWORD      dwEventID,
-     PSID       lpUserSid,
-     WORD       wNumStrings,
-     DWORD      dwDataSize,
-     LPCWSTR   *lpStrings,
-     LPVOID     lpRawData
-    )
-{
-    dprintf(("ReportEventW(): NIY\n"));
-    return TRUE;
-}
-
-
-BOOL WIN32API SetSecurityDescriptorDacl( /*PLF Sat  98-03-07 02:48:45*/
-    PSECURITY_DESCRIPTOR pSecurityDescriptor,
-    BOOL bDaclPresent,
-    PACL pDacl,
-    BOOL bDaclDefaulted
-    )
-
-{
-    dprintf(("SetSecurityDescriptorDacl(): NIY - returning error\n"));
-    return FALSE;
-}
-
-
-
-/*PLF Sat  98-03-07 02:59:20*/
-BOOL WIN32API InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor,
-					   DWORD dwRevision)
-{
-    dprintf(("InitializeSecurityDescriptor() NIY\n"));
-    return FALSE;
-}
-
-/*PLF Sat  98-03-07 02:59:20*/
-HANDLE WIN32API RegisterEventSourceA(LPCSTR lpUNCServerName, LPCSTR lpSourceName)
-{
-    dprintf(("RegisterEventSourceA() NIY\n"));
-    return FALSE;
-}
-
-/*PLF Sat  98-03-07 02:59:20*/
-HANDLE WIN32API RegisterEventSourceW(LPCWSTR lpUNCServerName, LPCWSTR lpSourceName)
-{
-    dprintf(("RegisterEventSourceW() NIY\n"));
-    return FALSE;
-}
-
-
-/*PLF Sat  98-03-07 02:59:20*/
-BOOL WIN32API DeregisterEventSource(HANDLE hEventLog)
-{
-    dprintf(("DeregisterEventSource() NIY\n"));
-    return FALSE;
-}
-
-
-/*PLF Sat  98-03-07 02:59:20*/
-BOOL WIN32API AdjustTokenPrivileges(
-            HANDLE TokenHandle,
-            BOOL DisableAllPrivileges,
-            PTOKEN_PRIVILEGES NewState,
-            DWORD BufferLength,
-            PTOKEN_PRIVILEGES PreviousState,
-            LPDWORD ReturnLength
-)
-{
-    dprintf(("AdjustTokenPrivileges() NIY\n"));
-    return FALSE;
-}
-
-/*PLF Sat  98-03-07 02:59:20*/
-BOOL WIN32API LookupPrivilegeValueA(LPCSTR lpSystemName,
-                                       LPCSTR lpName,
-                                       LPVOID lpLuid)
-{
-    dprintf(("LookupPrivilegeValueA() NIY\n"));
-    return FALSE;
-}
-
-BOOL WIN32API LookupPrivilegeValueW(LPCWSTR lpSystemName,
-                                       LPCWSTR lpName,
-                                       LPVOID lpLuid)
-{
-    dprintf(("LookupPrivilegeValueW() NIY\n"));
-    return FALSE;
-}
-
-
-/*PLF Sat  98-03-07 02:59:20*/
-BOOL WIN32API OpenProcessToken(HANDLE ProcessHandle,
-			       DWORD DesiredAccess,
-			       PHANDLE TokenHandle
-)
-{
-    dprintf(("OpenProcessToken() NIY\n"));
-    return FALSE;
-}
-
-
-//******************************************************************************
-/* Stubs added to get up office97 */
-//******************************************************************************
-/*KSO Thu 21.05.1998*/
-LONG WIN32API RegNotifyChangeKeyValue (
-   HKEY hKey,
-   BOOL bWatchSubtree,
-   DWORD dwNotifyFilter,
-   HANDLE hEvent,
-   BOOL fAsynchronus
-                        )
-{
-   dprintf(("RegNotifyChangeKeyValue() NIY\n"));
-   return FALSE;
-}
-//******************************************************************************
-//******************************************************************************
-/*KSO Thu 21.05.1998*/
-BOOL WIN32API SetThreadToken (
-   PHANDLE Thread,
-   HANDLE Token
-   )
-{
-   dprintf(("SetThreadToken() NIY\n"));
-   return FALSE;
-}
-
-//******************************************************************************
-//******************************************************************************
-/*KSO Thu 21.05.1998*/
-BOOL WIN32API OpenThreadToken (
-   HANDLE ThreadHandle,
-   DWORD DesiredAccess,
-   BOOL OpenAsSelf,
-   PHANDLE TokenHandle
-   )
-{
-   dprintf(("OpenThreadToken() NIY\n"));
-   return FALSE;
-}
-
-
-
-
-
-/*****************************************************************************
- * Name      : AbortSystemShutdownA
- * Purpose   : The AbortSystemShutdown function stops a system shutdown started
- *             by using the InitiateSystemShutdown function.
- * Parameters: LPTSTR  lpMachineName  address of name of computer to stop shutting down
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API AbortSystemShutdownA(LPTSTR lpMachineName)
-{
-  dprintf(("ADVAPI32: AbortSystemShutdownA(%s) not implemented.\n",
-           lpMachineName));
-
-  return (FALSE);
-}
-
-
-/*****************************************************************************
- * Name      : AbortSystemShutdownW
- * Purpose   : The AbortSystemShutdown function stops a system shutdown started
- *             by using the InitiateSystemShutdown function.
- * Parameters: LPWSTR  lpMachineName  address of name of computer to stop shutting down
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API AbortSystemShutdownW(LPWSTR lpMachineName)
-{
-  dprintf(("ADVAPI32: AbortSystemShutdownW(%s) not implemented.\n",
-           lpMachineName));
-
-  return (FALSE);
-}
-
-
-/*****************************************************************************
- * Name      : AccessCheck
- * Purpose   : The AccessCheck function is used by a server application to
- *             check a client's access to an object against the access control
- *             associated with the object.
- * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor
- *             HANDLE               ClientToken         handle of client access token
- *             DWORD                DesiredAccess       access mask to request
- *             PGENERIC_MAPPING     GenericMapping      address of generic-mapping structure
- *             PPRIVILEGE_SET       PrivilegeSet        address of privilege-set structure
- *             LPDWORD              PrivilegeSetLength  size of privilege-set structure
- *             LPDWORD              GrantedAccess       address of granted access mask
- *             LPBOOL               AccessStatus        address of flag indicating whether access granted
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define PGENERIC_MAPPING LPVOID
-#define PPRIVILEGE_SET   LPVOID
-BOOL WIN32API AccessCheck(PSECURITY_DESCRIPTOR pSecurityDescriptor,
-                             HANDLE               ClientToken,
-                             DWORD                DesiredAccess,
-                             PGENERIC_MAPPING     GenericMapping,
-                             PPRIVILEGE_SET       PrivilegeSet,
-                             LPDWORD              PrivilegeSetLength,
-                             LPDWORD              GrantedAccess,
-                             LPBOOL               AccessStatus)
-{
-  dprintf(("ADVAPI32: AccessCheck(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           pSecurityDescriptor,
-           ClientToken,
-           DesiredAccess,
-           GenericMapping,
-           PrivilegeSet,
-           PrivilegeSetLength,
-           GrantedAccess,
-           AccessStatus));
-
-  return (TRUE); /* always grant access */
-}
-
-
-/*****************************************************************************
- * Name      : AccessCheckAndAuditAlarmA
- * Purpose   : The AccessCheckAndAuditAlarm function performs an access
- *             validation and generates corresponding audit messages. An
- *             application can also use this function to determine whether
- *             necessary privileges are held by a client process. This function
- *             is generally used by a server application impersonating a client
- *             process. Alarms are not supported in the current version of Windows NT.
- * Parameters: LPCSTR              SubsystemName      address of string for subsystem name
- *             LPVOID               HandleId           address of handle identifier
- *             LPTSTR               ObjectTypeName     address of string for object type
- *             LPTSTR               ObjectName         address of string for object name
- *             PSECURITY_DESCRIPTOR SecurityDescriptor address of security descriptor
- *             DWORD                DesiredAccess      mask for requested access rights
- *             PGENERIC_MAPPING     GenericMapping     address of GENERIC_MAPPING
- *             BOOL                 ObjectCreation     object-creation flag
- *             LPDWORD              GrantedAccess      address of mask for granted rights
- *             LPBOOL               AccessStatus       address of flag for results
- *             LPBOOL               pfGenerateOnClose  address of flag for audit generation
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API AccessCheckAndAuditAlarmA(LPCSTR              SubsystemName,
-                                           LPVOID               HandleId,
-                                           LPTSTR               ObjectTypeName,
-                                           LPTSTR               ObjectName,
-                                           PSECURITY_DESCRIPTOR SecurityDescriptor,
-                                           DWORD                DesiredAccess,
-                                           PGENERIC_MAPPING     GenericMapping,
-                                           BOOL                 ObjectCreation,
-                                           LPDWORD              GrantedAccess,
-                                           LPBOOL               AccessStatus,
-                                           LPBOOL               pfGenerateOnClose)
-{
-  dprintf(("ADVAPI32: AccessCheckAndAuditAlarmA(%s,%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           SubsystemName,
-           HandleId,
-           ObjectTypeName,
-           ObjectName,
-           SecurityDescriptor,
-           DesiredAccess,
-           GenericMapping,
-           ObjectCreation,
-           GrantedAccess,
-           AccessStatus,
-           pfGenerateOnClose));
-
-  return (FALSE);
-}
-
-
-/*****************************************************************************
- * Name      : AccessCheckAndAuditAlarmW
- * Purpose   : The AccessCheckAndAuditAlarm function performs an access
- *             validation and generates corresponding audit messages. An
- *             application can also use this function to determine whether
- *             necessary privileges are held by a client process. This function
- *             is generally used by a server application impersonating a client
- *             process. Alarms are not supported in the current version of Windows NT.
- * Parameters: LPCSTR              SubsystemName      address of string for subsystem name
- *             LPVOID               HandleId           address of handle identifier
- *             LPTSTR               ObjectTypeName     address of string for object type
- *             LPTSTR               ObjectName         address of string for object name
- *             PSECURITY_DESCRIPTOR SecurityDescriptor address of security descriptor
- *             DWORD                DesiredAccess      mask for requested access rights
- *             PGENERIC_MAPPING     GenericMapping     address of GENERIC_MAPPING
- *             BOOL                 ObjectCreation     object-creation flag
- *             LPDWORD              GrantedAccess      address of mask for granted rights
- *             LPBOOL               AccessStatus       address of flag for results
- *             LPBOOL               pfGenerateOnClose  address of flag for audit generation
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API AccessCheckAndAuditAlarmW(LPCWSTR              SubsystemName,
-                                           LPVOID               HandleId,
-                                           LPWSTR               ObjectTypeName,
-                                           LPWSTR               ObjectName,
-                                           PSECURITY_DESCRIPTOR SecurityDescriptor,
-                                           DWORD                DesiredAccess,
-                                           PGENERIC_MAPPING     GenericMapping,
-                                           BOOL                 ObjectCreation,
-                                           LPDWORD              GrantedAccess,
-                                           LPBOOL               AccessStatus,
-                                           LPBOOL               pfGenerateOnClose)
-{
-  dprintf(("ADVAPI32: AccessCheckAndAuditAlarmW(%s,%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           SubsystemName,
-           HandleId,
-           ObjectTypeName,
-           ObjectName,
-           SecurityDescriptor,
-           DesiredAccess,
-           GenericMapping,
-           ObjectCreation,
-           GrantedAccess,
-           AccessStatus,
-           pfGenerateOnClose));
-
-  return (FALSE);
-}
-
-
-/*****************************************************************************
- * Name      : AddAccessAllowedAce
- * Purpose   : The AddAccessAllowedAce function adds an access-allowed ACE to
- *             an ACL. The access is granted to a specified SID. An ACE is an
- *             access-control entry. An ACL is an access-control list. A SID is
- *             a security identifier.
- * Parameters: PACL  pAcl           address of access-control list
- *             DWORD dwAceRevision  ACL revision level
- *             DWORD AccessMask     access mask
- *             PSID  pSid           address of security identifier
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API AddAccessAllowedAce(PACL  pAcl,
-                                     DWORD dwAceRevision,
-                                     DWORD AccessMask,
-                                     PSID  pSid)
-{
-  dprintf(("ADVAPI32: AddAccessAllowedAce(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           pAcl,
-           dwAceRevision,
-           AccessMask,
-           pSid));
-
-  return (FALSE);
-}
-
-
-/*****************************************************************************
- * Name      : AddAccessDeniedAce
- * Purpose   : The AddAccessDeniedAce function adds an access-denied ACE to an
- *             ACL. The access is denied to a specified SID. An ACE is an
- *             access-control entry. An ACL is an access-control list. A SID
- *             is a security identifier.
- * Parameters: PACL  pAcl           address of access-control list
- *             DWORD dwAceRevision  ACL revision level
- *             DWORD AccessMask     access mask
- *             PSID  pSid           address of security identifier
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API AddAccessDeniedAce(PACL  pAcl,
-                                    DWORD dwAceRevision,
-                                    DWORD AccessMask,
-                                    PSID  pSid)
-{
-  dprintf(("ADVAPI32: AddAccessDeniedAce(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           pAcl,
-           dwAceRevision,
-           AccessMask,
-           pSid));
-
-  return (FALSE);
-}
-
-
-/*****************************************************************************
- * Name      : AddAce
- * Purpose   : The AddAce function adds one or more ACEs to a specified ACL.
- *             An ACE is an access-control entry. An ACL is an access-control list.
- * Parameters: PACL   pAcl               address of access-control list
- *             DWORD  dwAceRevision      ACL revision level
- *             DWORD  dwStartingAceIndex index of ACE position in ACL
- *             LPVOID pAceList           address of one or more ACEs
- *             DWORD  nAceListLength     size of buffer for ACEs
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API AddAce(PACL   pAcl,
-                        DWORD  dwAceRevision,
-                        DWORD  dwStartingAceIndex,
-                        LPVOID pAceList,
-                        DWORD  nAceListLength)
-{
-  dprintf(("ADVAPI32: AddAce(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           pAcl,
-           dwAceRevision,
-           dwStartingAceIndex,
-           pAceList,
-           nAceListLength));
-
-  return (FALSE);
-}
-
-
-/*****************************************************************************
- * Name      : AddAuditAccessAce
- * Purpose   : The AddAuditAccessAce function adds a system-audit ACE to a
- *             system ACL. The access of a specified SID is audited. An ACE is
- *             an access-control entry. An ACL is an access-control list. A SID
- *             is a security identifier.
- * Parameters: PACL  pAcl           address of access-control list
- *             DWORD dwAceRevision  ACL revision level
- *             DWORD dwAccessMask   access mask
- *             PSID  pSid           address of security identifier
- *             BOOL  bAuditSuccess  flag for auditing successful access
- *             BOOL  bAuditFailure  flag for auditing unsuccessful access attempts
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API AddAuditAccessAce(PACL  pAcl,
-                                   DWORD dwAceRevision,
-                                   DWORD dwAccessMask,
-                                   PSID  pSid,
-                                   BOOL  bAuditSuccess,
-                                   BOOL  bAuditFailure)
-{
-  dprintf(("ADVAPI32: AddAuditAccessAce(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           pAcl,
-           dwAceRevision,
-           dwAccessMask,
-           pSid,
-           bAuditSuccess,
-           bAuditFailure));
-
-  return (FALSE);
-}
-
-
-/*****************************************************************************
- * Name      : AdjustTokenGroups
- * Purpose   : The AdjustTokenGroups function adjusts groups in the specified
- *             access token. TOKEN_ADJUST_GROUPS access is required to enable
- *             or disable groups in an access token.
- * Parameters: HANDLE         TokenHandle     handle of token that contains groups
- *             BOOL           ResetToDefault  flag for default settings
- *             PTOKEN_GROUPS  NewState        address of new group information
- *             DWORD          BufferLength    size of buffer for previous information
- *             PTOKEN_GROUPS  PreviousState   address of previous group information
- *             LPDWORD         ReturnLength    address of required buffer size
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define PTOKEN_GROUPS LPVOID
-BOOL WIN32API AdjustTokenGroups(HANDLE         TokenHandle,
-                                   BOOL           ResetToDefault,
-                                   PTOKEN_GROUPS  NewState,
-                                   DWORD          BufferLength,
-                                   PTOKEN_GROUPS  PreviousState,
-                                   LPDWORD         ReturnLength)
-{
-  dprintf(("ADVAPI32: AdjustTokenGroups(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           TokenHandle,
-           ResetToDefault,
-           NewState,
-           BufferLength,
-           PreviousState,
-           ReturnLength));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : AllocateAndInitializeSid
- * Purpose   : The AllocateAndInitializeSid function allocates and initializes
- *             a security identifier (SID) with up to eight subauthorities.
- * Parameters: PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority address of identifier authority
- *             BYTE   nSubAuthorityCount count of subauthorities
- *             DWORD  dwSubAuthority0    subauthority 0
- *             DWORD  dwSubAuthority1    subauthority 1
- *             DWORD  dwSubAuthority2    subauthority 2
- *             DWORD  dwSubAuthority3    subauthority 3
- *             DWORD  dwSubAuthority4    subauthority 4
- *             DWORD  dwSubAuthority5    subauthority 5
- *             DWORD  dwSubAuthority6    subauthority 6
- *             DWORD  dwSubAuthority7    subauthority 7
- *             PSID   *pSid              address of pointer to SID
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define PSID_IDENTIFIER_AUTHORITY LPVOID
-BOOL WIN32API AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY  pIdentifierAuthority,
-                                          BYTE  nSubAuthorityCount,
-                                          DWORD  dwSubAuthority0,
-                                          DWORD  dwSubAuthority1,
-                                          DWORD  dwSubAuthority2,
-                                          DWORD  dwSubAuthority3,
-                                          DWORD  dwSubAuthority4,
-                                          DWORD  dwSubAuthority5,
-                                          DWORD  dwSubAuthority6,
-                                          DWORD  dwSubAuthority7,
-                                          PSID  *pSid)
-{
-  dprintf(("ADVAPI32: AllocateAndInitializeSid(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           pIdentifierAuthority,
-           nSubAuthorityCount,
-           dwSubAuthority0,
-           dwSubAuthority1,
-           dwSubAuthority2,
-           dwSubAuthority3,
-           dwSubAuthority4,
-           dwSubAuthority5,
-           dwSubAuthority6,
-           dwSubAuthority7,
-           pSid));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : AllocateLocallyUniqueId
- * Purpose   : The AllocateLocallyUniqueId function allocates a locally unique
- *             identifier (LUID).
- * Parameters: PLUID  Luid  address of locally unique identifier
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API AllocateLocallyUniqueId(PLUID  Luid)
-{
-  dprintf(("ADVAPI32: AllocateLocallyUniqueId(%08xh) not implemented.\n",
-           Luid));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : AreAllAccessesGranted
- * Purpose   : The AreAllAccessesGranted function checks whether a set of
- *             requested access rights has been granted. The access rights are
- *             represented as bit flags in a 32-bit access mask.
- * Parameters: DWORD GrantedAccess  access mask for granted access rights
- *             DWORD DesiredAccess  access mask for requested access rights
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API AreAllAccessesGranted(DWORD  GrantedAccess,
-                                       DWORD  DesiredAccess)
-{
-  dprintf(("ADVAPI32: AreAllAccessesGranted(%08xh,%08xh) not implemented.\n",
-           GrantedAccess,
-           DesiredAccess));
-
-  return (TRUE); /* grant all access */
-}
-
-
-/*****************************************************************************
- * Name      : AreAnyAccessesGranted
- * Purpose   : The AreAnyAccessesGranted function tests whether any of a set of
- *             requested access rights has been granted. The access rights are
- *             represented as bit flags in a 32-bit access mask.
- * Parameters: DWORD GrantedAccess  access mask for granted access rights
- *             DWORD DesiredAccess  access mask for requested access rights
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API AreAnyAccessesGranted(DWORD  GrantedAccess,
-                                       DWORD  DesiredAccess)
-{
-  dprintf(("ADVAPI32: AreAnyAccessesGranted(%08xh,%08xh) not implemented.\n",
-           GrantedAccess,
-           DesiredAccess));
-
-  return (TRUE); /* grant all access */
-}
-
-
-/*****************************************************************************
- * Name      : BackupEventLogA
- * Purpose   : The BackupEventLog function saves the specified event log to a
- *             backup file. The function does not clear the event log.
- * Parameters: HANDLE  hEventLog        handle to event log
- *             LPCSTR lpBackupFileName  name of backup file
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API BackupEventLogA(HANDLE  hEventLog,
-                                 LPCSTR lpBackupFileName)
-{
-  dprintf(("ADVAPI32: BackupEventLogA(%08xh,%s) not implemented.\n",
-           hEventLog,
-           lpBackupFileName));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : BackupEventLogW
- * Purpose   : The BackupEventLog function saves the specified event log to a
- *             backup file. The function does not clear the event log.
- * Parameters: HANDLE  hEventLog        handle to event log
- *             LPCWSTR lpBackupFileName  name of backup file
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API BackupEventLogW(HANDLE  hEventLog,
-                                 LPCWSTR lpBackupFileName)
-{
-  dprintf(("ADVAPI32: BackupEventLogW() not implemented.\n",
-           hEventLog,
-           lpBackupFileName));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ChangeServiceConfigA
- * Purpose   : The ChangeServiceConfig function changes the configuration
- *             parameters of a service.
- * Parameters: SC_HANDLE hService           handle of service
- *             DWORD     dwServiceType      type of service
- *             DWORD     dwStartType        when to start service
- *             DWORD     dwErrorControl     severity if service fails to start
- *             LPCSTR   lpBinaryPathName   address of service binary file name
- *             LPCSTR   lpLoadOrderGroup   address of load ordering group name
- *             LPDWORD   lpdwTagId          address of variable to get tag identifier
- *             LPCSTR   lpDependencies     address of array of dependency names
- *             LPCSTR   lpServiceStartName address of account name of service
- *             LPCSTR   lpPassword         address of password for service account
- *             LPCSTR   lpDisplayName      address of display name
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define SC_HANDLE HANDLE
-BOOL WIN32API ChangeServiceConfigA(SC_HANDLE hService,
-                                      DWORD     dwServiceType,
-                                      DWORD     dwStartType,
-                                      DWORD     dwErrorControl,
-                                      LPCSTR   lpBinaryPathName,
-                                      LPCSTR   lpLoadOrderGroup,
-                                      LPDWORD   lpdwTagId,
-                                      LPCSTR   lpDependencies,
-                                      LPCSTR   lpServiceStartName,
-                                      LPCSTR   lpPassword,
-                                      LPCSTR   lpDisplayName)
-{
-  dprintf(("ADVAPI32: ChangeServiceConfigA(%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s,%s) not implemented.\n",
-           hService,
-           dwServiceType,
-           dwStartType,
-           dwErrorControl,
-           lpBinaryPathName,
-           lpLoadOrderGroup,
-           lpdwTagId,
-           lpDependencies,
-           lpServiceStartName,
-           lpPassword,
-           lpDisplayName));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ChangeServiceConfigW
- * Purpose   : The ChangeServiceConfig function changes the configuration
- *             parameters of a service.
- * Parameters: SC_HANDLE hService           handle of service
- *             DWORD     dwServiceType      type of service
- *             DWORD     dwStartType        when to start service
- *             DWORD     dwErrorControl     severity if service fails to start
- *             LPCWSTR   lpBinaryPathName   address of service binary file name
- *             LPCWSTR   lpLoadOrderGroup   address of load ordering group name
- *             LPDWORD   lpdwTagId          address of variable to get tag identifier
- *             LPCWSTR   lpDependencies     address of array of dependency names
- *             LPCWSTR   lpServiceStartName address of account name of service
- *             LPCWSTR   lpPassword         address of password for service account
- *             LPCWSTR   lpDisplayName      address of display name
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ChangeServiceConfigW(SC_HANDLE hService,
-                                      DWORD     dwServiceType,
-                                      DWORD     dwStartType,
-                                      DWORD     dwErrorControl,
-                                      LPCWSTR   lpBinaryPathName,
-                                      LPCWSTR   lpLoadOrderGroup,
-                                      LPDWORD   lpdwTagId,
-                                      LPCWSTR   lpDependencies,
-                                      LPCWSTR   lpServiceStartName,
-                                      LPCWSTR   lpPassword,
-                                      LPCWSTR   lpDisplayName)
-{
-  dprintf(("ADVAPI32: ChangeServiceConfigW(%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s,%s) not implemented.\n",
-           hService,
-           dwServiceType,
-           dwStartType,
-           dwErrorControl,
-           lpBinaryPathName,
-           lpLoadOrderGroup,
-           lpdwTagId,
-           lpDependencies,
-           lpServiceStartName,
-           lpPassword,
-           lpDisplayName));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ClearEventLogA
- * Purpose   : The ClearEventLog function clears the specified event log, and
- *             optionally saves the current copy of the logfile to a backup file.
- * Parameters: HANDLE  hEventLog         handle to event log
- *             LPCSTR lpBackupFileName  name of backup file
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ClearEventLogA(HANDLE  hEventLog,
-                                LPCSTR lpBackupFileName)
-{
-  dprintf(("ADVAPI32: ClearEventLogA(%08xh,%s) not implemented.\n",
-           hEventLog,
-           lpBackupFileName));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ClearEventLogW
- * Purpose   : The ClearEventLog function clears the specified event log, and
- *             optionally saves the current copy of the logfile to a backup file.
- * Parameters: HANDLE  hEventLog         handle to event log
- *             LPCSTR lpBackupFileName  name of backup file
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ClearEventLogW(HANDLE  hEventLog,
-                                LPCWSTR lpBackupFileName)
-{
-  dprintf(("ADVAPI32: ClearEventLogW(%08xh,%s) not implemented.\n",
-           hEventLog,
-           lpBackupFileName));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : CloseEventLog
- * Purpose   : The CloseEventLog function closes the specified event log.
- * Parameters: HANDLE  hEventLog  handle to event log
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API CloseEventLog(HANDLE hEventLog)
-{
-  dprintf(("ADVAPI32: CloseEventLog(%08xh) not implemented.\n",
-           hEventLog));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : CloseServiceHandle
- * Purpose   : The CloseServiceHandle function closes a handle to a service
- *             control manager database as returned by the OpenSCManager function,
- *             or it closes a handle to a service object as returned by either
- *             the OpenService or CreateService function.
- * Parameters: SC_HANDLE  hSCObject  handle of service or service control manager database
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API CloseServiceHandle(SC_HANDLE hSCObject)
-{
-  dprintf(("ADVAPI32: CloseServiceHandle(%08xh) not implemented.\n",
-           hSCObject));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ControlService
- * Purpose   : The ControlService function sends a control code to a Win32 service.
- * Parameters: SC_HANDLE        hService        handle of service
- *             DWORD            dwControl       control code
- *             LPSERVICE_STATUS lpServiceStatus address of service status structure
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ControlService(SC_HANDLE        hService,
-                                DWORD            dwControl,
-                                LPSERVICE_STATUS lpServiceStatus)
-{
-  dprintf(("ADVAPI32: ControlService(%08xh,%08xh,%08xh) not implemented.\n",
-           hService,
-           dwControl,
-           lpServiceStatus));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : CopySid
- * Purpose   : The CopySid function copies a security identifier (SID) to a buffer.
- * Parameters: DWORD nDestinationSidLength  size of buffer for copied SID
- *             PSID  pDestinationSid        address of buffer for copied SID
- *             PSID  pSourceSid             address of source SID
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API CopySid(DWORD nDestinationSidLength,
-                         PSID  pDestinationSid,
-                         PSID  pSourceSid)
-{
-  dprintf(("ADVAPI32: CopySid(%08xh,%08xh,%08xh)\n",
-           nDestinationSidLength,
-           pDestinationSid,
-           pSourceSid));
-
-  memcpy((LPVOID)pDestinationSid, /* that's all :) */
-         (LPVOID)pSourceSid,
-         nDestinationSidLength);
-
-  return (TRUE);
-}
-
-
-/*****************************************************************************
- * Name      : CreatePrivateObjectSecurity
- * Purpose   : The CreatePrivateObjectSecurity function allocates and initializes
- *             a self-relative security descriptor for a new protected server's
- *             object. This function is called when a new protected server object is being created.
- * Parameters: PSECURITY_DESCRIPTOR  ParentDescriptor  address of parent directory SD
- *             PSECURITY_DESCRIPTOR  CreatorDescriptor address of creator SD
- *             PSECURITY_DESCRIPTOR *NewDescriptor     address of pointer to new SD
- *             BOOL                  IsDirectoryObject container flag for new SD
- *             HANDLE                Token             handle of client's access token
- *             PGENERIC_MAPPING      GenericMapping    address of access-rights structure
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API CreatePrivateObjectSecurity(PSECURITY_DESCRIPTOR  ParentDescriptor,
-                                             PSECURITY_DESCRIPTOR  CreatorDescriptor,
-                                             PSECURITY_DESCRIPTOR *NewDescriptor,
-                                             BOOL                  IsDirectoryObject,
-                                             HANDLE                Token,
-                                             PGENERIC_MAPPING      GenericMapping)
-{
-  dprintf(("ADVAPI32: CreatePrivateObjectSecurity(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           ParentDescriptor,
-           CreatorDescriptor,
-           NewDescriptor,
-           IsDirectoryObject,
-           Token,
-           GenericMapping));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : CreateProcessAsUserA
- * Purpose   : The CreateProcessAsUser function creates a new process and its
- *             primary thread. The new process then executes a specified executable
- *             file. The CreateProcessAsUser function behaves just like the
- *             CreateProcess function, with one important difference: the
- *             created process runs in a context in which the system sees the
- *             user represented by the hToken parameter as if that user had
- *             logged on to the system and then called the CreateProcess function.
- * Parameters: HANDLE                 hToken               handle to a token that represents a logged-on user
- *             LPCSTR                lpApplicationName    pointer to name of executable module
- *             LPTSTR                 lpCommandLine        pointer to command line string
- *             LPSECURITY_ATTRIBUTES  lpProcessAttributes  pointer to process security attributes
- *             LPSECURITY_ATTRIBUTES  lpThreadAttributes   pointer to thread security attributes
- *             BOOL                   bInheritHandles      new process inherits handles
- *             DWORD                  dwCreationFlags      creation flags
- *             LPVOID                 lpEnvironment        pointer to new environment block
- *             LPCSTR                lpCurrentDirectory   pointer to current directory name
- *             LPSTARTUPINFO          lpStartupInfo        pointer to STARTUPINFO
- *             LPPROCESS_INFORMATION  lpProcessInformation pointer to PROCESS_INFORMATION
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API CreateProcessAsUserA(HANDLE                 hToken,
-                                      LPCSTR                lpApplicationName,
-                                      LPTSTR                 lpCommandLine,
-                                      LPSECURITY_ATTRIBUTES  lpProcessAttributes,
-                                      LPSECURITY_ATTRIBUTES  lpThreadAttributes,
-                                      BOOL                   bInheritHandles,
-                                      DWORD                  dwCreationFlags,
-                                      LPVOID                 lpEnvironment,
-                                      LPCSTR                 lpCurrentDirectory,
-                                      LPSTARTUPINFOA         lpStartupInfo,
-                                      LPPROCESS_INFORMATION  lpProcessInformation)
-{
-  dprintf(("ADVAPI32: CreateProcessAsUserA(%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%s,%08xh,%08xh) not implemented.\n",
-           hToken,
-           lpApplicationName,
-           lpCommandLine,
-           lpProcessAttributes,
-           lpThreadAttributes,
-           bInheritHandles,
-           dwCreationFlags,
-           lpEnvironment,
-           lpCurrentDirectory,
-           lpStartupInfo,
-           lpProcessInformation));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : CreateProcessAsUserW
- * Purpose   : The CreateProcessAsUser function creates a new process and its
- *             primary thread. The new process then executes a specified executable
- *             file. The CreateProcessAsUser function behaves just like the
- *             CreateProcess function, with one important difference: the
- *             created process runs in a context in which the system sees the
- *             user represented by the hToken parameter as if that user had
- *             logged on to the system and then called the CreateProcess function.
- * Parameters: HANDLE                 hToken               handle to a token that represents a logged-on user
- *             LPCWSTR                lpApplicationName    pointer to name of executable module
- *             LPWSTR                 lpCommandLine        pointer to command line string
- *             LPSECURITY_ATTRIBUTES  lpProcessAttributes  pointer to process security attributes
- *             LPSECURITY_ATTRIBUTES  lpThreadAttributes   pointer to thread security attributes
- *             BOOL                   bInheritHandles      new process inherits handles
- *             DWORD                  dwCreationFlags      creation flags
- *             LPVOID                 lpEnvironment        pointer to new environment block
- *             LPCWSTR                lpCurrentDirectory   pointer to current directory name
- *             LPSTARTUPINFO          lpStartupInfo        pointer to STARTUPINFO
- *             LPPROCESS_INFORMATION  lpProcessInformation pointer to PROCESS_INFORMATION
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API CreateProcessAsUserW(HANDLE                 hToken,
-                                      LPCWSTR                lpApplicationName,
-                                      LPWSTR                 lpCommandLine,
-                                      LPSECURITY_ATTRIBUTES  lpProcessAttributes,
-                                      LPSECURITY_ATTRIBUTES  lpThreadAttributes,
-                                      BOOL                   bInheritHandles,
-                                      DWORD                  dwCreationFlags,
-                                      LPVOID                 lpEnvironment,
-                                      LPCWSTR                lpCurrentDirectory,
-                                      LPSTARTUPINFOA         lpStartupInfo,
-                                      LPPROCESS_INFORMATION  lpProcessInformation)
-{
-  dprintf(("ADVAPI32: CreateProcessAsUserW(%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%s,%08xh,%08xh) not implemented.\n",
-           hToken,
-           lpApplicationName,
-           lpCommandLine,
-           lpProcessAttributes,
-           lpThreadAttributes,
-           bInheritHandles,
-           dwCreationFlags,
-           lpEnvironment,
-           lpCurrentDirectory,
-           lpStartupInfo,
-           lpProcessInformation));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : CreateServiceA
- * Purpose   : The CreateService function creates a service object and adds it
- *             to the specified service control manager database.
- * Parameters: SC_HANDLE hSCManager         handle of service control manager database
- *             LPCSTR   lpServiceName      address of name of service to start
- *             LPCSTR   lpDisplayName      address of display name
- *             DWORD     dwDesiredAccess    type of access to service
- *             DWORD     dwServiceType      type of service
- *             DWORD     dwStartType        when to start service
- *             DWORD     dwErrorControl     severity if service fails to start
- *             LPCSTR   lpBinaryPathName   address of name of binary file
- *             LPCSTR   lpLoadOrderGroup   address of name of load ordering group
- *             LPDWORD   lpdwTagId          address of variable to get tag identifier
- *             LPCSTR   lpDependencies     address of array of dependency names
- *             LPCSTR   lpServiceStartName address of account name of service
- *             LPCSTR   lpPassword         address of password for service account
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-SC_HANDLE WIN32API CreateServiceA(SC_HANDLE hSCManager,
-                                     LPCSTR   lpServiceName,
-                                     LPCSTR   lpDisplayName,
-                                     DWORD     dwDesiredAccess,
-                                     DWORD     dwServiceType,
-                                     DWORD     dwStartType,
-                                     DWORD     dwErrorControl,
-                                     LPCSTR   lpBinaryPathName,
-                                     LPCSTR   lpLoadOrderGroup,
-                                     LPDWORD   lpdwTagId,
-                                     LPCSTR   lpDependencies,
-                                     LPCSTR   lpServiceStartName,
-                                     LPCSTR   lpPassword)
-{
-  dprintf(("ADVAPI32: CreateServiceA(%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s) not implemented.\n",
-           hSCManager,
-           lpServiceName,
-           lpDisplayName,
-           dwDesiredAccess,
-           dwServiceType,
-           dwStartType,
-           dwErrorControl,
-           lpBinaryPathName,
-           lpLoadOrderGroup,
-           lpdwTagId,
-           lpDependencies,
-           lpServiceStartName,
-           lpPassword));
-
-  return (NULL); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : CreateServiceW
- * Purpose   : The CreateService function creates a service object and adds it
- *             to the specified service control manager database.
- * Parameters: SC_HANDLE hSCManager         handle of service control manager database
- *             LPCWSTR   lpServiceName      address of name of service to start
- *             LPCWSTR   lpDisplayName      address of display name
- *             DWORD     dwDesiredAccess    type of access to service
- *             DWORD     dwServiceType      type of service
- *             DWORD     dwStartType        when to start service
- *             DWORD     dwErrorControl     severity if service fails to start
- *             LPCWSTR   lpBinaryPathName   address of name of binary file
- *             LPCWSTR   lpLoadOrderGroup   address of name of load ordering group
- *             LPDWORD   lpdwTagId          address of variable to get tag identifier
- *             LPCWSTR   lpDependencies     address of array of dependency names
- *             LPCWSTR   lpServiceStartName address of account name of service
- *             LPCWSTR   lpPassword         address of password for service account
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-SC_HANDLE WIN32API CreateServiceW(SC_HANDLE hSCManager,
-                                     LPCWSTR   lpServiceName,
-                                     LPCWSTR   lpDisplayName,
-                                     DWORD     dwDesiredAccess,
-                                     DWORD     dwServiceType,
-                                     DWORD     dwStartType,
-                                     DWORD     dwErrorControl,
-                                     LPCWSTR   lpBinaryPathName,
-                                     LPCWSTR   lpLoadOrderGroup,
-                                     LPDWORD   lpdwTagId,
-                                     LPCWSTR   lpDependencies,
-                                     LPCWSTR   lpServiceStartName,
-                                     LPCWSTR   lpPassword)
-{
-  dprintf(("ADVAPI32: CreateServiceW(%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%s,%s,%08xh,%s,%s,%s) not implemented.\n",
-           hSCManager,
-           lpServiceName,
-           lpDisplayName,
-           dwDesiredAccess,
-           dwServiceType,
-           dwStartType,
-           dwErrorControl,
-           lpBinaryPathName,
-           lpLoadOrderGroup,
-           lpdwTagId,
-           lpDependencies,
-           lpServiceStartName,
-           lpPassword));
-
-  return (NULL); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : DeleteAce
- * Purpose   : The DeleteAce function deletes an ACE from an ACL.
- *             An ACE is an access-control entry. An ACL is an access-control list.
- * Parameters: PACL  pAcl        address of access-control list
- *             DWORD dwAceIndex  index of ACE position in ACL
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API DeleteAce(PACL  pAcl,
-                           DWORD dwAceIndex)
-{
-  dprintf(("ADVAPI32: DeleteAce(%08xh, %08xh) not implemented.\n",
-           pAcl,
-           dwAceIndex));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : DeleteService
- * Purpose   : The DeleteService function marks the specified service for
- *             deletion from the service control manager database.
- * Parameters: SC_HANDLE  hService  handle of service
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API DeleteService(SC_HANDLE hService)
-{
-  dprintf(("ADVAPI32: DeleteService(%08xh) not implemented.\n",
-           hService));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : DestroyPrivateObjectSecurity
- * Purpose   : The DestroyPrivateObjectSecurity function deletes a protected
- *             server object's security descriptor. This security descriptor
- *             must have been created by a call to the CreatePrivateObjectSecurity function.
- * Parameters: PSECURITY_DESCRIPTOR  * ObjectDescriptor  address of pointer to SECURITY_DESCRIPTOR
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API DestroyPrivateObjectSecurity(PSECURITY_DESCRIPTOR *ObjectDescriptor)
-{
-  dprintf(("ADVAPI32: DestroyPrivateObjectSecurity(%08xh) not implemented.\n",
-           ObjectDescriptor));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : DuplicateToken
- * Purpose   : The DuplicateToken function creates a new access token that
- *             duplicates one already in existence.
- * Parameters: HANDLE                       ExistingTokenHandle  handle of token to duplicate
- *             SECURITY_IMPERSONATION_LEVEL ImpersonationLevel   impersonation level
- *             PHANDLE                      DuplicateTokenHandle handle of duplicated token
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define SECURITY_IMPERSONATION_LEVEL DWORD
-BOOL WIN32API DuplicateToken(HANDLE                       ExistingTokenHandle,
-                                SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
-                                PHANDLE                      DuplicateTokenHandle)
-{
-  dprintf(("ADVAPI32: DuplicateToken(%08x,%08xh,%08xh) not implemented.\n",
-           ExistingTokenHandle,
-           ImpersonationLevel,
-           DuplicateTokenHandle));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : EnumDependentServicesA
- * Purpose   : The EnumDependentServices function enumerates services that
- *             depend on another specified service; that is, the specified
- *             service must be running before the enumerated services can run.
- *             The name and status of each dependent service are provided.
- * Parameters: SC_HANDLE             hService           handle of service
- *             DWORD                 dwServiceState     state of services to enumerate
- *             LPENUM_SERVICE_STATUS lpServices         address of service status buffer
- *             DWORD                 cbBufSize          size of service status buffer
- *             LPDWORD               pcbBytesNeeded     address of variable for bytes needed
- *             LPDWORD               lpServicesReturned address of variable for number returned
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define LPENUM_SERVICE_STATUS LPVOID
-BOOL WIN32API EnumDependentServicesA(SC_HANDLE             hService,
-                                        DWORD                 dwServiceState,
-                                        LPENUM_SERVICE_STATUS lpServices,
-                                        DWORD                 cbBufSize,
-                                        LPDWORD               pcbBytesNeeded,
-                                        LPDWORD               lpServicesReturned)
-{
-  dprintf(("ADVAPI32: EnumDependentServicesA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hService,
-           dwServiceState,
-           lpServices,
-           cbBufSize,
-           pcbBytesNeeded,
-           lpServicesReturned));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : EnumDependentServicesW
- * Purpose   : The EnumDependentServices function enumerates services that
- *             depend on another specified service; that is, the specified
- *             service must be running before the enumerated services can run.
- *             The name and status of each dependent service are provided.
- * Parameters: SC_HANDLE             hService           handle of service
- *             DWORD                 dwServiceState     state of services to enumerate
- *             LPENUM_SERVICE_STATUS lpServices         address of service status buffer
- *             DWORD                 cbBufSize          size of service status buffer
- *             LPDWORD               pcbBytesNeeded     address of variable for bytes needed
- *             LPDWORD               lpServicesReturned address of variable for number returned
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API EnumDependentServicesW(SC_HANDLE             hService,
-                                        DWORD                 dwServiceState,
-                                        LPENUM_SERVICE_STATUS lpServices,
-                                        DWORD                 cbBufSize,
-                                        LPDWORD               pcbBytesNeeded,
-                                        LPDWORD               lpServicesReturned)
-{
-  dprintf(("ADVAPI32: EnumDependentServicesW(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hService,
-           dwServiceState,
-           lpServices,
-           cbBufSize,
-           pcbBytesNeeded,
-           lpServicesReturned));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : EnumServicesStatusA
- * Purpose   : The EnumServicesStatus function enumerates services in the specified
- *             service control manager database. The name and status of each service are provided.
- * Parameters: SC_HANDLE             hSCManager          handle of service control manager database
- *             DWORD                 dwServiceType       type of services to enumerate
- *             DWORD                 dwServiceState      state of services to enumerate
- *             LPENUM_SERVICE_STATUS lpServices          address of service status buffer
- *             DWORD                 cbBufSize           size of service status buffer
- *             LPDWORD               pcbBytesNeeded      address of variable for bytes needed
- *             LPDWORD               lpServicesReturned  address of variable for number returned
- *             LPDWORD               lpResumeHandle      address of variable for next entry
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API EnumServicesStatusA(SC_HANDLE             hSCManager,
-                                     DWORD                 dwServiceType,
-                                     DWORD                 dwServiceState,
-                                     LPENUM_SERVICE_STATUS lpServices,
-                                     DWORD                 cbBufSize,
-                                     LPDWORD               pcbBytesNeeded,
-                                     LPDWORD               lpServicesReturned,
-                                     LPDWORD               lpResumeHandle)
-{
-  dprintf(("ADVAPI32: EnumServicesStatusA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hSCManager,
-           dwServiceType,
-           dwServiceState,
-           lpServices,
-           cbBufSize,
-           pcbBytesNeeded,
-           lpServicesReturned,
-           lpResumeHandle));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : EnumServicesStatusW
- * Purpose   : The EnumServicesStatus function enumerates services in the specified
- *             service control manager database. The name and status of each service are provided.
- * Parameters: SC_HANDLE             hSCManager          handle of service control manager database
- *             DWORD                 dwServiceType       type of services to enumerate
- *             DWORD                 dwServiceState      state of services to enumerate
- *             LPENUM_SERVICE_STATUS lpServices          address of service status buffer
- *             DWORD                 cbBufSize           size of service status buffer
- *             LPDWORD               pcbBytesNeeded      address of variable for bytes needed
- *             LPDWORD               lpServicesReturned  address of variable for number returned
- *             LPDWORD               lpResumeHandle      address of variable for next entry
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API EnumServicesStatusW(SC_HANDLE             hSCManager,
-                                     DWORD                 dwServiceType,
-                                     DWORD                 dwServiceState,
-                                     LPENUM_SERVICE_STATUS lpServices,
-                                     DWORD                 cbBufSize,
-                                     LPDWORD               pcbBytesNeeded,
-                                     LPDWORD               lpServicesReturned,
-                                     LPDWORD               lpResumeHandle)
-{
-  dprintf(("ADVAPI32: EnumServicesStatusW(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hSCManager,
-           dwServiceType,
-           dwServiceState,
-           lpServices,
-           cbBufSize,
-           pcbBytesNeeded,
-           lpServicesReturned,
-           lpResumeHandle));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : EqualPrefixSid
- * Purpose   : The EqualPrefixSid function tests two security-identifier (SID)
- *             prefix values for equality. An SID prefix is the entire SID except
- *             for the last subauthority value.
- * Parameters: PSID  pSid1  address of first SID to compare
- *             PSID  pSid2  address of second SID to compare
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API EqualPrefixSid(PSID pSid1,
-                                PSID pSid2)
-{
-  dprintf(("ADVAPI32: EqualPrefixSid(%08xh,%08xh) not correctly implemented.\n",
-           pSid1,
-           pSid2));
-
-  return ( lstrcmpA( (LPCSTR)pSid1,
-                        (LPCSTR)pSid2) == 0 );       /* @@@PH roughly ... :) */
-}
-
-
-/*****************************************************************************
- * Name      : EqualSid
- * Purpose   : The EqualSid function tests two security identifier (SID) values
- *             for equality. Two SIDs must match exactly to be considered equal.
- * Parameters: PSID  pSid1  address of first SID to compare
- *             PSID  pSid2  address of second SID to compare
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API EqualSid(PSID pSid1,
-                          PSID pSid2)
-{
-  dprintf(("ADVAPI32: EqualSid(%08xh, %08xh) not correctly implemented.\n",
-           pSid1,
-           pSid2));
-
-  return ( lstrcmpA( (LPCSTR)pSid1,
-                        (LPCSTR)pSid2) == 0 );       /* @@@PH roughly ... :) */
-}
-
-
-/*****************************************************************************
- * Name      : FindFirstFreeAce
- * Purpose   : The FindFirstFreeAce function retrieves a pointer to the first
- *             free byte in an access-control list (ACL).
- * Parameters: PACL   pAcl   address of access-control list
- *             LPVOID *pAce  address of pointer to first free byte
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API FindFirstFreeAce(PACL pAcl,
-                                  LPVOID *pAce)
-{
-  dprintf(("ADVAPI32: FindFirstFreeAce(%08xh, %08xh) not implemented.\n",
-           pAcl,
-           pAce));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : FreeSid
- * Purpose   : The FreeSid function frees a security identifier (SID) previously
- *             allocated by using the AllocateAndInitializeSid function.
- * Parameters: PSID  pSid   address of SID to free
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-VOID WIN32API FreeSid(PSID pSid)
-{
-  dprintf(("ADVAPI32: FreeSid(%08xh) not implemented.\n",
-           pSid));
-}
-
-
-/*****************************************************************************
- * Name      : GetAce
- * Purpose   : The GetAce function obtains a pointer to an ACE in an ACL.
- *             An ACE is an access control entry. An ACL is an access control list.
- * Parameters: PACL   pAcl        address of access-control list
- *             DWORD  dwAceIndex  index of ACE to retrieve
- *             LPVOID *pAce       address of pointer to ACE
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetAce(PACL   pAcl,
-                        DWORD  dwAceIndex,
-                        LPVOID *pAce)
-{
-  dprintf(("ADVAPI32: GetAce(%08xh,%08xh,%08xh) not implemented.\n",
-           pAcl,
-           dwAceIndex,
-           pAce));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetAclInformation
- * Purpose   : The GetAclInformation function retrieves information about an
- *             access-control list (ACL).
- * Parameters: PACL                  pAcl                  address of access-control list
- *             LPVOID                pAclInformation       address of ACL information
- *             DWORD                 nAclInformationLength size of ACL information
- *             ACL_INFORMATION_CLASS dwAclInformationClass class of requested information
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define ACL_INFORMATION_CLASS DWORD
-BOOL WIN32API GetAclInformation(PACL                  pAcl,
-                                   LPVOID                pAclInformation,
-                                   DWORD                 nAclInformationLength,
-                                   ACL_INFORMATION_CLASS dwAclInformationClass)
-{
-  dprintf(("ADVAPI32: GetAclInformation(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           pAcl,
-           pAclInformation,
-           nAclInformationLength,
-           dwAclInformationClass));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetKernelObjectSecurity
- * Purpose   : The GetKernelObjectSecurity function retrieves a copy of the
- *             security descriptor protecting a kernel object.
- * Parameters: HANDLE                Handle                handle of object to query
- *             SECURITY_INFORMATION  RequestedInformation  requested information
- *             PSECURITY_DESCRIPTOR  pSecurityDescriptor   address of security descriptor
- *             DWORD                 nLength               size of buffer for security descriptor
- *             LPDWORD               lpnLengthNeeded      address of required size of buffer
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetKernelObjectSecurity(HANDLE               Handle,
-                                         SECURITY_INFORMATION RequestedInformation,
-                                         PSECURITY_DESCRIPTOR pSecurityDescriptor,
-                                         DWORD                nLength,
-                                         LPDWORD              lpnLengthNeeded)
-{
-  dprintf(("ADVAPI32: GetKernelObjectSecurity(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           Handle,
-           RequestedInformation,
-           pSecurityDescriptor,
-           nLength,
-           lpnLengthNeeded));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetLengthSid
- * Purpose   : The GetLengthSid function returns the length, in bytes, of a
- *             valid SID structure. A SID is a security identifier.
- * Parameters: PSID  pSid  address of SID to query
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-DWORD WIN32API GetLengthSid(PSID pSid)
-{
-  dprintf(("ADVAPI32: GetLengthSid(%08xh) not correctly implemented.\n",
-           pSid));
-
-  return (lstrlenA( (LPCSTR)pSid)); /* @@@PH might not work */
-}
-
-
-/*****************************************************************************
- * Name      : GetNumberOfEventLogRecords
- * Purpose   : The GetNumberOfEventLogRecords function retrieves the number of
- *             records in the specified event log.
- * Parameters: HANDLE  hEventLog        handle to event log
- *             LPDWORD  NumberOfRecords  buffer for number of records
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetNumberOfEventLogRecords(HANDLE hEventLog,
-                                            LPDWORD NumberOfRecords)
-{
-  dprintf(("ADVAPI32: GetNumberOfEventLogRecords(%08xh,%08xh) not implemented.\n",
-           hEventLog,
-           NumberOfRecords));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetOldestEventLogRecord
- * Purpose   : The GetOldestEventLogRecord function retrieves the absolute
- *             record number of the oldest record in the specified event log.
- * Parameters: HANDLE  hEventLog     handle to event log
- *             LPDWORD  OldestRecord  buffer for number of oldest record
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetOldestEventLogRecord(HANDLE hEventLog,
-                                         LPDWORD OldestRecord)
-{
-  dprintf(("ADVAPI32: GetOldestEventLogRecord(%08xh,%08xh) not implemented.\n",
-           hEventLog,
-           OldestRecord));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetPrivateObjectSecurity
- * Purpose   : The GetPrivateObjectSecurity retrieves information from a
- *             protected server object's security descriptor.
- * Parameters: PSECURITY_DESCRIPTOR ObjectDescriptor    address of SD to query
- *             SECURITY_INFORMATION SecurityInformation requested information
- *             PSECURITY_DESCRIPTOR ResultantDescriptor address of retrieved SD
- *             DWORD                DescriptorLength    size of buffer for retrieved SD
- *             LPDWORD               ReturnLength        address of buffer size required for SD
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetPrivateObjectSecurity(PSECURITY_DESCRIPTOR ObjectDescriptor,
-                                          SECURITY_INFORMATION SecurityInformation,
-                                          PSECURITY_DESCRIPTOR ResultantDescriptor,
-                                          DWORD                DescriptorLength,
-                                          LPDWORD               ReturnLength)
-{
-  dprintf(("ADVAPI32: GetPrivateObjectSecurity(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           ObjectDescriptor,
-           SecurityInformation,
-           ResultantDescriptor,
-           DescriptorLength,
-           ReturnLength));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetSecurityDescriptorControl
- * Purpose   : The GetSecurityDescriptorControl function retrieves a security
- *             descriptor's control and revision information.
- * Parameters: PSECURITY_DESCRIPTOR         pSecurityDescriptor address of security descriptor
- *             PSECURITY_DESCRIPTOR_CONTROL pControl            address of  control structure
- *             LPDWORD                      lpdwRevision        address of revision value
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define PSECURITY_DESCRIPTOR_CONTROL LPVOID
-BOOL WIN32API GetSecurityDescriptorControl(PSECURITY_DESCRIPTOR         pSecurityDescriptor,
-                                              PSECURITY_DESCRIPTOR_CONTROL pControl,
-                                              LPDWORD                      lpdwRevision)
-{
-  dprintf(("ADVAPI32: GetSecurityDescriptorControl(%08xh,%08xh,%08xh) not implemented.\n",
-           pSecurityDescriptor,
-           pControl,
-           lpdwRevision));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetSecurityDescriptorDacl
- * Purpose   : The GetSecurityDescriptorDacl function retrieves a pointer to the
- *             discretionary access-control list (ACL) in a specified security descriptor.
- * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor
- *             LPBOOL               lpbDaclPresent      address of flag for presence of disc. ACL
- *             PACL                 *pDacl              address of pointer to ACL
- *             LPBOOL               lpbDaclDefaulted    address of flag for default disc. ACL
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,
-                                           LPBOOL               lpbDaclPresent,
-                                           PACL                 *pDacl,
-                                           LPBOOL               lpbDaclDefaulted)
-{
-  dprintf(("ADVAPI32: GetSecurityDescriptorDacl(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           pSecurityDescriptor,
-           lpbDaclPresent,
-           pDacl,
-           lpbDaclDefaulted));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetSecurityDescriptorGroup
- * Purpose   : The GetSecurityDescriptorGroup function retrieves the primary
- *             group information from a security descriptor.
- * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor  address of security descriptor
- *             PSID                 *pGroup              address of pointer to group security identifier (SID)
- *             LPBOOL               lpbGroupDefaulted    address of flag for default
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR  pSecurityDescriptor,
-                                            PSID                  *pGroup,
-                                            LPBOOL                lpbGroupDefaulted)
-{
-  dprintf(("ADVAPI32: GetSecurityDescriptorGroup(%08xh,%08xh,%08xh) not implemented.\n",
-           pSecurityDescriptor,
-           pGroup,
-           lpbGroupDefaulted));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetSecurityDescriptorLength
- * Purpose   : The GetSecurityDescriptorLength function returns the length, in
- *             bytes, of a structurally valid SECURITY_DESCRIPTOR structure. The
- *             length includes the length of all associated structures, such as
- *             SID and ACL structures.
- * Parameters: PSECURITY_DESCRIPTOR  pSecurityDescriptor address of security descriptor
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define SECURITY_DESCRIPTOR DWORD
-DWORD WIN32API GetSecurityDescriptorLength(PSECURITY_DESCRIPTOR pSecurityDescriptor)
-{
-  dprintf(("ADVAPI32: GetSecurityDescriptorLength(%08xh) not correctly implemented.\n",
-           pSecurityDescriptor));
-
-  return ( sizeof(SECURITY_DESCRIPTOR) );
-}
-
-
-/*****************************************************************************
- * Name      : GetSecurityDescriptorOwner
- * Purpose   : The GetSecurityDescriptorOwner function retrieves the owner
- *             information from a security descriptor.
- * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor
- *             PSID                 *pOwner             address of pointer to owner security identifier (SID)
- *             LPBOOL               lpbOwnerDefaulted   address of flag for default
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR pSecurityDescriptor,
-                                            PSID                 *pOwner,
-                                            LPBOOL               lpbOwnerDefaulted)
-{
-  dprintf(("ADVAPI32: GetSecurityDescriptorOwner(%08xh,%08xh,%08xh) not implemented.\n",
-           pSecurityDescriptor,
-           pOwner,
-           lpbOwnerDefaulted));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetSecurityDescriptorSacl
- * Purpose   : The GetSecurityDescriptorSacl function retrieves a pointer to
- *             the system access-control list (ACL) in a specified security descriptor.
- * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor
- *             LPBOOL               lpbSaclPresent      address of flag for presence of system ACL
- *             PACL                 *pSacl              address of pointer to ACL
- *             LPBOOL               lpbSaclDefaulted    address of flag for default system ACL
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR pSecurityDescriptor,
-                                           LPBOOL               lpbSaclPresent,
-                                           PACL                 *pSacl,
-                                           LPBOOL               lpbSaclDefaulted)
-{
-  dprintf(("ADVAPI32: GetSecurityDescriptorSacl(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           pSecurityDescriptor,
-           lpbSaclPresent,
-           pSacl,
-           lpbSaclDefaulted));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetServiceDisplayNameA
- * Purpose   : The GetServiceDisplayName function obtains the display name that
- *             is associated with a particular service name. The service name
- *             is the same as the service's registry key name.
- * Parameters: SC_HANDLE hSCManager     handle to a service control manager database
- *             LPCSTR   lpServiceName  the service name
- *             LPTSTR    lpDisplayName  buffer to receive the service's display name
- *             LPDWORD   lpcchBuffer    size of display name buffer and display name
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetServiceDisplayNameA(SC_HANDLE hSCManager,
-                                        LPCSTR   lpServiceName,
-                                        LPTSTR    lpDisplayName,
-                                        LPDWORD   lpcchBuffer)
-{
-  dprintf(("ADVAPI32: GetServiceDisplayNameA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hSCManager,
-           lpServiceName,
-           lpDisplayName,
-           lpcchBuffer));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetServiceDisplayNameW
- * Purpose   : The GetServiceDisplayName function obtains the display name that
- *             is associated with a particular service name. The service name
- *             is the same as the service's registry key name.
- * Parameters: SC_HANDLE hSCManager     handle to a service control manager database
- *             LPCWSTR   lpServiceName  the service name
- *             LPWSTR    lpDisplayName  buffer to receive the service's display name
- *             LPDWORD   lpcchBuffer    size of display name buffer and display name
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetServiceDisplayNameW(SC_HANDLE hSCManager,
-                                        LPCWSTR   lpServiceName,
-                                        LPWSTR    lpDisplayName,
-                                        LPDWORD   lpcchBuffer)
-{
-  dprintf(("ADVAPI32: GetServiceDisplayNameW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hSCManager,
-           lpServiceName,
-           lpDisplayName,
-           lpcchBuffer));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetServiceKeyNameA
- * Purpose   : The GetServiceKeyName function obtains the service name that is
- *             associated with a particular service's display name. The service
- *             name is the same as the service's registry key name.
- * Parameters: SC_HANDLE hSCManager     handle to a service control manager database
- *             LPCSTR   lpDisplayName  the service's display name
- *             LPTSTR    lpServiceName  buffer to receive the service name
- *             LPDWORD   lpcchBuffer    size of service name buffer and service name
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetServiceKeyNameA(SC_HANDLE hSCManager,
-                                    LPCSTR   lpDisplayName,
-                                    LPTSTR    lpServiceName,
-                                    LPDWORD   lpcchBuffer)
-{
-  dprintf(("ADVAPI32: GetServiceKeyNameA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hSCManager,
-           lpDisplayName,
-           lpServiceName,
-           lpcchBuffer));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetServiceKeyNameW
- * Purpose   : The GetServiceKeyName function obtains the service name that is
- *             associated with a particular service's display name. The service
- *             name is the same as the service's registry key name.
- * Parameters: SC_HANDLE hSCManager     handle to a service control manager database
- *             LPCWSTR   lpDisplayName  the service's display name
- *             LPWSTR    lpServiceName  buffer to receive the service name
- *             LPDWORD   lpcchBuffer    size of service name buffer and service name
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API GetServiceKeyNameW(SC_HANDLE hSCManager,
-                                    LPCWSTR   lpDisplayName,
-                                    LPWSTR    lpServiceName,
-                                    LPDWORD   lpcchBuffer)
-{
-  dprintf(("ADVAPI32: GetServiceKeyNameW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hSCManager,
-           lpDisplayName,
-           lpServiceName,
-           lpcchBuffer));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetSidIdentifierAuthority
- * Purpose   : The GetSidIdentifierAuthority function returns the address of
- *             the SID_IDENTIFIER_AUTHORITY structure in a specified security identifier (SID).
- * Parameters: PSID  pSid   address of SID to query
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-PSID_IDENTIFIER_AUTHORITY WIN32API GetSidIdentifierAuthority(PSID pSid)
-{
-  dprintf(("ADVAPI32: GetSidIdentifierAuthority(%08xh) not implemented.\n",
-           pSid));
-
-  return (NULL); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetSidLengthRequired
- * Purpose   : The GetSidLengthRequired function returns the length, in bytes,
- *             of the buffer required to store a SID structure with a specified
- *             number of subauthorities.
- * Parameters: UCHAR  nSubAuthorityCount  count of subauthorities
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define SID DWORD
-DWORD WIN32API GetSidLengthRequired(UCHAR nSubAuthorityCount)
-{
-  dprintf(("ADVAPI32: GetSidLengthRequired(%u) not correctly implemented.\n",
-           nSubAuthorityCount));
-
-  return ( sizeof(SID) );
-}
-
-
-/*****************************************************************************
- * Name      : GetSidSubAuthority
- * Purpose   : The GetSidSubAuthority function returns the address of a
- *             specified subauthority in a SID structure. The subauthority
- *             value is a relative identifier (RID). A SID is a security identifier.
- * Parameters: PSID  pSid          address of security identifier to query
- *             DWORD nSubAuthority index of subauthority to retrieve
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LPDWORD WIN32API GetSidSubAuthority(PSID  pSid,
-                                      DWORD nSubAuthority)
-{
-  dprintf(("ADVAPI32: GetSidSubAuthority(%08xh,%08xh) not implemented.\n",
-           pSid,
-           nSubAuthority));
-
-  return ( (LPDWORD)pSid ); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : GetSidSubAuthorityCount
- * Purpose   : The GetSidSubAuthorityCount function returns the address of the
- *             field in a SID structure containing the subauthority count. A
- *             SID is a security identifier.
- * Parameters: PSID  pSid  address of security identifier to query
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-PUCHAR  WIN32API GetSidSubAuthorityCount(PSID pSid)
-{
-  static UCHAR ucSubAuthorityCount = 1;
-
-  dprintf(("ADVAPI32: GetSidSubAuthorityCount(%08xh) not implemented.\n",
-           pSid));
-
-  return (&ucSubAuthorityCount);
-}
-
-
-/*****************************************************************************
- * Name      : GetTokenInformation
- * Purpose   : The GetTokenInformation function retrieves a specified type of
- *             information about an access token. The calling process must have
- *             appropriate access rights to obtain the information.
- * Parameters: HANDLE                   TokenHandle             handle of access token
- *             TOKEN_INFORMATION_CLASS  TokenInformationClass   type of information to retrieve
- *             LPVOID                   TokenInformation        address of retrieved information
- *             DWORD                    TokenInformationLength  size of information buffer
- *             LPDWORD                   ReturnLength            address of required buffer size
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define TOKEN_INFORMATION_CLASS DWORD
-BOOL WIN32API GetTokenInformation(HANDLE                  TokenHandle,
-                                     TOKEN_INFORMATION_CLASS TokenInformationClass,
-                                     LPVOID                  TokenInformation,
-                                     DWORD                   TokenInformationLength,
-                                     LPDWORD                  ReturnLength)
-{
-  dprintf(("ADVAPI32: GetTokenInformation(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           TokenHandle,
-           TokenInformationClass,
-           TokenInformation,
-           TokenInformationLength,
-           ReturnLength));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ImpersonateLoggedOnUser
- * Purpose   : The ImpersonateLoggedOnUser function lets the calling thread
- *             impersonate a user. The user is represented by a token handle
- *             obtained by calling the LogonUser function
- * Parameters: HANDLE hToken
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ImpersonateLoggedOnUser(HANDLE hToken)
-{
-  dprintf(("ADVAPI32: ImpersonateLoggedOnUser(%08xh) not implemented.\n",
-           hToken));
-
-  return (TRUE); /* signal OK */
-}
-
-
-/*****************************************************************************
- * Name      : ImpersonateNamedPipeClient
- * Purpose   : The ImpersonateNamedPipeClient function impersonates a named-pipe
- *             client application.
- * Parameters: HANDLE  hNamedPipe  handle of a named pipe
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ImpersonateNamedPipeClient(HANDLE hNamedPipe)
-{
-  dprintf(("ADVAPI32: ImpersonateNamedPipeClient(%08xh) not implemented.\n",
-           hNamedPipe));
-
-  return (TRUE); /* signal OK */
-}
-
-
-/*****************************************************************************
- * Name      : ImpersonateSelf
- * Purpose   : The ImpersonateSelf function obtains an access token that
- *             impersonates the security context of the calling process. The
- *             token is assigned to the calling thread.
- * Parameters: SECURITY_IMPERSONATION_LEVEL  ImpersonationLevel  impersonation level
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
-{
-  dprintf(("ADVAPI32: ImpersonateSelf(%08xh) not implemented.\n",
-           ImpersonationLevel));
-
-  return (TRUE); /* signal OK */
-}
-
-
-/*****************************************************************************
- * Name      : InitializeAcl
- * Purpose   : The InitializeAcl function creates a new ACL structure.
- *             An ACL is an access-control list.
- * Parameters: PACL  pAcl          address of access-control list
- *             DWORD nAclLength    size of access-control list
- *             DWORD dwAclRevision revision level of access-control list
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API InitializeAcl(PACL  pAcl,
-                               DWORD nAclLength,
-                               DWORD dwAclRevision)
-{
-  dprintf(("ADVAPI32: InitializeAcl(%08xh,%08xh,%08xh) not implemented.\n",
-           pAcl,
-           nAclLength,
-           dwAclRevision));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : InitializeSid
- * Purpose   : The InitializeSid function initializes a SID structure. An SID
- *             is a security identifier.
- * Parameters: PSID                      pSid                 address of SID to initialize
- *             PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority address of identifier authority
- *             BYTE                      nSubAuthorityCount   count of subauthorities
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API InitializeSid(PSID                      pSid,
-                               PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
-                               BYTE                      nSubAuthorityCount)
-{
-  dprintf(("ADVAPI32: InitializeSid(%08xh,%08xh,%08xh) not implemented.\n",
-           pSid,
-           pIdentifierAuthority,
-           nSubAuthorityCount));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : InitiateSystemShutdownA
- * Purpose   : The InitiateSystemShutdown function initiates a shutdown and
- *             optional restart of the specified computer.
- * Parameters: LPTSTR lpMachineName        address of name of computer to shut down
- *             LPTSTR lpMessage            address of message to display in dialog box
- *             DWORD  dwTimeout            time to display dialog box
- *             BOOL   bForceAppsClosed     force applications with unsaved changes flag
- *             BOOL   bRebootAfterShutdown reboot flag
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API InitiateSystemShutdownA(LPTSTR lpMachineName,
-                                         LPTSTR lpMessage,
-                                         DWORD  dwTimeout,
-                                         BOOL   bForceAppsClosed,
-                                         BOOL   bRebootAfterShutdown)
-{
-  dprintf(("ADVAPI32: InitiateSystemShutdownA(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           lpMachineName,
-           lpMessage,
-           dwTimeout,
-           bForceAppsClosed,
-           bRebootAfterShutdown));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : InitiateSystemShutdownW
- * Purpose   : The InitiateSystemShutdown function initiates a shutdown and
- *             optional restart of the specified computer.
- * Parameters: LPWSTR lpMachineName        address of name of computer to shut down
- *             LPWSTR lpMessage            address of message to display in dialog box
- *             DWORD  dwTimeout            time to display dialog box
- *             BOOL   bForceAppsClosed     force applications with unsaved changes flag
- *             BOOL   bRebootAfterShutdown reboot flag
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API InitiateSystemShutdownW(LPWSTR lpMachineName,
-                                         LPWSTR lpMessage,
-                                         DWORD  dwTimeout,
-                                         BOOL   bForceAppsClosed,
-                                         BOOL   bRebootAfterShutdown)
-{
-  dprintf(("ADVAPI32: InitiateSystemShutdownW(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           lpMachineName,
-           lpMessage,
-           dwTimeout,
-           bForceAppsClosed,
-           bRebootAfterShutdown));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : IsTextUnicode
- * Purpose   : The IsTextUnicode function determines whether a buffer probably
- *             contains a form of Unicode text. The function uses various
- *             statistical and deterministic methods to make its determination,
- *             under the control of flags passed via lpi. When the function
- *             returns, the results of such tests are reported via lpi. If all
- *             specified tests are passed, the function returns TRUE; otherwise,
- *             it returns FALSE.
- * Parameters: CONST LPVOID lpBuffer pointer to an input buffer to be examined
- *             int          cb       the size in bytes of the input buffer
- *             LPINT        lpi      pointer to flags that condition text examination and receive results
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-DWORD WIN32API IsTextUnicode(CONST LPVOID  lpBuffer,
-                                int           cb,
-                                LPINT         lpi)
-{
-  DWORD dwResult = 0;
-
-  dprintf(("ADVAPI32: IsTextUnicode(%08xh,%08xh,%08xh) not implemented.\n",
-           lpBuffer,
-           cb,
-           lpi));
-
-  if (cb & 0x0001) dwResult |= IS_TEXT_UNICODE_ODD_LENGTH;
-
-  return (dwResult); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : IsValidAcl
- * Purpose   : The IsValidAcl function validates an access-control list (ACL).
- * Parameters: PACL  pAcl  address of access-control list
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API IsValidAcl(PACL pAcl)
-{
-  dprintf(("ADVAPI32: IsValidAcl(%08xh) not implemented.\n",
-           pAcl));
-
-  return (TRUE); /* signal OK */
-}
-
-
-/*****************************************************************************
- * Name      : IsValidSecurityDescriptor
- * Purpose   : The IsValidSecurityDescriptor function validates a
- *             SECURITY_DESCRIPTOR structure. Validation is performed by
- *             checking the revision level of each component in the security descriptor.
- * Parameters: PSECURITY_DESCRIPTOR pSecurityDescriptor
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor)
-{
-  dprintf(("ADVAPI32: IsValidSecurityDescriptor(%08xh) not implemented.\n",
-           pSecurityDescriptor));
-
-  return (TRUE); /* signal OK */
-}
-
-
-/*****************************************************************************
- * Name      : IsValidSid
- * Purpose   : The IsValidSid function validates a SID structure by verifying
- *             that the revision number is within a known range and that the
- *             number of subauthorities is less than the maximum. A SID is a
- *             security identifier.
- * Parameters: PSID pSid  address of SID to query
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API IsValidSid(PSID pSid)
-{
-  dprintf(("ADVAPI32: IsValidSid(%08xh) not implemented.\n",
-           pSid));
-
-  return (TRUE); /* signal OK */
-}
-
-
-/*****************************************************************************
- * Name      : LockServiceDatabase
- * Purpose   : The LockServiceDatabase function locks a specified database.
- * Parameters: SC_HANDLE  hSCManager  handle of service control manager database
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define SC_LOCK DWORD
-SC_LOCK WIN32API LockServiceDatabase(SC_HANDLE hSCManager)
-{
-  dprintf(("ADVAPI32: LockServiceDatabase(%08xh) not implemented.\n",
-           hSCManager));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : LogonUserA
- * Purpose   : The LogonUser function attempts to perform a user logon
- *             operation. You specify the user with a user name and domain,
- *             and authenticate the user with a clear-text password. If the
- *             function succeeds, you receive a handle to a token that
- *             represents the logged-on user. You can then use this token
- *             handle to impersonate the specified user, or to create a process
- *             running in the context of the specified user.
- * Parameters: LPTSTR  lpszUsername    string that specifies the user name
- *             LPTSTR  lpszDomain      string that specifies the domain or servero
- *             LPTSTR  lpszPassword    string that specifies the password
- *             DWORD   dwLogonType     specifies the type of logon operation
- *             DWORD   dwLogonProvider specifies the logon provider
- *             PHANDLE phToken         pointer to variable to receive token handle
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API LogonUserA(LPTSTR  lpszUsername,
-                            LPTSTR  lpszDomain,
-                            LPTSTR  lpszPassword,
-                            DWORD   dwLogonType,
-                            DWORD   dwLogonProvider,
-                            PHANDLE phToken)
-{
-  dprintf(("ADVAPI32: LogonUserA(%s,%s,%s,%08xh,%08xh,%08xh) not implemented.\n",
-           lpszUsername,
-           lpszDomain,
-           lpszPassword,
-           dwLogonType,
-           dwLogonProvider,
-           phToken));
-
-  return (TRUE); /* signal OK */
-}
-
-
-/*****************************************************************************
- * Name      : LogonUserW
- * Purpose   : The LogonUser function attempts to perform a user logon
- *             operation. You specify the user with a user name and domain,
- *             and authenticate the user with a clear-text password. If the
- *             function succeeds, you receive a handle to a token that
- *             represents the logged-on user. You can then use this token
- *             handle to impersonate the specified user, or to create a process
- *             running in the context of the specified user.
- * Parameters: LPWSTR  lpszUsername    string that specifies the user name
- *             LPWSTR  lpszDomain      string that specifies the domain or servero
- *             LPWSTR  lpszPassword    string that specifies the password
- *             DWORD   dwLogonType     specifies the type of logon operation
- *             DWORD   dwLogonProvider specifies the logon provider
- *             PHANDLE phToken         pointer to variable to receive token handle
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API LogonUserW(LPWSTR  lpszUsername,
-                            LPWSTR  lpszDomain,
-                            LPWSTR  lpszPassword,
-                            DWORD   dwLogonType,
-                            DWORD   dwLogonProvider,
-                            PHANDLE phToken)
-{
-  dprintf(("ADVAPI32: LogonUserW(%s,%s,%s,%08xh,%08xh,%08xh) not implemented.\n",
-           lpszUsername,
-           lpszDomain,
-           lpszPassword,
-           dwLogonType,
-           dwLogonProvider,
-           phToken));
-
-  return (TRUE); /* signal OK */
-}
-
-
-/*****************************************************************************
- * Name      : LookupAccountNameA
- * Purpose   : The LookupAccountName function accepts the name of a system and
- *             an account as input. It retrieves a security identifier (SID)
- *             for the account and the name of the domain on which the account was found.
- * Parameters: LPCSTR       lpSystemName           address of string for system name
- *             LPCSTR       lpAccountName          address of string for account name
- *             PSID          Sid                    address of security identifier
- *             LPDWORD       cbSid                  address of size of security identifier
- *             LPTSTR        ReferencedDomainName   address of string for referenced domain
- *             LPDWORD       cbReferencedDomainName address of size of domain string
- *             PSID_NAME_USE peUse                  address of SID-type indicator
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define PSID_NAME_USE LPVOID
-BOOL WIN32API LookupAccountNameA(LPCSTR       lpSystemName,
-                                    LPCSTR       lpAccountName,
-                                    PSID          Sid,
-                                    LPDWORD       cbSid,
-                                    LPTSTR        ReferencedDomainName,
-                                    LPDWORD       cbReferencedDomainName,
-                                    PSID_NAME_USE peUse)
-{
-  dprintf(("ADVAPI32: LookupAccountNameA(%s,%s,%08xh,%08xh,%s,%08xh,%08xh) not implemented.\n",
-           lpSystemName,
-           lpAccountName,
-           Sid,
-           cbSid,
-           ReferencedDomainName,
-           cbReferencedDomainName,
-           peUse));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : LookupAccountNameW
- * Purpose   : The LookupAccountName function accepts the name of a system and
- *             an account as input. It retrieves a security identifier (SID)
- *             for the account and the name of the domain on which the account was found.
- * Parameters: LPCWSTR       lpSystemName           address of string for system name
- *             LPCWSTR       lpAccountName          address of string for account name
- *             PSID          Sid                    address of security identifier
- *             LPDWORD       cbSid                  address of size of security identifier
- *             LPWSTR        ReferencedDomainName   address of string for referenced domain
- *             LPDWORD       cbReferencedDomainName address of size of domain string
- *             PSID_NAME_USE peUse                  address of SID-type indicator
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API LookupAccountNameW(LPCWSTR       lpSystemName,
-                                    LPCWSTR       lpAccountName,
-                                    PSID          Sid,
-                                    LPDWORD       cbSid,
-                                    LPWSTR        ReferencedDomainName,
-                                    LPDWORD       cbReferencedDomainName,
-                                    PSID_NAME_USE peUse)
-{
-  dprintf(("ADVAPI32: LookupAccountNameW(%s,%s,%08xh,%08xh,%s,%08xh,%08xh) not implemented.\n",
-           lpSystemName,
-           lpAccountName,
-           Sid,
-           cbSid,
-           ReferencedDomainName,
-           cbReferencedDomainName,
-           peUse));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : LookupAccountSidA
- * Purpose   : The LookupAccountSid function accepts a security identifier (SID)
- *             as input. It retrieves the name of the account for this SID and
- *             the name of the first domain on which this SID is found.
- * Parameters: LPCSTR       lpSystemName           address of string for system name
- *             PSID          Sid                    address of security identifier
- *             LPTSTR        Name                   address of string for account name
- *             LPDWORD       cbName                 address of size account string
- *             LPTSTR        ReferencedDomainName   address of string for referenced domain
- *             LPDWORD       cbReferencedDomainName address of size domain string
- *             PSID_NAME_USE peUse                  address of structure for SID type
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API LookupAccountSidA(LPCSTR        lpSystemName,
-                                   PSID           Sid,
-                                   LPTSTR         Name,
-                                   LPDWORD        cbName,
-                                   LPTSTR         ReferencedDomainName,
-                                   LPDWORD        cbReferencedDomainName,
-                                   PSID_NAME_USE  peUse)
-{
-  dprintf(("ADVAPI32: LookupAccountSidA(%s,%08xh,%s,%08xh,%s,%08xh,%08xh) not implemented.\n",
-           lpSystemName,
-           Sid,
-           Name,
-           cbName,
-           ReferencedDomainName,
-           cbReferencedDomainName,
-           peUse));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : LookupAccountSidW
- * Purpose   : The LookupAccountSid function accepts a security identifier (SID)
- *             as input. It retrieves the name of the account for this SID and
- *             the name of the first domain on which this SID is found.
- * Parameters: LPCWSTR       lpSystemName           address of string for system name
- *             PSID          Sid                    address of security identifier
- *             LPWSTR        Name                   address of string for account name
- *             LPDWORD       cbName                 address of size account string
- *             LPWSTR        ReferencedDomainName   address of string for referenced domain
- *             LPDWORD       cbReferencedDomainName address of size domain string
- *             PSID_NAME_USE peUse                  address of structure for SID type
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API LookupAccountSidW(LPCWSTR        lpSystemName,
-                                   PSID           Sid,
-                                   LPWSTR         Name,
-                                   LPDWORD        cbName,
-                                   LPWSTR         ReferencedDomainName,
-                                   LPDWORD        cbReferencedDomainName,
-                                   PSID_NAME_USE  peUse)
-{
-  dprintf(("ADVAPI32: LookupAccountSidW(%s,%08xh,%s,%08xh,%s,%08xh,%08xh) not implemented.\n",
-           lpSystemName,
-           Sid,
-           Name,
-           cbName,
-           ReferencedDomainName,
-           cbReferencedDomainName,
-           peUse));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : LookupPrivilegeDisplayNameA
- * Purpose   : The LookupPrivilegeDisplayName function retrieves a displayable
- *             name representing a specified privilege.
- * Parameters: LPCSTR lpSystemName   address of string specifying the system
- *             LPCSTR lpName         address of string specifying the privilege
- *             LPTSTR  lpDisplayName  address of string receiving the displayable name
- *             LPDWORD cbDisplayName  address of size of string for displayable name
- *             LPDWORD lpLanguageId   address of language identifier
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API LookupPrivilegeDisplayNameA(LPCSTR lpSystemName,
-                                             LPCSTR lpName,
-                                             LPTSTR  lpDisplayName,
-                                             LPDWORD cbDisplayName,
-                                             LPDWORD lpLanguageId)
-{
-  dprintf(("ADVAPI32: LookupPrivilegeDisplayNameA(%s,%s,%s,%08xh,%08xh) not implemented.\n",
-           lpSystemName,
-           lpName,
-           lpDisplayName,
-           cbDisplayName,
-           lpLanguageId));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : LookupPrivilegeDisplayNameW
- * Purpose   : The LookupPrivilegeDisplayName function retrieves a displayable
- *             name representing a specified privilege.
- * Parameters: LPCWSTR lpSystemName   address of string specifying the system
- *             LPCWSTR lpName         address of string specifying the privilege
- *             LPWSTR  lpDisplayName  address of string receiving the displayable name
- *             LPDWORD cbDisplayName  address of size of string for displayable name
- *             LPDWORD lpLanguageId   address of language identifier
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API LookupPrivilegeDisplayNameW(LPCWSTR lpSystemName,
-                                             LPCWSTR lpName,
-                                             LPWSTR  lpDisplayName,
-                                             LPDWORD cbDisplayName,
-                                             LPDWORD lpLanguageId)
-{
-  dprintf(("ADVAPI32: LookupPrivilegeDisplayNameW(%s,%s,%s,%08xh,%08xh) not implemented.\n",
-           lpSystemName,
-           lpName,
-           lpDisplayName,
-           cbDisplayName,
-           lpLanguageId));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : LookupPrivilegeNameA
- * Purpose   : The LookupPrivilegeName function retrieves the name corresponding
- *             to the privilege represented on a specific system by a specified
- *             locally unique identifier (LUID).
- * Parameters: LPCSTR lpSystemName address of string specifying the system
- *             PLUID   lpLuid       address of locally unique identifier
- *             LPTSTR  lpName       address of string specifying the privilege
- *             LPDWORD cbName       address of size of string for displayable name
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API LookupPrivilegeNameA(LPCSTR lpSystemName,
-                                      PLUID   lpLuid,
-                                      LPTSTR  lpName,
-                                      LPDWORD cbName)
-{
-  dprintf(("ADVAPI32: LookupPrivilegeNameA(%s,%08xh,%s,%08xh) not implemented.\n",
-           lpSystemName,
-           lpLuid,
-           lpName,
-           cbName));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : LookupPrivilegeNameW
- * Purpose   : The LookupPrivilegeName function retrieves the name corresponding
- *             to the privilege represented on a specific system by a specified
- *             locally unique identifier (LUID).
- * Parameters: LPCWSTR lpSystemName address of string specifying the system
- *             PLUID   lpLuid       address of locally unique identifier
- *             LPWSTR  lpName       address of string specifying the privilege
- *             LPDWORD cbName       address of size of string for displayable name
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API LookupPrivilegeNameW(LPCWSTR lpSystemName,
-                                      PLUID   lpLuid,
-                                      LPWSTR  lpName,
-                                      LPDWORD cbName)
-{
-  dprintf(("ADVAPI32: LookupPrivilegeNameW(%s,%08xh,%s,%08xh) not implemented.\n",
-           lpSystemName,
-           lpLuid,
-           lpName,
-           cbName));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : MakeAbsoluteSD
- * Purpose   : The MakeAbsoluteSD function creates a security descriptor in
- *             absolute format by using a security descriptor in self-relative
- *             format as a template.
- * Parameters: PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor    address self-relative SD
- *             PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor        address of absolute SD
- *             LPDWORD              lpdwAbsoluteSecurityDescriptorSize address of size of absolute SD
- *             PACL                 pDacl                              address of discretionary ACL
- *             LPDWORD              lpdwDaclSize                       address of size of discretionary ACL
- *             PACL                 pSacl                              address of system ACL
- *             LPDWORD              lpdwSaclSize                       address of size of system ACL
- *             PSID                 pOwner                             address of owner SID
- *             LPDWORD              lpdwOwnerSize                      address of size of owner SID
- *             PSID                 pPrimaryGroup                      address of primary-group SID
- *             LPDWORD              lpdwPrimaryGroupSize               address of size of group SID
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API MakeAbsoluteSD(PSECURITY_DESCRIPTOR  pSelfRelativeSecurityDescriptor,
-                                PSECURITY_DESCRIPTOR  pAbsoluteSecurityDescriptor,
-                                LPDWORD               lpdwAbsoluteSecurityDescriptorSize,
-                                PACL                  pDacl,
-                                LPDWORD               lpdwDaclSize,
-                                PACL                  pSacl,
-                                LPDWORD               lpdwSaclSize,
-                                PSID                  pOwner,
-                                LPDWORD               lpdwOwnerSize,
-                                PSID                  pPrimaryGroup,
-                                LPDWORD               lpdwPrimaryGroupSize)
-{
-  dprintf(("ADVAPI32: MakeAbsoluteSD(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           pSelfRelativeSecurityDescriptor,
-           pAbsoluteSecurityDescriptor,
-           lpdwAbsoluteSecurityDescriptorSize,
-           pDacl,
-           lpdwDaclSize,
-           pSacl,
-           lpdwSaclSize,
-           pOwner,
-           lpdwOwnerSize,
-           pPrimaryGroup,
-           lpdwPrimaryGroupSize));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : MakeSelfRelativeSD
- * Purpose   : The MakeSelfRelativeSD function creates a security descriptor
- *             in self-relative format by using a security descriptor in absolute
- *             format as a template.
- * Parameters: PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor     address of absolute SD
- *             PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor address self-relative SD
- *             LPDWORD              lpdwBufferLength                address of SD size
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API MakeSelfRelativeSD(PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
-                                    PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
-                                    LPDWORD              lpdwBufferLength)
-{
-  dprintf(("ADVAPI32: MakeSelfRelativeSD(%08xh,%08xh,%08xh) not implemented.\n",
-           pAbsoluteSecurityDescriptor,
-           pSelfRelativeSecurityDescriptor,
-           lpdwBufferLength));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : MapGenericMask
- * Purpose   : The MapGenericMask function maps the generic access rights in
- *             an access mask to specific and standard access rights. The function
- *             applies a mapping supplied in a GENERIC_MAPPING structure.
- * Parameters: LPDWORD            AccessMask     address of access mask
- *             PGENERIC_MAPPING  GenericMapping address of GENERIC_MAPPING structure
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-VOID WIN32API MapGenericMask(LPDWORD           AccessMask,
-                                PGENERIC_MAPPING GenericMapping)
-{
-  dprintf(("ADVAPI32: MapGenericMask(%08xh,%08xh) not implemented.\n",
-           AccessMask,
-           GenericMapping));
-}
-
-
-/*****************************************************************************
- * Name      : NotifyBootConfigStatus
- * Purpose   : The NotifyBootConfigStatus function notifies the service control
- *             manager as to the acceptability of the configuration that booted
- *             the system. An acceptable configuration triggers the storage of
- *             that configuration as the last-known good configuration; an
- *             unacceptable configuration triggers a system reboot.
- * Parameters: BOOL  BootAcceptable  indicates acceptability of boot configuration
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API NotifyBootConfigStatus(BOOL BootAcceptable)
-{
-  dprintf(("ADVAPI32: NotifyBootConfigStatus(%08xh) not implemented.\n",
-           BootAcceptable));
-
-  return (TRUE); /* signal OK */
-}
-
-
-/*****************************************************************************
- * Name      : NotifyChangeEventLog
- * Purpose   : The NotifyChangeEventLog function lets an application receive
- *             notification when an event is written to the event log file
- *             specified by hEventLog. When the event is written to the event
- *             log file, the function causes the event object specified by
- *             hEvent to become signaled.
- * Parameters: HANDLE  hEventLog  special default locale value to be converted
- *             HANDLE  hEvent     special default locale value to be converted
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API NotifyChangeEventLog(HANDLE  hEventLog,
-                                      HANDLE  hEvent)
-{
-  dprintf(("ADVAPI32: NotifyChangeEventLog(%08xh,%08xh) not implemented.\n",
-           hEventLog,
-           hEvent));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ObjectCloseAuditAlarmA
- * Purpose   : The ObjectCloseAuditAlarm function generates audit messages when
- *             a handle of an object is deleted. Alarms are not supported in the
- *             current version of Windows NT.
- * Parameters: LPCSTR SubsystemName   address of string for subsystem name
- *             LPVOID  HandleId        address of handle identifier
- *             BOOL    GenerateOnClose flag for audit generation
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ObjectCloseAuditAlarmA(LPCSTR SubsystemName,
-                                        LPVOID  HandleId,
-                                        BOOL    GenerateOnClose)
-{
-  dprintf(("ADVAPI32: ObjectCloseAuditAlarmA(%s,%08xh,%08xh) not implemented.\n",
-           SubsystemName,
-           HandleId,
-           GenerateOnClose));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ObjectCloseAuditAlarmW
- * Purpose   : The ObjectCloseAuditAlarm function generates audit messages when
- *             a handle of an object is deleted. Alarms are not supported in the
- *             current version of Windows NT.
- * Parameters: LPCWSTR SubsystemName   address of string for subsystem name
- *             LPVOID  HandleId        address of handle identifier
- *             BOOL    GenerateOnClose flag for audit generation
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ObjectCloseAuditAlarmW(LPCWSTR SubsystemName,
-                                        LPVOID  HandleId,
-                                        BOOL    GenerateOnClose)
-{
-  dprintf(("ADVAPI32: ObjectCloseAuditAlarmW(%s,%08xh,%08xh) not implemented.\n",
-           SubsystemName,
-           HandleId,
-           GenerateOnClose));
-
-  return (FALSE); /* signal failure */
-}
-
-
-
-/*****************************************************************************
- * Name      : ObjectOpenAuditAlarmA
- * Purpose   : The ObjectOpenAuditAlarm function generates audit messages when
- *             a client application attempts to gain access to an object or to
- *             create a new one. Alarms are not supported in the current version
- *             of Windows NT.
- * Parameters: LPCSTR              SubsystemName       address of string for subsystem name
- *             LPVOID               HandleId            address of handle identifier
- *             LPTSTR               ObjectTypeName      address of string for object type
- *             LPTSTR               ObjectName          address of string for object name
- *             PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor
- *             HANDLE               ClientToken         handle of client's access token
- *             DWORD                DesiredAccess       mask for desired access rights
- *             DWORD                GrantedAccess       mask for granted access rights
- *             PPRIVILEGE_SET       Privileges          address of privileges
- *             BOOL                 ObjectCreation      flag for object creation
- *             BOOL                 AccessGranted       flag for results
- *             LPBOOL               GenerateOnClose     address of flag for audit generation
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ObjectOpenAuditAlarmA(LPCSTR              SubsystemName,
-                                       LPVOID               HandleId,
-                                       LPTSTR               ObjectTypeName,
-                                       LPTSTR               ObjectName,
-                                       PSECURITY_DESCRIPTOR pSecurityDescriptor,
-                                       HANDLE               ClientToken,
-                                       DWORD                DesiredAccess,
-                                       DWORD                GrantedAccess,
-                                       PPRIVILEGE_SET       Privileges,
-                                       BOOL                 ObjectCreation,
-                                       BOOL                 AccessGranted,
-                                       LPBOOL               GenerateOnClose)
-{
-  dprintf(("ADVAPI32: ObjectOpenAuditAlarmA(%s,%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           SubsystemName,
-           HandleId,
-           ObjectTypeName,
-           ObjectName,
-           pSecurityDescriptor,
-           ClientToken,
-           DesiredAccess,
-           GrantedAccess,
-           Privileges,
-           ObjectCreation,
-           AccessGranted,
-           GenerateOnClose));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ObjectOpenAuditAlarmW
- * Purpose   : The ObjectOpenAuditAlarm function generates audit messages when
- *             a client application attempts to gain access to an object or to
- *             create a new one. Alarms are not supported in the current version
- *             of Windows NT.
- * Parameters: LPCWSTR              SubsystemName       address of string for subsystem name
- *             LPVOID               HandleId            address of handle identifier
- *             LPWSTR               ObjectTypeName      address of string for object type
- *             LPWSTR               ObjectName          address of string for object name
- *             PSECURITY_DESCRIPTOR pSecurityDescriptor address of security descriptor
- *             HANDLE               ClientToken         handle of client's access token
- *             DWORD                DesiredAccess       mask for desired access rights
- *             DWORD                GrantedAccess       mask for granted access rights
- *             PPRIVILEGE_SET       Privileges          address of privileges
- *             BOOL                 ObjectCreation      flag for object creation
- *             BOOL                 AccessGranted       flag for results
- *             LPBOOL               GenerateOnClose     address of flag for audit generation
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ObjectOpenAuditAlarmW(LPCWSTR              SubsystemName,
-                                       LPVOID               HandleId,
-                                       LPWSTR               ObjectTypeName,
-                                       LPWSTR               ObjectName,
-                                       PSECURITY_DESCRIPTOR pSecurityDescriptor,
-                                       HANDLE               ClientToken,
-                                       DWORD                DesiredAccess,
-                                       DWORD                GrantedAccess,
-                                       PPRIVILEGE_SET       Privileges,
-                                       BOOL                 ObjectCreation,
-                                       BOOL                 AccessGranted,
-                                       LPBOOL               GenerateOnClose)
-{
-  dprintf(("ADVAPI32: ObjectOpenAuditAlarmW(%s,%08xh,%s,%s,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           SubsystemName,
-           HandleId,
-           ObjectTypeName,
-           ObjectName,
-           pSecurityDescriptor,
-           ClientToken,
-           DesiredAccess,
-           GrantedAccess,
-           Privileges,
-           ObjectCreation,
-           AccessGranted,
-           GenerateOnClose));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ObjectPrivilegeAuditAlarmA
- * Purpose   : The ObjectPrivilegeAuditAlarm function generates audit messages
- *             as a result of a client's attempt to perform a privileged operation
- *             on a server application object using an already opened handle of
- *             that object. Alarms are not supported in the current version of Windows NT.
- * Parameters: LPCSTR        lpszSubsystem   address of string for subsystem name
- *             LPVOID         lpvHandleId     address of handle identifier
- *             HANDLE         hClientToken    handle of client's access token
- *             DWORD          dwDesiredAccess mask for desired access rights
- *             PPRIVILEGE_SET pps             address of privileges
- *             BOOL           fAccessGranted  flag for results
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ObjectPrivilegeAuditAlarmA(LPCSTR        lpszSubsystem,
-                                            LPVOID         lpvHandleId,
-                                            HANDLE         hClientToken,
-                                            DWORD          dwDesiredAccess,
-                                            PPRIVILEGE_SET pps,
-                                            BOOL           fAccessGranted)
-{
-  dprintf(("ADVAPI32: ObjectPrivilegeAuditAlarmA(%s,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           lpszSubsystem,
-           lpvHandleId,
-           hClientToken,
-           dwDesiredAccess,
-           pps,
-           fAccessGranted));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ObjectPrivilegeAuditAlarmW
- * Purpose   : The ObjectPrivilegeAuditAlarm function generates audit messages
- *             as a result of a client's attempt to perform a privileged operation
- *             on a server application object using an already opened handle of
- *             that object. Alarms are not supported in the current version of Windows NT.
- * Parameters: LPCWSTR        lpszSubsystem   address of string for subsystem name
- *             LPVOID         lpvHandleId     address of handle identifier
- *             HANDLE         hClientToken    handle of client's access token
- *             DWORD          dwDesiredAccess mask for desired access rights
- *             PPRIVILEGE_SET pps             address of privileges
- *             BOOL           fAccessGranted  flag for results
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ObjectPrivilegeAuditAlarmW(LPCWSTR        lpszSubsystem,
-                                            LPVOID         lpvHandleId,
-                                            HANDLE         hClientToken,
-                                            DWORD          dwDesiredAccess,
-                                            PPRIVILEGE_SET pps,
-                                            BOOL           fAccessGranted)
-{
-  dprintf(("ADVAPI32: ObjectPrivilegeAuditAlarmW(%s,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           lpszSubsystem,
-           lpvHandleId,
-           hClientToken,
-           dwDesiredAccess,
-           pps,
-           fAccessGranted));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : OpenBackupEventLogA
- * Purpose   : The OpenBackupEventLog function opens a handle of a backup event
- *             log. This handle can be used with the BackupEventLog function.
- * Parameters: LPCSTR  lpszUNCServerName  backup file server name
- *             LPCSTR  lpszFileName       backup filename
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-HANDLE WIN32API OpenBackupEventLogA(LPCSTR  lpszUNCServerName,
-                                       LPCSTR  lpszFileName)
-{
-  dprintf(("ADVAPI32: OpenBackupEventLogA(%s,%s) not implemented.\n",
-           lpszUNCServerName,
-           lpszFileName));
-
-  return (NULL); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : OpenBackupEventLogW
- * Purpose   : The OpenBackupEventLog function opens a handle of a backup event
- *             log. This handle can be used with the BackupEventLog function.
- * Parameters: LPCWSTR  lpszUNCServerName  backup file server name
- *             LPCWSTR  lpszFileName       backup filename
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-HANDLE WIN32API OpenBackupEventLogW(LPCWSTR  lpszUNCServerName,
-                                       LPCWSTR  lpszFileName)
-{
-  dprintf(("ADVAPI32: OpenBackupEventLogW(%s,%s) not implemented.\n",
-           lpszUNCServerName,
-           lpszFileName));
-
-  return (NULL); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : OpenEventLogA
- * Purpose   : The OpenEventLog function opens a handle of an event log.
- * Parameters: LPCSTR  lpszUNCServerName
- *             LPCSTR  lpszSourceName
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-HANDLE WIN32API OpenEventLogA(LPCSTR  lpszUNCServerName,
-                                 LPCSTR  lpszSourceName)
-{
-  dprintf(("ADVAPI32: OpenEventLogA(%s,%s) not implemented.\n",
-           lpszUNCServerName,
-           lpszSourceName));
-
-  return (NULL); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : OpenEventLogW
- * Purpose   : The OpenEventLog function opens a handle of an event log.
- * Parameters: LPCWSTR  lpszUNCServerName
- *             LPCWSTR  lpszSourceName
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-HANDLE WIN32API OpenEventLogW(LPCWSTR  lpszUNCServerName,
-                                 LPCWSTR  lpszSourceName)
-{
-  dprintf(("ADVAPI32: OpenEventLogW(%s,%s) not implemented.\n",
-           lpszUNCServerName,
-           lpszSourceName));
-
-  return (NULL); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : OpenSCManagerA
- * Purpose   : The OpenSCManager function establishes a connection to the
- *             service control manager on the specified computer and opens the
- *             specified database.
- * Parameters: LPCSTR lpszMachineName   address of machine name string
- *             LPCSTR lpszDatabaseName  address of database name string
- *             DWORD   fdwDesiredAccess  type of access
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-SC_HANDLE WIN32API OpenSCManagerA(LPCSTR lpszMachineName,
-                                     LPCSTR lpszDatabaseName,
-                                     DWORD   fdwDesiredAccess)
-{
-  dprintf(("ADVAPI32: OpenSCManagerA(%s,%s,%s) not implemented.\n",
-           lpszMachineName,
-           lpszDatabaseName,
-           fdwDesiredAccess));
-
-  return (NULL); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : OpenSCManagerW
- * Purpose   : The OpenSCManager function establishes a connection to the
- *             service control manager on the specified computer and opens the
- *             specified database.
- * Parameters: LPCWSTR lpszMachineName   address of machine name string
- *             LPCWSTR lpszDatabaseName  address of database name string
- *             DWORD   fdwDesiredAccess  type of access
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-SC_HANDLE WIN32API OpenSCManagerW(LPCWSTR lpszMachineName,
-                                     LPCWSTR lpszDatabaseName,
-                                     DWORD   fdwDesiredAccess)
-{
-  dprintf(("ADVAPI32: OpenSCManagerW(%s,%s,%s) not implemented.\n",
-           lpszMachineName,
-           lpszDatabaseName,
-           fdwDesiredAccess));
-
-  return (NULL); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : OpenServiceA
- * Purpose   : The OpenService function opens a handle to an existing service.
- * Parameters: SC_HANDLE schSCManager      handle of service control manager database
- *             LPCSTR   lpszServiceName   address of name of service to start
- *             DWORD     fdwDesiredAccess  type of access to service
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-SC_HANDLE WIN32API OpenServiceA(SC_HANDLE schSCManager,
-                                   LPCSTR   lpszServiceName,
-                                   DWORD     fdwDesiredAccess)
-{
-  dprintf(("ADVAPI32: OpenServiceA(%08xh,%s,%08xh) not implemented.\n",
-           schSCManager,
-           lpszServiceName,
-           fdwDesiredAccess));
-
-  return (NULL); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : OpenServiceW
- * Purpose   : The OpenService function opens a handle to an existing service.
- * Parameters: SC_HANDLE schSCManager      handle of service control manager database
- *             LPCWSTR   lpszServiceName   address of name of service to start
- *             DWORD     fdwDesiredAccess  type of access to service
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-SC_HANDLE WIN32API OpenServiceW(SC_HANDLE schSCManager,
-                                   LPCWSTR   lpszServiceName,
-                                   DWORD     fdwDesiredAccess)
-{
-  dprintf(("ADVAPI32: OpenServiceW(%08xh,%s,%08xh) not implemented.\n",
-           schSCManager,
-           lpszServiceName,
-           fdwDesiredAccess));
-
-  return (NULL); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : PrivilegeCheck
- * Purpose   : The PrivilegeCheck function tests the security context represented
- *             by a specific access token to discover whether it contains the
- *             specified privileges. This function is typically called by a server
- *             application to check the privileges of a client's access token.
- * Parameters: HANDLE          hClientToken handle of client's access token
- *             PPRIVILEGE_SET  pps          address of privileges
- *             LPBOOL          lpfResult    address of flag for result
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API PrivilegeCheck(HANDLE         hClientToken,
-                                PPRIVILEGE_SET pps,
-                                LPBOOL         lpfResult)
-{
-  dprintf(("ADVAPI32: PrivilegeCheck(%08xh,%08xh,%08xh) not implemented.\n",
-           hClientToken,
-           pps,
-           lpfResult));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : PrivilegedServiceAuditAlarmA
- * Purpose   : The PrivilegedServiceAuditAlarm function generates audit messages
- *             when an attempt is made to perform privileged system service
- *             operations. Alarms are not supported in the current version of Windows NT.
- * Parameters: LPCSTR        lpszSubsystem  address of string for subsystem name
- *             LPCSTR        lpszService    address of string for service name
- *             HANDLE         hClientToken   handle of access token
- *             PPRIVILEGE_SET pps            address of privileges
- *             BOOL           fAccessGranted flag for granted access rights
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API PrivilegedServiceAuditAlarmA(LPCSTR        lpszSubsystem,
-                                              LPCSTR        lpszService,
-                                              HANDLE         hClientToken,
-                                              PPRIVILEGE_SET pps,
-                                              BOOL           fAccessGranted)
-{
-  dprintf(("ADVAPI32: PrivilegedServiceAuditAlarmA(%s,%s,%08xh,%08xh,%08xh) not implemented.\n",
-           lpszSubsystem,
-           lpszService,
-           hClientToken,
-           pps,
-           fAccessGranted));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : PrivilegedServiceAuditAlarmW
- * Purpose   : The PrivilegedServiceAuditAlarm function generates audit messages
- *             when an attempt is made to perform privileged system service
- *             operations. Alarms are not supported in the current version of Windows NT.
- * Parameters: LPCWSTR        lpszSubsystem  address of string for subsystem name
- *             LPCWSTR        lpszService    address of string for service name
- *             HANDLE         hClientToken   handle of access token
- *             PPRIVILEGE_SET pps            address of privileges
- *             BOOL           fAccessGranted flag for granted access rights
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API PrivilegedServiceAuditAlarmW(LPCWSTR        lpszSubsystem,
-                                              LPCWSTR        lpszService,
-                                              HANDLE         hClientToken,
-                                              PPRIVILEGE_SET pps,
-                                              BOOL           fAccessGranted)
-{
-  dprintf(("ADVAPI32: PrivilegedServiceAuditAlarmW(%s,%s,%08xh,%08xh,%08xh) not implemented.\n",
-           lpszSubsystem,
-           lpszService,
-           hClientToken,
-           pps,
-           fAccessGranted));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : QueryServiceConfigA
- * Purpose   : The QueryServiceConfig function retrieves the configuration
- *             parameters of the specified service.
- * Parameters: SC_HANDLE              schService       handle of service
- *             LPQUERY_SERVICE_CONFIG lpqscServConfig  address of service config. structure
- *             DWORD                  cbBufSize        size of service configuration buffer
- *             LPDWORD                lpcbBytesNeeded  address of variable for bytes needed
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define LPQUERY_SERVICE_CONFIG LPVOID
-BOOL WIN32API QueryServiceConfigA(SC_HANDLE              schService,
-                                     LPQUERY_SERVICE_CONFIG lpqscServConfig,
-                                     DWORD                  cbBufSize,
-                                     LPDWORD                lpcbBytesNeeded)
-{
-  dprintf(("ADVAPI32: QueryServiceConfigA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           schService,
-           lpqscServConfig,
-           cbBufSize,
-           lpcbBytesNeeded));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : QueryServiceConfigW
- * Purpose   : The QueryServiceConfig function retrieves the configuration
- *             parameters of the specified service.
- * Parameters: SC_HANDLE              schService       handle of service
- *             LPQUERY_SERVICE_CONFIG lpqscServConfig  address of service config. structure
- *             DWORD                  cbBufSize        size of service configuration buffer
- *             LPDWORD                lpcbBytesNeeded  address of variable for bytes needed
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API QueryServiceConfigW(SC_HANDLE              schService,
-                                     LPQUERY_SERVICE_CONFIG lpqscServConfig,
-                                     DWORD                  cbBufSize,
-                                     LPDWORD                lpcbBytesNeeded)
-{
-  dprintf(("ADVAPI32: QueryServiceConfigW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           schService,
-           lpqscServConfig,
-           cbBufSize,
-           lpcbBytesNeeded));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : QueryServiceLockStatusA
- * Purpose   : The QueryServiceLockStatus function retrieves the lock status
- *             of the specified service control manager database.
- * Parameters: SC_HANDLE                   schSCManager     handle of svc. ctrl. mgr. database
- *             LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat   address of lock status structure
- *             DWORD                       cbBufSize        size of service configuration buffer
- *             LPDWORD                     lpcbBytesNeeded  address of variable for bytes needed
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define LPQUERY_SERVICE_LOCK_STATUS LPVOID
-BOOL WIN32API QueryServiceLockStatusA(SC_HANDLE                   schSCManager,
-                                         LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat,
-                                         DWORD                       cbBufSize,
-                                         LPDWORD                     lpcbBytesNeeded)
-{
-  dprintf(("ADVAPI32: QueryServiceLockStatusA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           schSCManager,
-           lpqslsLockStat,
-           cbBufSize,
-           lpcbBytesNeeded));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : QueryServiceLockStatusW
- * Purpose   : The QueryServiceLockStatus function retrieves the lock status
- *             of the specified service control manager database.
- * Parameters: SC_HANDLE                   schSCManager     handle of svc. ctrl. mgr. database
- *             LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat   address of lock status structure
- *             DWORD                       cbBufSize        size of service configuration buffer
- *             LPDWORD                     lpcbBytesNeeded  address of variable for bytes needed
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API QueryServiceLockStatusW(SC_HANDLE                   schSCManager,
-                                         LPQUERY_SERVICE_LOCK_STATUS lpqslsLockStat,
-                                         DWORD                       cbBufSize,
-                                         LPDWORD                     lpcbBytesNeeded)
-{
-  dprintf(("ADVAPI32: QueryServiceLockStatusW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           schSCManager,
-           lpqslsLockStat,
-           cbBufSize,
-           lpcbBytesNeeded));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : QueryServiceObjectSecurity
- * Purpose   : The QueryServiceObjectSecurity function retrieves a copy of the
- *             security descriptor protecting a service object.
- * Parameters: SC_HANDLE             schService       handle of service
- *             SECURITY_INFORMATION  fdwSecurityInfo  type of security information requested
- *             PSECURITY_DESCRIPTOR  psdSecurityDesc  address of security descriptor
- *             DWORD                 cbBufSize        size of security descriptor buffer
- *             LPDWORD               lpcbBytesNeeded  address of variable for bytes needed
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API QueryServiceObjectSecurity(SC_HANDLE             schService,
-                                            SECURITY_INFORMATION  fdwSecurityInfo,
-                                            PSECURITY_DESCRIPTOR  psdSecurityDesc,
-                                            DWORD                 cbBufSize,
-                                            LPDWORD               lpcbBytesNeeded)
-{
-  dprintf(("ADVAPI32: QueryServiceObjectSecurity(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           schService,
-           fdwSecurityInfo,
-           psdSecurityDesc,
-           cbBufSize,
-           lpcbBytesNeeded));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : QueryServiceStatus
- * Purpose   : The QueryServiceStatus function retrieves the current status of
- *             the specified service.
- * Parameters: SC_HANDLE         schService        handle of service
- *             LPSERVICE_STATUS  lpssServiceStatus address of service status structure
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API QueryServiceStatus(SC_HANDLE         schService,
-                                    LPSERVICE_STATUS  lpssServiceStatus)
-{
-  dprintf(("ADVAPI32: QueryServiceStatus(%08xh,%08xh) not implemented.\n",
-           schService,
-           lpssServiceStatus));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ReadEventLogW
- * Purpose   : The ReadEventLog function reads a whole number of entries from
- *             the specified event log. The function can be used to read log
- *             entries in forward or reverse chronological order.
- * Parameters: HANDLE hEventLog                 handle of event log
- *             DWORD  dwReadFlags               specifies how to read log
- *             DWORD  dwRecordOffset            number of first record
- *             LPVOID lpBuffer                  address of buffer for read data
- *             DWORD  nNumberOfBytesToRead      number of bytes to read
- *             DWORD  *pnBytesRea               number of bytes read
- *             DWORD  *pnMinNumberOfBytesNeeded number of bytes required for next record
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ReadEventLogW(HANDLE hEventLog,
-                               DWORD  dwReadFlags,
-                               DWORD  dwRecordOffset,
-                               LPVOID lpBuffer,
-                               DWORD  nNumberOfBytesToRead,
-                               DWORD  *pnBytesRead,
-                               DWORD  *pnMinNumberOfBytesNeeded)
-{
-  dprintf(("ADVAPI32: ReadEventLogW(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hEventLog,
-           dwReadFlags,
-           dwRecordOffset,
-           lpBuffer,
-           nNumberOfBytesToRead,
-           pnBytesRead,
-           pnMinNumberOfBytesNeeded));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : ReadEventLogA
- * Purpose   : The ReadEventLog function reads a whole number of entries from
- *             the specified event log. The function can be used to read log
- *             entries in forward or reverse chronological order.
- * Parameters: HANDLE hEventLog                 handle of event log
- *             DWORD  dwReadFlags               specifies how to read log
- *             DWORD  dwRecordOffset            number of first record
- *             LPVOID lpBuffer                  address of buffer for read data
- *             DWORD  nNumberOfBytesToRead      number of bytes to read
- *             DWORD  *pnBytesRea               number of bytes read
- *             DWORD  *pnMinNumberOfBytesNeeded number of bytes required for next record
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API ReadEventLogA(HANDLE hEventLog,
-                               DWORD  dwReadFlags,
-                               DWORD  dwRecordOffset,
-                               LPVOID lpBuffer,
-                               DWORD  nNumberOfBytesToRead,
-                               DWORD  *pnBytesRead,
-                               DWORD  *pnMinNumberOfBytesNeeded)
-{
-  dprintf(("ADVAPI32: ReadEventLogA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hEventLog,
-           dwReadFlags,
-           dwRecordOffset,
-           lpBuffer,
-           nNumberOfBytesToRead,
-           pnBytesRead,
-           pnMinNumberOfBytesNeeded));
-
-  return (FALSE); /* signal failure */
-}
-
-
-
-/*****************************************************************************
- * Name      : O32_RegConnectRegistryA
- * Purpose   : The RegConnectRegistry function establishes a connection to a
- *             predefined registry handle on another computer.
- * Parameters: LPTSTR lpszComputerName address of name of remote computer
- *             HKEY   hKey             predefined registry handle
- *             PHKEY  phkResult        address of buffer for remote registry handle
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegConnectRegistryA(LPCSTR lpszComputerName,
-                                     HKEY   hKey,
-                                     PHKEY  phkResult)
-{
-  dprintf(("ADVAPI32: RegConnectRegistryA(%s,%08xh,%08xh) not implemented.\n",
-           lpszComputerName,
-           hKey,
-           phkResult));
-  
-  if (lpszComputerName == NULL) /* local registry ? */
-  {
-    /* @@@PH experimental !!! */
-    *phkResult = hKey;
-    
-    return (NO_ERROR);
-  }
-  
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegConnectRegistryW
- * Purpose   : The RegConnectRegistry function establishes a connection to a
- *             predefined registry handle on another computer.
- * Parameters: LPWSTR lpszComputerName address of name of remote computer
- *             HKEY   hKey             predefined registry handle
- *             PHKEY  phkResult        address of buffer for remote registry handle
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegConnectRegistryW(LPCWSTR lpszComputerName,
-                                     HKEY   hKey,
-                                     PHKEY  phkResult)
-{
-                                               /* corresponding ascii string */
-  LPSTR pszAscii;
-  LONG rc;         /* returncode from call to ascii version of this function */
-  
-  if (lpszComputerName != NULL)
-    pszAscii = UnicodeToAsciiString((LPWSTR)lpszComputerName);
-  else
-    pszAscii = NULL;
-  
-  dprintf(("ADVAPI32: RegConnectRegistryW(%s,%08xh,%08xh) not implemented.\n",
-           pszAscii,
-           hKey,
-           phkResult));
-  
-  rc = RegConnectRegistryA(pszAscii,
-                           hKey,
-                           phkResult);
-
-  if (pszAscii != NULL)
-    FreeAsciiString(pszAscii);
-
-  return (rc);                                                         /* OK */
-}
-
-
-/*****************************************************************************
- * Name      : RegGetKeySecurity
- * Purpose   : The RegGetKeySecurity function retrieves a copy of the security
- *             descriptor protecting the specified open registry key.
- * Parameters: HKEY                 hKey        open handle of key to set
- *             SECURITY_INFORMATION SecInf      descriptor contents
- *             PSECURITY_DESCRIPTOR pSecDesc    address of descriptor for key
- *             LPDWORD              lpcbSecDesc address of size of buffer and descriptor
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegGetKeySecurity(HKEY                 hKey,
-                                   SECURITY_INFORMATION SecInf,
-                                   PSECURITY_DESCRIPTOR pSecDesc,
-                                   LPDWORD              lpcbSecDesc)
-{
-  dprintf(("ADVAPI32: RegGetKeySecurity(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hKey,
-           SecInf,
-           pSecDesc,
-           lpcbSecDesc));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegLoadKeyA
- * Purpose   : The RegLoadKey function creates a subkey under HKEY_USER or
- *             HKEY_LOCAL_MACHINE and stores registration information from a
- *             specified file into that subkey. This registration information
- *             is in the form of a hive. A hive is a discrete body of keys,
- *             subkeys, and values that is rooted at the top of the registry
- *             hierarchy. A hive is backed by a single file and .LOG file.
- * Parameters: HKEY    hKey       handle of open key
- *             LPCSTR lpszSubKey address of name of subkey
- *             LPCSTR lpszFile   address of filename for registry information
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegLoadKeyA(HKEY    hKey,
-                             LPCSTR lpszSubKey,
-                             LPCSTR lpszFile)
-{
-  dprintf(("ADVAPI32: RegLoadKeyA(%08xh,%s,%s) not implemented.\n",
-           hKey,
-           lpszSubKey,
-           lpszFile));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegLoadKeyW
- * Purpose   : The RegLoadKey function creates a subkey under HKEY_USER or
- *             HKEY_LOCAL_MACHINE and stores registration information from a
- *             specified file into that subkey. This registration information
- *             is in the form of a hive. A hive is a discrete body of keys,
- *             subkeys, and values that is rooted at the top of the registry
- *             hierarchy. A hive is backed by a single file and .LOG file.
- * Parameters: HKEY    hKey       handle of open key
- *             LPCWSTR lpszSubKey address of name of subkey
- *             LPCWSTR lpszFile   address of filename for registry information
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegLoadKeyW(HKEY    hKey,
-                             LPCWSTR lpszSubKey,
-                             LPCWSTR lpszFile)
-{
-  dprintf(("ADVAPI32: RegLoadKeyW(%08xh,%s,%s) not implemented.\n",
-           hKey,
-           lpszSubKey,
-           lpszFile));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegQueryMultipleValuesA
- * Purpose   : The RegQueryMultipleValues function retrieves the type and data
- *             for a list of value names associated with an open registry key.
- * Parameters: HKEY    hKey        handle of key to query
- *             PVALENT val_list    address of array of value entry structures
- *             DWORD   num_vals    size of array of value entry structures
- *             LPTSTR  lpValueBuf  address of buffer for value information
- *             LPDWORD ldwTotsize  address of size of value buffer
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define PVALENT LPVOID
-LONG WIN32API RegQueryMultipleValuesA(HKEY    hKey,
-                                         PVALENT val_list,
-                                         DWORD   num_vals,
-                                         LPTSTR  lpValueBuf,
-                                         LPDWORD ldwTotsize)
-{
-  dprintf(("ADVAPI32: RegQueryMultipleValuesA(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hKey,
-           val_list,
-           num_vals,
-           lpValueBuf,
-           ldwTotsize));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegQueryMultipleValuesW
- * Purpose   : The RegQueryMultipleValues function retrieves the type and data
- *             for a list of value names associated with an open registry key.
- * Parameters: HKEY    hKey        handle of key to query
- *             PVALENT val_list    address of array of value entry structures
- *             DWORD   num_vals    size of array of value entry structures
- *             LPWSTR  lpValueBuf  address of buffer for value information
- *             LPDWORD ldwTotsize  address of size of value buffer
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegQueryMultipleValuesW(HKEY    hKey,
-                                         PVALENT val_list,
-                                         DWORD   num_vals,
-                                         LPWSTR  lpValueBuf,
-                                         LPDWORD ldwTotsize)
-{
-  dprintf(("ADVAPI32: RegQueryMultipleValuesW(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hKey,
-           val_list,
-           num_vals,
-           lpValueBuf,
-           ldwTotsize));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegRemapPreDefKey
- * Purpose   :
- * Parameters:
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#if 0
-LONG WIN32API RegRemapPreDefKey(HKEY hKey)
-{
-  dprintf(("ADVAPI32: RegRemapPreDefKey(%08xh) not implemented.\n",
-           hKey));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-#endif
-
-
-/*****************************************************************************
- * Name      : RegReplaceKeyA
- * Purpose   : The RegReplaceKey function replaces the file backing a key and
- *             all its subkeys with another file, so that when the system is
- *             next started, the key and subkeys will have the values stored in the new file.
- * Parameters: HKEY    hKey      handle of open key
- *             LPCSTR lpSubKey  address of name of subkey
- *             LPCSTR lpNewFile address of filename for file with new data
- *             LPCSTR lpOldFile address of filename for backup file
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegReplaceKeyA(HKEY    hKey,
-                                LPCSTR lpSubKey,
-                                LPCSTR lpNewFile,
-                                LPCSTR lpOldFile)
-{
-  dprintf(("ADVAPI32: RegReplaceKeyA(%08xh,%s,%s,%s) not implemented.\n",
-           hKey,
-           lpSubKey,
-           lpNewFile,
-           lpOldFile));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegReplaceKeyW
- * Purpose   : The RegReplaceKey function replaces the file backing a key and
- *             all its subkeys with another file, so that when the system is
- *             next started, the key and subkeys will have the values stored in the new file.
- * Parameters: HKEY    hKey      handle of open key
- *             LPCWSTR lpSubKey  address of name of subkey
- *             LPCWSTR lpNewFile address of filename for file with new data
- *             LPCWSTR lpOldFile address of filename for backup file
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegReplaceKeyW(HKEY    hKey,
-                                LPCWSTR lpSubKey,
-                                LPCWSTR lpNewFile,
-                                LPCWSTR lpOldFile)
-{
-  dprintf(("ADVAPI32: RegReplaceKeyW(%08xh,%s,%s,%s) not implemented.\n",
-           hKey,
-           lpSubKey,
-           lpNewFile,
-           lpOldFile));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegRestoreKeyA
- * Purpose   : The RegRestoreKey function reads the registry information in a
- *             specified file and copies it over the specified key. This
- *             registry information may be in the form of a key and multiple
- *             levels of subkeys.
- * Parameters: HKEY    hKey      handle of key where restore begins
- *             LPCSTR lpszFile  address of filename containing saved tree
- *             DWORD   fdw       optional flags
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegRestoreKeyA(HKEY    hKey,
-                                LPCSTR lpszFile,
-                                DWORD   fdw)
-{
-  dprintf(("ADVAPI32: RegRestoreKeyA(%08xh,%s,%08xh) not implemented.\n",
-           hKey,
-           lpszFile,
-           fdw));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegRestoreKeyW
- * Purpose   : The RegRestoreKey function reads the registry information in a
- *             specified file and copies it over the specified key. This
- *             registry information may be in the form of a key and multiple
- *             levels of subkeys.
- * Parameters: HKEY    hKey      handle of key where restore begins
- *             LPCWSTR lpszFile  address of filename containing saved tree
- *             DWORD   fdw       optional flags
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegRestoreKeyW(HKEY    hKey,
-                                LPCWSTR lpszFile,
-                                DWORD   fdw)
-{
-  dprintf(("ADVAPI32: RegRestoreKeyW(%08xh,%s,%08xh) not implemented.\n",
-           hKey,
-           lpszFile,
-           fdw));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegSaveKeyA
- * Purpose   : The RegSaveKey function saves the specified key and all of its
- *             subkeys and values to a new file.
- * Parameters: HKEY                  hKey      handle of key where save begins
- *             LPCSTR               lpszFile  address of filename to save to
- *             LPSECURITY_ATTRIBUTES lpsa      address of security structure
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegSaveKeyA(HKEY                  hKey,
-                             LPCSTR               lpszFile,
-                             LPSECURITY_ATTRIBUTES lpsa)
-{
-  dprintf(("ADVAPI32: RegSaveKeyA(%08xh,%s,%08xh) not implemented.\n",
-           hKey,
-           lpszFile,
-           lpsa));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegSaveKeyW
- * Purpose   : The RegSaveKey function saves the specified key and all of its
- *             subkeys and values to a new file.
- * Parameters: HKEY                  hKey      handle of key where save begins
- *             LPCWSTR               lpszFile  address of filename to save to
- *             LPSECURITY_ATTRIBUTES lpsa      address of security structure
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegSaveKeyW(HKEY                  hKey,
-                             LPCWSTR               lpszFile,
-                             LPSECURITY_ATTRIBUTES lpsa)
-{
-  dprintf(("ADVAPI32: RegSaveKeyW(%08xh,%s,%08xh) not implemented.\n",
-           hKey,
-           lpszFile,
-           lpsa));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegSetKeySecurity
- * Purpose   : The RegSetKeySecurity function sets the security of an open registry key.
- * Parameters: HKEY                 hKey open handle of key to set
- *             SECURITY_INFORMATION si   descriptor contents
- *             PSECURITY_DESCRIPTOR psd  address of descriptor for key
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegSetKeySecurity(HKEY                 hKey,
-                                   SECURITY_INFORMATION si,
-                                   PSECURITY_DESCRIPTOR psd)
-{
-  dprintf(("ADVAPI32: RegSetKeySecurity(%08xh,%08xh,%08xh) not implemented.\n",
-           hKey,
-           si,
-           psd));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegUnLoadKeyA
- * Purpose   : The RegUnLoadKey function unloads the specified key and subkeys from the registry.
- * Parameters: HKEY    hKey       handle of open key
- *             LPCSTR lpszSubKey address of name of subkey to unload
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegUnLoadKeyA(HKEY    hKey,
-                            LPCSTR lpszSubKey)
-{
-  dprintf(("ADVAPI32: RegUnLoadKeyA(%08xh,%s) not implemented.\n",
-           hKey,
-           lpszSubKey));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegUnLoadKeyW
- * Purpose   : The RegUnLoadKey function unloads the specified key and subkeys from the registry.
- * Parameters: HKEY    hKey       handle of open key
- *             LPCWSTR lpszSubKey address of name of subkey to unload
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-LONG WIN32API RegUnLoadKeyW(HKEY    hKey,
-                               LPCWSTR lpszSubKey)
-{
-  dprintf(("ADVAPI32: RegUnLoadKeyW(%08xh,%s) not implemented.\n",
-           hKey,
-           lpszSubKey));
-
-  return (ERROR_ACCESS_DENIED); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegisterServiceCtrlHandlerA
- * Purpose   : The RegisterServiceCtrlHandler function registers a function to
- *             handle service control requests for a service.
- * Parameters: LPCSTR            lpszServiceName address of name of service
- *             LPHANDLER_FUNCTION lpHandlerProc   address of handler function
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define SERVICE_STATUS_HANDLE DWORD
-#define LPHANDLER_FUNCTION    LPVOID
-SERVICE_STATUS_HANDLE WIN32API RegisterServiceCtrlHandlerA(LPCSTR            lpszServiceName,
-                                                              LPHANDLER_FUNCTION lpHandlerProc)
-{
-  dprintf(("ADVAPI32: RegisterServiceCtrlHandlerA(%s,%08xh) not implemented.\n",
-           lpszServiceName,
-           lpHandlerProc));
-
-  return (0); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : RegisterServiceCtrlHandlerW
- * Purpose   : The RegisterServiceCtrlHandler function registers a function to
- *             handle service control requests for a service.
- * Parameters: LPCWSTR            lpszServiceName address of name of service
- *             LPHANDLER_FUNCTION lpHandlerProc   address of handler function
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-SERVICE_STATUS_HANDLE WIN32API RegisterServiceCtrlHandlerW(LPCWSTR            lpszServiceName,
-                                                              LPHANDLER_FUNCTION lpHandlerProc)
-{
-  dprintf(("ADVAPI32: RegisterServiceCtrlHandlerW(%s,%08xh) not implemented.\n",
-           lpszServiceName,
-           lpHandlerProc));
-
-  return (0); /* signal failure */
-}
-
-
-
-/*****************************************************************************
- * Name      : RevertToSelf
- * Purpose   : The RevertToSelf function terminates the impersonation of a client application.
- * Parameters:
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API RevertToSelf(VOID)
-{
-  dprintf(("ADVAPI32: RevertToSelf() not implemented.\n"));
-
-  return (TRUE); /* signal OK */
-}
-
-
-/*****************************************************************************
- * Name      : SetAclInformation
- * Purpose   : The SetAclInformation function sets information about an access-control list (ACL).
- * Parameters: PACL                  pAcl       address of access-control list
- *             LPVOID                lpvAclInfo address of ACL information
- *             DWORD                 cbAclInfo  size of ACL information
- *             ACL_INFORMATION_CLASS aclic      specifies class of requested info
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define ACL_INFORMATION_CLASS DWORD
-BOOL WIN32API SetAclInformation(PACL                  pAcl,
-                                   LPVOID                lpvAclInfo,
-                                   DWORD                 cbAclInfo,
-                                   ACL_INFORMATION_CLASS aclic)
-{
-  dprintf(("ADVAPI32: SetAclInformation(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           pAcl,
-           lpvAclInfo,
-           cbAclInfo,
-           aclic));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : SetKernelObjectSecurity
- * Purpose   : The SetKernelObjectSecurity function sets the security of a kernel
- *             object. For example, this can be a process, thread, or event.
- * Parameters: HANDLE               hObject handle of object
- *             SECURITY_INFORMATION si      type of information to set
- *             PSECURITY_DESCRIPTOR psd     address of security descriptor
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API SetKernelObjectSecurity(HANDLE               hObject,
-                                         SECURITY_INFORMATION si,
-                                         PSECURITY_DESCRIPTOR psd)
-{
-  dprintf(("ADVAPI32: SetKernelObjectSecurity(%08xh,%08xh,%08xh) not implemented.\n",
-           hObject,
-           si,
-           psd));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : SetPrivateObjectSecurity
- * Purpose   : The SetPrivateObjectSecurity function modifies a private
- *             object's security descriptor.
- * Parameters: SECURITY_INFORMATION  si           type of security information
- *             PSECURITY_DESCRIPTOR  psdSource    address of SD to apply to object
- *             PSECURITY_DESCRIPTOR  *lppsdTarget address of object's SD
- *             PGENERIC_MAPPING      pgm          address of access-mapping structure
- *             HANDLE                hClientToken handle of client access token
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API SetPrivateObjectSecurity(SECURITY_INFORMATION  si,
-                                          PSECURITY_DESCRIPTOR  psdSource,
-                                          PSECURITY_DESCRIPTOR  *lppsdTarget,
-                                          PGENERIC_MAPPING      pgm,
-                                          HANDLE                hClientToken)
-{
-  dprintf(("ADVAPI32: SetPrivateObjectSecurity(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           si,
-           psdSource,
-           lppsdTarget,
-           pgm,
-           hClientToken));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : SetSecurityDescriptorGroup
- * Purpose   : The SetSecurityDescriptorGroup function sets the primary group
- *             information of an absolute-format security descriptor, replacing
- *             any primary group information already present in the security descriptor.
- * Parameters: PSECURITY_DESCRIPTOR psd             address of security descriptor
- *             PSID                 psidGroup       address of SID for group
- *             BOOL                 fGroupDefaulted flag for default
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API SetSecurityDescriptorGroup(PSECURITY_DESCRIPTOR psd,
-                                            PSID                 psidGroup,
-                                            BOOL                 fGroupDefaulted)
-{
-  dprintf(("ADVAPI32: SetSecurityDescriptorGroup(%08xh,%08xh,%08xh) not implemented.\n",
-           psd,
-           psidGroup,
-           fGroupDefaulted));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : SetSecurityDescriptorOwner
- * Purpose   : The SetSecurityDescriptorOwner function sets the owner information
- *             of an absolute-format security descriptor. It replaces any owner
- *             information already present in the security descriptor.
- * Parameters: PSECURITY_DESCRIPTOR psd             address of security descriptor
- *             PSID                 psidOwner       address of SID for owner
- *             BOOL                 fOwnerDefaulted flag for default
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API SetSecurityDescriptorOwner(PSECURITY_DESCRIPTOR psd,
-                                            PSID                 psidOwner,
-                                            BOOL                 fOwnerDefaulted)
-{
-  dprintf(("ADVAPI32: SetSecurityDescriptorOwner(%08xh,%08xh,%08xh) not implemented.\n",
-           psd,
-           psidOwner,
-           fOwnerDefaulted));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : SetSecurityDescriptorSacl
- * Purpose   : The SetSecurityDescriptorSacl function sets information in a
- *             system access-control list (ACL). If there is already a system
- *             ACL present in the security descriptor, it is replaced.
- * Parameters:
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API SetSecurityDescriptorSacl(PSECURITY_DESCRIPTOR  psd,
-                                           BOOL                  fSaclPresent,
-                                           PACL                  pAcl,
-                                           BOOL                  fSaclDefaulted)
-{
-  dprintf(("ADVAPI32: SetSecurityDescriptorSacl(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           psd,
-           fSaclPresent,
-           pAcl,
-           fSaclDefaulted));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : SetServiceBits
- * Purpose   : The SetServiceBits function registers a service's service type
- *             with the Service Control Manager and the Server service. The
- *             Server service can then announce the registered service type
- *             as one it currently supports. The LAN Manager functions
- *             NetServerGetInfo and NetServerEnum obtain a specified machine's
- *             supported service types.
- *             A service type is represented as a set of bit flags; the
- *             SetServiceBits function sets or clears combinations of those bit flags.
- * Parameters: SERVICE_STATUS_HANDLE hServiceStatus     service status handle
- *             DWORD                 dwServiceBits      service type bits to set or clear
- *             BOOL                  bSetBitsOn         flag to set or clear the service type bits
- *             BOOL                  bUpdateImmediately flag to announce server type immediately
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API SetServiceBits(SERVICE_STATUS_HANDLE hServiceStatus,
-                                DWORD                 dwServiceBits,
-                                BOOL                  bSetBitsOn,
-                                BOOL                  bUpdateImmediately)
-{
-  dprintf(("ADVAPI32: SetServiceBits(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hServiceStatus,
-           dwServiceBits,
-           bSetBitsOn,
-           bUpdateImmediately));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : SetServiceObjectSecurity
- * Purpose   : The SetServiceObjectSecurity function sets the security
- *             descriptor of a service object.
- * Parameters: SC_HANDLE             schService      handle of service
- *             SECURITY_INFORMATION  fdwSecurityInfo type of security information requested
- *             PSECURITY_DESCRIPTOR  psdSecurityDesc address of security descriptor
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API SetServiceObjectSecurity(SC_HANDLE             schService,
-                                          SECURITY_INFORMATION  fdwSecurityInfo,
-                                          PSECURITY_DESCRIPTOR  psdSecurityDesc)
-{
-  dprintf(("ADVAPI32: SetServiceObjectSecurity(%08xh,%08xh,%08xh) not implemented.\n",
-           schService,
-           fdwSecurityInfo,
-           psdSecurityDesc));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : SetServiceStatus
- * Purpose   : The SetServiceStatus function updates the service control
- *             manager's status information for the calling service.
- * Parameters: SERVICE_STATUS_HANDLE sshServiceStatus  service status handle
- *             LPSERVICE_STATUS      lpssServiceStatus address of status structure
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API SetServiceStatus(SERVICE_STATUS_HANDLE sshServiceStatus,
-                                  LPSERVICE_STATUS      lpssServiceStatus)
-{
-  dprintf(("ADVAPI32: SetServiceStatus(%08xh,%08xh) not implemented.\n",
-           sshServiceStatus,
-           lpssServiceStatus));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : SetTokenInformation
- * Purpose   : The SetTokenInformation function sets various types of
- *             information for a specified access token. The information it
- *             sets replaces existing information. The calling process must
- *             have appropriate access rights to set the information.
- * Parameters: HANDLE                  hToken         handle of access token
- *             TOKEN_INFORMATION_CLASS tic            type of information to set
- *             LPVOID                  lpvInformation address of information to set
- *             DWORD                   cbInformation  size of information buffer
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define TOKEN_INFORMATION_CLASS DWORD
-BOOL WIN32API SetTokenInformation(HANDLE                  hToken,
-                                     TOKEN_INFORMATION_CLASS tic,
-                                     LPVOID                  lpvInformation,
-                                     DWORD                   cbInformation)
-{
-  dprintf(("ADVAPI32: SetTokenInformation(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hToken,
-           tic,
-           lpvInformation,
-           cbInformation));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : StartServiceA
- * Purpose   : The StartService function starts the execution of a service.
- * Parameters: SC_HANDLE schService        handle of service
- *             DWORD     dwNumServiceArgs  number of arguments
- *             LPCSTR   *lpszServiceArgs  address of array of argument string pointers
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API StartServiceA(SC_HANDLE schService,
-                               DWORD     dwNumServiceArgs,
-                               LPCSTR   *lpszServiceArgs)
-{
-  dprintf(("ADVAPI32: StartServiceA(%08xh,%08xh,%s) not implemented.\n",
-           schService,
-           dwNumServiceArgs,
-           lpszServiceArgs));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : StartServiceCtrlDispatcherW
- * Purpose   : The StartServiceCtrlDispatcher function connects the main thread
- *             of a service process to the service control manager, which causes
- *             the thread to be the service control dispatcher thread for the calling process.
- * Parameters: LPSERVICE_TABLE_ENTRY  lpsteServiceTable  address of service table
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-#define LPSERVICE_TABLE_ENTRY LPVOID
-BOOL WIN32API StartServiceCtrlDispatcherW(LPSERVICE_TABLE_ENTRY lpsteServiceTable)
-{
-  dprintf(("ADVAPI32: StartServiceCtrlDispatcherW(%08xh) not implemented.\n",
-           lpsteServiceTable));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : StartServiceCtrlDispatcherA
- * Purpose   : The StartServiceCtrlDispatcher function connects the main thread
- *             of a service process to the service control manager, which causes
- *             the thread to be the service control dispatcher thread for the calling process.
- * Parameters: LPSERVICE_TABLE_ENTRY  lpsteServiceTable  address of service table
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API StartServiceCtrlDispatcherA(LPSERVICE_TABLE_ENTRY lpsteServiceTable)
-{
-  dprintf(("ADVAPI32: StartServiceCtrlDispatcherA(%08xh) not implemented.\n",
-           lpsteServiceTable));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : StartServiceW
- * Purpose   : The StartService function starts the execution of a service.
- * Parameters: SC_HANDLE schService        handle of service
- *             DWORD     dwNumServiceArgs  number of arguments
- *             LPCWSTR   *lpszServiceArgs  address of array of argument string pointers
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
- *****************************************************************************/
-
-BOOL WIN32API StartServiceW(SC_HANDLE schService,
-                               DWORD     dwNumServiceArgs,
-                               LPCWSTR   *lpszServiceArgs)
-{
-  dprintf(("ADVAPI32: StartServiceW(%08xh,%08xh,%s) not implemented.\n",
-           schService,
-           dwNumServiceArgs,
-           lpszServiceArgs));
-
-  return (FALSE); /* signal failure */
-}
-
-
-/*****************************************************************************
- * Name      : UnlockServiceDatabase
- * Purpose   : The UnlockServiceDatabase function unlocks a service control
- *             manager database by releasing the specified lock.
- * Parameters: SC_LOCK  sclLock  service control manager database lock to be released
- * Variables :
- * Result    :
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Tue, 1998/06/16 23:00]
-
- *****************************************************************************/
-
-BOOL WIN32API UnlockServiceDatabase(SC_LOCK sclLock)
-{
-  dprintf(("ADVAPI32: UnlockServiceDatabase(%08xh) not implemented.\n",
-           sclLock));
-
-  return (FALSE); /* signal failure */
-}
-
Index: trunk/src/advapi32/advapi32.vpj
===================================================================
--- trunk/src/advapi32/advapi32.vpj	(revision 47)
+++ 	(revision )
@@ -1,27 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd advapi32.dll
-execute=:Execute:E&xecute,advapi32.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-ADVAPI32.C
-ADVAPI32.DEF
-advapi32.h
-INITTERM.C
-makefile
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/advapi32/initterm.c
===================================================================
--- trunk/src/advapi32/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,122 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:19:33 ktk Exp $ */
-
-/*
- * ADVAPI32 DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen
- * Copyright 1998 Peter Fitzsimmons
- *
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"       /*PLF Wed  98-03-18 23:18:15*/
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-   size_t i;
-   APIRET rc;
-
-   /*-------------------------------------------------------------------------*/
-   /* If ulFlag is zero then the DLL is being loaded so initialization should */
-   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-   /* termination should be performed.                                        */
-   /*-------------------------------------------------------------------------*/
-
-   switch (ulFlag) {
-      case 0 :
-
-         /*******************************************************************/
-         /* The C run-time environment initialization function must be      */
-         /* called before any calls to C run-time functions that are not    */
-         /* inlined.                                                        */
-         /*******************************************************************/
-
-         if (_CRT_init() == -1)
-            return 0UL;
-  	 __ctordtorInit();
-
-         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-         /*******************************************************************/
-         /* A DosExitList routine must be used to clean up if runtime calls */
-         /* are required and the runtime is dynamically linked.             */
-         /*******************************************************************/
-
-         rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-         if(rc)
-		return 0UL;
-
-         break;
-      case 1 :
-         break;
-      default  :
-         return 0UL;
-   }
-
-   /***********************************************************/
-   /* A non-zero value must be returned to indicate success.  */
-   /***********************************************************/
-   return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-   __ctordtorTerm();  
-   _CRT_term();
-   DosExitList(EXLST_EXIT, cleanup);
-   return ;
-}
Index: trunk/src/capi2032/capi2032.vpj
===================================================================
--- trunk/src/capi2032/capi2032.vpj	(revision 47)
+++ 	(revision )
@@ -1,27 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd capi2032.dll
-execute=:Execute:E&xecute,capi2032.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-capi2032.cpp
-capi2032.def
-capi2032.h
-INITTERM.C
-makefile
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/capi2032/initterm.c
===================================================================
--- trunk/src/capi2032/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,124 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:19:34 ktk Exp $ */
-
-/*
- * CAPI2032 DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen
- * Copyright 1998 Peter Fitzsimmons
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- *
- */
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"       /*PLF Wed  98-03-18 23:18:29*/
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-
-
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-   size_t i;
-   APIRET rc;
-
-   /*-------------------------------------------------------------------------*/
-   /* If ulFlag is zero then the DLL is being loaded so initialization should */
-   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-   /* termination should be performed.                                        */
-   /*-------------------------------------------------------------------------*/
-
-   switch (ulFlag) {
-      case 0 :
-
-         /*******************************************************************/
-         /* The C run-time environment initialization function must be      */
-         /* called before any calls to C run-time functions that are not    */
-         /* inlined.                                                        */
-         /*******************************************************************/
-
-         if (_CRT_init() == -1)
-            return 0UL;
-  	 __ctordtorInit();
-
-         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-
-         /*******************************************************************/
-         /* A DosExitList routine must be used to clean up if runtime calls */
-         /* are required and the runtime is dynamically linked.             */
-         /*******************************************************************/
-
-         rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-         if(rc)
-		return 0UL;
-
-         break;
-      case 1 :
-         break;
-      default  :
-         return 0UL;
-   }
-
-   /***********************************************************/
-   /* A non-zero value must be returned to indicate success.  */
-   /***********************************************************/
-   return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-   __ctordtorTerm();  
-   _CRT_term();
-   DosExitList(EXLST_EXIT, cleanup);
-   return ;
-}
Index: trunk/src/comdlg32/comdlg32.vpj
===================================================================
--- trunk/src/comdlg32/comdlg32.vpj	(revision 47)
+++ 	(revision )
@@ -1,27 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd comdlg32.dll
-execute=:Execute:E&xecute,comdlg32.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 1 0 1
-[FILES]
-comdlg32.cpp
-comdlg32.def
-comdlg32.h
-INITTERM.C
-makefile
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/comdlg32/initterm.c
===================================================================
--- trunk/src/comdlg32/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,122 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:19:34 ktk Exp $ */
-
-/*
- * COMDLG32 DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen
- * Copyright 1998 Peter Fitzsimmons
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- *
- */
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"       /*PLF Wed  98-03-18 23:18:29*/
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-   size_t i;
-   APIRET rc;
-
-   /*-------------------------------------------------------------------------*/
-   /* If ulFlag is zero then the DLL is being loaded so initialization should */
-   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-   /* termination should be performed.                                        */
-   /*-------------------------------------------------------------------------*/
-
-   switch (ulFlag) {
-      case 0 :
-
-         /*******************************************************************/
-         /* The C run-time environment initialization function must be      */
-         /* called before any calls to C run-time functions that are not    */
-         /* inlined.                                                        */
-         /*******************************************************************/
-
-         if (_CRT_init() == -1)
-            return 0UL;
-     __ctordtorInit();
-
-        CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-         /*******************************************************************/
-         /* A DosExitList routine must be used to clean up if runtime calls */
-         /* are required and the runtime is dynamically linked.             */
-         /*******************************************************************/
-
-         rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-         if(rc)
-        return 0UL;
-
-         break;
-      case 1 :
-         break;
-      default  :
-         return 0UL;
-   }
-
-   /***********************************************************/
-   /* A non-zero value must be returned to indicate success.  */
-   /***********************************************************/
-   return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-   __ctordtorTerm();
-   _CRT_term();
-   DosExitList(EXLST_EXIT, cleanup);
-   return ;
-}
Index: trunk/src/ddraw/ddraw.vpj
===================================================================
--- trunk/src/ddraw/ddraw.vpj	(revision 47)
+++ 	(revision )
@@ -1,43 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd ddraw.dll
-execute=:Execute:E&xecute,ddraw.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-asmutil.asm
-asmutil.h
-ddraw.CPP
-ddraw.DEF
-INITTERM.C
-makefile
-misc.c
-OS2CLIPPER.CPP
-OS2CLIPPER.H
-OS2D3D.CPP
-OS2DDRAW.CPP
-OS2DDRAW.H
-OS2PALETTE.CPP
-OS2PALETTE.H
-OS2PALSET.CPP
-OS2PALSET.H
-OS2SURFACE.CPP
-OS2SURFACE.H
-OS2UTIL.CPP
-OS2UTIL.H
-no.h
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/ddraw/initterm.c
===================================================================
--- trunk/src/ddraw/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,124 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:19:36 ktk Exp $ */
-
-/*
- * DirectDraw DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
- * Copyright 1998 Peter Fitzsimmons
- *
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"       /*PLF Wed  98-03-18 23:18:29*/
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-
-
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-   size_t i;
-   APIRET rc;
-
-   /*-------------------------------------------------------------------------*/
-   /* If ulFlag is zero then the DLL is being loaded so initialization should */
-   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-   /* termination should be performed.                                        */
-   /*-------------------------------------------------------------------------*/
-
-   switch (ulFlag) {
-      case 0 :
-
-         /*******************************************************************/
-         /* The C run-time environment initialization function must be      */
-         /* called before any calls to C run-time functions that are not    */
-         /* inlined.                                                        */
-         /*******************************************************************/
-
-         if (_CRT_init() == -1)
-            return 0UL;
-     __ctordtorInit();
-
-         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-
-         /*******************************************************************/
-         /* A DosExitList routine must be used to clean up if runtime calls */
-         /* are required and the runtime is dynamically linked.             */
-         /*******************************************************************/
-
-         rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-         if(rc)
-        return 0UL;
-
-         break;
-      case 1 :
-         break;
-      default  :
-         return 0UL;
-   }
-
-   /***********************************************************/
-   /* A non-zero value must be returned to indicate success.  */
-   /***********************************************************/
-   return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-   __ctordtorTerm();
-   _CRT_term();
-   DosExitList(EXLST_EXIT, cleanup);
-   return ;
-}
Index: trunk/src/ddraw/no.h
===================================================================
--- trunk/src/ddraw/no.h	(revision 47)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- * Window.h NO* defines for the ddraw module.
- *
- * Copyright (c) 1999 knut st. osmundsen
- *
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-#ifndef _no_h_
-    #define _no_h_
-    #define NOGDICAPMASKS
-    #define NOVIRTUALKEYCODES
-    #define NOWINMESSAGES
-    #define NOWINSTYLES
-    #define NOSYSMETRICS
-    #define NOMENUS
-    #define NOICONS
-    #define NOKEYSTATES
-    #define NOSYSCOMMANDS
-    #define NORASTEROPS
-    #define NOSHOWWINDOW
-    #define OEMRESOURCE
-    #define NOATOM
-    #define NOCLIPBOARD
-    #define NOCOLOR
-    #define NODRAWTEXT
-    #define NOKERNEL
-    #define NONLS
-    #define NOMB
-    #define NOMEMMGR
-    #define NOMETAFILE
-    #define NOMINMAX
-    #define NOOPENFILE
-    #define NOSCROLL
-    #define NOSERVICE
-    #define NOSOUND
-    #define NOTEXTMETRIC
-    #define NOWH
-    #define NOWINOFFSETS
-    #define NOCOMM
-    #define NOKANJI
-    #define NOHELP
-    #define NOPROFILER
-    #define NODEFERWINDOWPOS
-    #define NOMCX
-#endif
Index: trunk/src/dsound/dsound.vpj
===================================================================
--- trunk/src/dsound/dsound.vpj	(revision 47)
+++ 	(revision )
@@ -1,32 +1,0 @@
-[COMPILER]
-MACRO=\n
-FILTEREXPANSION=1 1 1 1 1
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd dsound.dll
-execute=:Execute:E&xecute,dsound.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=k:\src\dsound
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-[FILES]
-DSOUND.CPP
-DSOUND.DEF
-INITTERM.C
-makefile
-misc.c
-OS2DSOUND.CPP
-OS2DSOUND.H
-OS2SNDBUFFER.CPP
-OS2SNDBUFFER.H
-no.h
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/dsound/initterm.c
===================================================================
--- trunk/src/dsound/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,125 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:19:38 ktk Exp $ */
-
-/*
- * DirectSound DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
- * Copyright 1998 Peter Fitzsimmons
- *
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"       /*PLF Wed  98-03-18 23:18:29*/
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-
-
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-   size_t i;
-   APIRET rc;
-
-   /*-------------------------------------------------------------------------*/
-   /* If ulFlag is zero then the DLL is being loaded so initialization should */
-   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-   /* termination should be performed.                                        */
-   /*-------------------------------------------------------------------------*/
-
-   switch (ulFlag) {
-      case 0 :
-
-         /*******************************************************************/
-         /* The C run-time environment initialization function must be      */
-         /* called before any calls to C run-time functions that are not    */
-         /* inlined.                                                        */
-         /*******************************************************************/
-
-         if (_CRT_init() == -1)
-            return 0UL;
-         __ctordtorInit();
-
-         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-
-         /*******************************************************************/
-         /* A DosExitList routine must be used to clean up if runtime calls */
-         /* are required and the runtime is dynamically linked.             */
-         /*******************************************************************/
-
-         rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-         if(rc)
-                return 0UL;
-
-         break;
-      case 1 :
-         break;
-      default  :
-         return 0UL;
-   }
-
-   /***********************************************************/
-   /* A non-zero value must be returned to indicate success.  */
-   /***********************************************************/
-   return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-   __ctordtorTerm();
-   _CRT_term();
-   DosExitList(EXLST_EXIT, cleanup);
-   return ;
-}
Index: trunk/src/dsound/no.h
===================================================================
--- trunk/src/dsound/no.h	(revision 47)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- * Window.h NO* defines for the dsound module.
- *
- * Copyright (c) 1999 knut st. osmundsen
- *
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-#ifndef _no_h_
-    #define _no_h_
-    #define NOGDICAPMASKS
-    #define NOVIRTUALKEYCODES
-    #define NOWINMESSAGES
-    #define NOWINSTYLES
-    #define NOSYSMETRICS
-    #define NOMENUS
-    #define NOICONS
-    #define NOKEYSTATES
-    #define NOSYSCOMMANDS
-    #define NORASTEROPS
-    #define NOSHOWWINDOW
-    #define OEMRESOURCE
-    #define NOATOM
-    #define NOCLIPBOARD
-    #define NOCOLOR
-    #define NODRAWTEXT
-    #define NOKERNEL
-    #define NONLS
-    #define NOMB
-    #define NOMEMMGR
-    #define NOMETAFILE
-    #define NOMINMAX
-    #define NOOPENFILE
-    #define NOSCROLL
-    #define NOSERVICE
-    #define NOSOUND
-    #define NOTEXTMETRIC
-    #define NOWH
-    #define NOWINOFFSETS
-    #define NOCOMM
-    #define NOKANJI
-    #define NOHELP
-    #define NOPROFILER
-    #define NODEFERWINDOWPOS
-    #define NOMCX
-#endif
Index: trunk/src/gdi32/gdi32.vpj
===================================================================
--- trunk/src/gdi32/gdi32.vpj	(revision 47)
+++ 	(revision )
@@ -1,32 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd gdi32.dll
-execute=:Execute:E&xecute,gdi32.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-CALLBACK.CPP
-CALLBACK.H
-dibsect.cpp
-dibsect.h
-gdi32.cpp
-gdi32.DEF
-INITTERM.C
-makefile
-opengl.cpp
-..\..\include\gdi32.h
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/gdi32/initterm.c
===================================================================
--- trunk/src/gdi32/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,122 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:19:39 ktk Exp $ */
-
-/*
- * GDI32 DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen
- * Copyright 1998 Peter Fitzsimmons
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- *
- */
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"       /*PLF Wed  98-03-18 23:18:29*/
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-   size_t i;
-   APIRET rc;
-
-   /*-------------------------------------------------------------------------*/
-   /* If ulFlag is zero then the DLL is being loaded so initialization should */
-   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-   /* termination should be performed.                                        */
-   /*-------------------------------------------------------------------------*/
-
-   switch (ulFlag) {
-      case 0 :
-
-         /*******************************************************************/
-         /* The C run-time environment initialization function must be      */
-         /* called before any calls to C run-time functions that are not    */
-         /* inlined.                                                        */
-         /*******************************************************************/
-
-         if (_CRT_init() == -1)
-            return 0UL;
-         __ctordtorInit();
-
-         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-         /*******************************************************************/
-         /* A DosExitList routine must be used to clean up if runtime calls */
-         /* are required and the runtime is dynamically linked.             */
-         /*******************************************************************/
-
-         rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-         if(rc)
-                return 0UL;
-
-         break;
-      case 1 :
-         break;
-      default  :
-         return 0UL;
-   }
-
-   /***********************************************************/
-   /* A non-zero value must be returned to indicate success.  */
-   /***********************************************************/
-   return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-   __ctordtorTerm();
-   _CRT_term();
-   DosExitList(EXLST_EXIT, cleanup);
-   return ;
-}
Index: trunk/src/kernel32/LFILE.C
===================================================================
--- trunk/src/kernel32/LFILE.C	(revision 47)
+++ 	(revision )
@@ -1,240 +1,0 @@
-/* $Id: LFILE.C,v 1.2 1999-05-31 22:08:09 phaller Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * Win32 compatibility file functions for OS/2
- *
- * 1998/06/12 PH Patrick Haller (haller@zebra.fh-weingarten.de)
- *
- * @(#) LFILE.C         1.0.0	1998/06/12 PH added HandleManager support
- *                      1.1.0 1998/08/29 KSO corrected error codes and forwarded
- *                                       to Win32 file api as NT/95 does.
- */
-
-
-/*****************************************************************************
- * Includes                                                                  *
- *****************************************************************************/
-
-#include <os2win.h>
-#include "misc.h"
-
-
-/*****************************************************************************
- * Name      : HFILE WIN32API _lclose
- * Purpose   : forward call to CloseHandle
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : Depends on CloseHandle working.
- * Status    : Tested
- *
- * Author    : Patrick Haller [Fri, 1998/06/12 03:44]
- *****************************************************************************/
-
-HFILE WIN32API _lclose(HFILE arg1)
-{
-	dprintf(("KERNEL32: _lclose(%08xh)\n",
-				arg1));
-	if (CloseHandle(arg1))
-		return 0;
-	else
-		return -1;
-}
-
-
-/*****************************************************************************
- * Name      : HFILE WIN32API _lcreat
- * Purpose   : forward call to CreateFileA
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : Depends on CreateFile working.
- * Status    : Tested
- *
- * Author    : Patrick Haller [Fri, 1998/06/12 03:44]
- *****************************************************************************/
-
-HFILE WIN32API _lcreat(LPCSTR arg1,
-								  int    arg2)
-{
-	HANDLE hFile;
-	dprintf(("KERNEL32: _lcreat(%s, %08xh)\n",
-				arg1,
-				arg2));
-
-	//if (arg2 & ~(1 | 2 | 4))
-	//   dprintf(("KERNEL32: Warning: _lcreat has unknown flag(s) set - fails.\n"));
-
-	//SetLastError(0); - CreateFileA sets error
-	hFile = CreateFileA(arg1,										 /* filename */
-								  GENERIC_READ | GENERIC_WRITE,		 /* readwrite access */
-								  FILE_SHARE_READ | FILE_SHARE_WRITE,/* share all */
-								  NULL,										 /* ignore scurity */
-								  CREATE_ALWAYS,							 /* create (trunkate don't work) */
-								  arg2 & 0x3fb7,							 /* so M$ does (that is more attributes than I could find in the headers and in the docs!) */
-								  NULL);										 /* no template */
-	dprintf(("KERNEL32: _lcreat returns %d.\n", hFile));
-	return hFile;
-}
-
-
-/*****************************************************************************
- * Name      : HFILE WIN32API _lopen
- * Purpose   : forward call to CreateFileA
- * Parameters:
- * Variables :
- * Result    :
- * Remark    :
- * Status    : Tested
- *
- * Author    : Patrick Haller [Fri, 1998/06/12 03:44]
- *****************************************************************************/
-
-HFILE WIN32API _lopen(LPCSTR pszFileName,
-								 int    arg2)
-{
-	ULONG  ulAccess = 0;
-	ULONG  ulShare;
-	HANDLE hFile;
-
-	dprintf(("KERNEL32: _lopen(%s, %08xh)\n",
-				pszFileName,
-				arg2));
-
-	if (arg2 & ~(OF_READ|OF_READWRITE|OF_WRITE|OF_SHARE_COMPAT|OF_SHARE_DENY_NONE|OF_SHARE_DENY_READ|OF_SHARE_DENY_WRITE|OF_SHARE_EXCLUSIVE))
-		dprintf(("KERNEL32: (warn) _lopen has unknown flag(s) set.\n"));
-
-	/* Access */
-	ulAccess |= arg2 & OF_READ      ? GENERIC_READ                 : 0;
-	ulAccess |= arg2 & OF_WRITE     ? GENERIC_WRITE                : 0;
-	ulAccess |= arg2 & OF_READWRITE ? GENERIC_READ | GENERIC_WRITE : 0;
-
-	/* Share */
-	ulShare = arg2 & (OF_SHARE_COMPAT | OF_SHARE_DENY_NONE | OF_SHARE_DENY_READ | OF_SHARE_DENY_WRITE | OF_SHARE_EXCLUSIVE);
-	if (ulShare == OF_SHARE_DENY_READ)
-		ulShare = FILE_SHARE_WRITE;
-	else if (ulShare == OF_SHARE_DENY_WRITE)
-		ulShare = FILE_SHARE_READ;
-	else if (ulShare == OF_SHARE_DENY_NONE)
-		ulShare = FILE_SHARE_READ | FILE_SHARE_WRITE;
-	else if (ulShare == OF_SHARE_EXCLUSIVE)
-		ulShare = 0; //no share
-	else if (ulShare == OF_SHARE_COMPAT)
-		ulShare = FILE_SHARE_READ | FILE_SHARE_WRITE;
-	else
-	{
-		dprintf(("KERNEL32: _lopen - warning incorrect value for arg2 (or incorrect implementation...)\n"));
-		ulShare = 0;
-	}
-
-	hFile = CreateFileA(pszFileName,				  /* filename */
-								  ulAccess,					  /*  */
-								  ulShare,					  /*  */
-								  NULL,						  /* ignore scurity */
-								  OPEN_EXISTING,			  /* create a _new_ file - fail if exists */
-								  FILE_ATTRIBUTE_NORMAL,  /* normal attribs - no flags */ //m$ sets this to 0
-								  NULL);						  /* no template */
-
-	dprintf(("KERNEL32: _lopen returns %d.\n", hFile));
-	return hFile;
-}
-
-
-/*****************************************************************************
- * Name      : HFILE WIN32API _lread
- * Purpose   : forward call to ReadFile
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : Depend on that ReadFile works properly.
- * Status    : Tested
- *
- * Author    : Patrick Haller [Fri, 1998/06/12 03:44]
- *****************************************************************************/
-
-UINT WIN32API _lread(HFILE arg1,
-								PVOID arg2,
-								UINT  arg3)
-{
-	ULONG rc;
-
-	dprintf(("KERNEL32: _lread(%08xh, %08xh, %08xh)\n",
-				arg1,
-				arg2,
-				arg3));
-
-	if (!ReadFile(arg1, arg2, arg3, &rc, NULL))
-		rc = -1;
-	dprintf(("KERNEL32: _lread returns %d.", rc));
-
-	return rc;
-}
-
-
-/*****************************************************************************
- * Name      : HFILE WIN32API _llseek
- * Purpose   : forward call to SetFilePointer
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : Depends on SetFilePointer working
- * Status    : Tested.
- *
- * Author    : Patrick Haller [Fri, 1998/06/12 03:44]
- *****************************************************************************/
-
-LONG WIN32API _llseek(HFILE arg1,
-								 LONG  arg2,
-								 int   arg3)
-{
-	ULONG rc;
-
-	dprintf(("KERNEL32: _llseek(%08xh, %08xh, %08xh)\n",
-				arg1,
-				arg2,
-				arg3));
-	if (!(arg3 == FILE_BEGIN || arg3 == FILE_CURRENT || arg3 == FILE_END))
-	{
-		dprintf(("KERNEL32: _llseek - incorrect origin - fails.\n" ));
-		return -1;
-	}
-
-	rc = SetFilePointer(arg1, arg2, NULL, arg3);	//returns -1 on error (-1 == 0xffffffff)
-	dprintf(("KERNEL32: _llseek returns %d", rc));
-	return rc;
-}
-
-
-/*****************************************************************************
- * Name      : HFILE WIN32API _lwrite
- * Purpose   : forward call to WriteFile
- * Parameters:
- * Variables :
- * Result    :
- * Remark    : Depends on WriteFile working
- * Status    : Tested
- *
- * Author    : Patrick Haller [Fri, 1998/06/12 03:44]
- *****************************************************************************/
-
-UINT WIN32API _lwrite(HFILE arg1, LPCSTR arg2,
-		      UINT  arg3)
-{
-	ULONG rc;
-
-	dprintf(("KERNEL32: _lwrite(%08xh, %08xh, %08xh)\n",
-				arg1,
-				arg2,
-				arg3));
-
-	if (!WriteFile(arg1, (PVOID)arg2, arg3, &rc, NULL))
-		rc = -1;
-	dprintf(("KERNEL32: _lwrite returns %d.\n", rc));
-	return rc;
-}
-
Index: trunk/src/kernel32/NPIPE.C
===================================================================
--- trunk/src/kernel32/NPIPE.C	(revision 47)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/* $Id: NPIPE.C,v 1.2 1999-05-31 22:08:09 phaller Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * Win32 Named pipes API stub functions
- *
- * Copyright 1998 Sander van Leeuwen
- *
- */
-
-#include <os2win.h>
-#include "misc.h"
-
-//TODO: Not done!!
-
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API PeekNamedPipe(HANDLE hPipe, LPVOID lpvBuffer, DWORD cbBuffer,
-                                                 LPDWORD lpcbRead, LPDWORD lpcbAvail, LPDWORD lpcbMessage)
-{
-  dprintf(("PeekNamedPipe Not Implemented!\n"));
-  return(FALSE);
-}
-//******************************************************************************
-//LPSECURITY_ATTRIBUTES lpsa;   /* address of security attributes   */
-//******************************************************************************
-BOOL WIN32API CreatePipe(PHANDLE phRead, PHANDLE phWrite, LPSECURITY_ATTRIBUTES lpsa, DWORD cbPipe)
-{
-  dprintf(("CreatePipe Not Implemented!\n"));
-  return(FALSE);
-}
-//******************************************************************************
-//******************************************************************************
-HANDLE WIN32API CreateNamedPipeA(LPCTSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode,
-                    DWORD nMaxInstances, DWORD nOutBufferSize,
-                    DWORD nInBufferSize, DWORD nDefaultTimeOut,
-                    void *lpSecurityAttributes)
-{
-  dprintf(("CreateNamedPipe Not Implemented!\n"));
-  return(0);
-}
-//******************************************************************************
-//******************************************************************************
-HANDLE WIN32API CreateNamedPipeW(LPCWSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode,
-                    DWORD nMaxInstances, DWORD nOutBufferSize,
-                    DWORD nInBufferSize, DWORD nDefaultTimeOut,
-                    void *lpSecurityAttributes)
-{
-  dprintf(("CreateNamedPipe Not Implemented!\n"));
-  return(0);
-}
-//******************************************************************************
-//******************************************************************************
Index: trunk/src/kernel32/OBSOLETE.c
===================================================================
--- trunk/src/kernel32/OBSOLETE.c	(revision 47)
+++ 	(revision )
@@ -1,25 +1,0 @@
-/* $Id: OBSOLETE.c,v 1.1 1999-05-24 20:19:42 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * Win32 misc APIs
- *
- * Copyright 1998 Sander van Leeuwen
- *
- */
-#include <os2win.h>
-
-//Api's that are obsolete, but some apps might still reference them
-//(the Red Alert AUTORUN.EXE does)
-/******************************************************************************/
-/******************************************************************************/
-BOOL WIN32API FreeResource(HGLOBAL hResData)
-{
-  return(TRUE);
-}
-/******************************************************************************/
-/******************************************************************************/
Index: trunk/src/kernel32/OS2NATIVE.c
===================================================================
--- trunk/src/kernel32/OS2NATIVE.c	(revision 47)
+++ 	(revision )
@@ -1,358 +1,0 @@
-/* $Id: OS2NATIVE.c,v 1.1 1999-05-24 20:19:42 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * Misc procedures
- *
- * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
- * Copyright 1998 Knut St. Osmundsen
- * Copyright 1998 Peter FitzSimmons
- *
- */
-#define INCL_BASE
-#define INCL_DOSEXCEPTIONS
-#define INCL_DOSMEMMGR
-#define INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#ifdef __IBMC__
-#include <builtin.h>
-#endif
-#include <win32type.h>
-#include "misc.h"
-#include "exceptions.h"
-
-#define PAGE_NOACCESS          0x01
-#define PAGE_READONLY          0x02
-#define PAGE_READWRITE         0x04
-#define PAGE_WRITECOPY         0x08
-#define PAGE_EXECUTE           0x10
-#define PAGE_EXECUTE_READ      0x20
-#define PAGE_EXECUTE_READWRITE 0x40
-#define PAGE_EXECUTE_WRITECOPY 0x80
-#define PAGE_GUARD            0x100
-#define PAGE_NOCACHE          0x200
-#define MEM_COMMIT           0x1000
-#define MEM_RESERVE          0x2000
-#define MEM_DECOMMIT         0x4000
-#define MEM_RELEASE          0x8000
-#define MEM_TOP_DOWN       0x100000             //Ignored
-
-extern ULONG flAllocMem;    /* Tue 03.03.1998: knut */
-
-#ifdef DEBUG
-ULONG commit = 0, reserve = 0;
-#endif
-//******************************************************************************
-extern ULONG _System timeGetTime();
-
-//******************************************************************************
-LPVOID WIN32API VirtualAlloc(LPVOID lpvAddress, DWORD cbSize, DWORD fdwAllocationType,
-                                 DWORD fdwProtect)
-{
- PVOID Address = lpvAddress;
- ULONG flag = 0;
- APIRET rc;
-
-  dprintf(("VirtualAlloc at %X; %d bytes, fAlloc %d, fProtect %d\n", (int)lpvAddress, cbSize, fdwAllocationType, fdwProtect));
-
-  if(fdwAllocationType & MEM_COMMIT) {
-        dprintf(("VirtualAlloc: commit\n"));
-        flag = PAG_COMMIT;
-  }
-  if(fdwProtect & PAGE_READONLY)     flag |= PAG_READ;
-  if(fdwProtect & PAGE_READWRITE)    flag |= (PAG_READ | PAG_WRITE);
-  if(fdwProtect & PAGE_EXECUTE_READ) flag |= PAG_EXECUTE;
-  if(fdwProtect & PAGE_GUARD)        flag |= PAG_GUARD;
-
-  //just do this if other options are used
-  if(!(flag & (PAG_READ | PAG_WRITE | PAG_EXECUTE)) || flag == 0)
-        flag |= PAG_READ | PAG_WRITE;
-
-  if(fdwAllocationType & MEM_COMMIT && lpvAddress != NULL) {
-        Address = lpvAddress;
-
-#if 0
-        rc = DosSetMem(lpvAddress, cbSize, PAG_COMMIT | PAG_READ | PAG_WRITE);
-        if(rc != 0)
-                return(NULL);
-#else
-        rc = DosSetMem(lpvAddress, cbSize, flag);
-        //might try to commit larger part with same base address
-    if(rc == ERROR_ACCESS_DENIED && cbSize > 4096 ) {//knut: AND more than one page
-        char *newbase = (char *)lpvAddress + ((cbSize-1) & 0xFFFFF000); //knut: lets not start after the last page!
-                ULONG size, os2flags;
-
-        while(newbase >= (char *)lpvAddress) {  //knut: should check first page to!!
-                        size     = 4096;
-                        os2flags = 0;
-                        rc = DosQueryMem(newbase, &size, &os2flags);
-                        if(rc)  break;
-                        if(os2flags & PAG_COMMIT) {
-                                newbase += 4096;
-                                break;
-                        }
-                        newbase -= 4096;
-                }
-                if(rc == 0) {
-#ifdef DEBUG1
-                        dprintf(("Found new base %X, flag %d\n", newbase, flag));
-                        dprintf(("Commit %d bytes extra\n", cbSize - ((int)newbase - (int)lpvAddress)));
-#endif
-                        //In case it wants to commit bytes that fall into the last
-                        //page of the previous commit command
-                        if(cbSize > ((int)newbase - (int)lpvAddress)) {
-#ifdef DEBUG
-                                ULONG ressize = cbSize - ((int)newbase - (int)lpvAddress);
-                                if(ressize & 0xFFF) {
-                                        ressize = ((ressize >> 12) + 1)*4096;
-                                }
-                                else    ressize = (ressize >> 12)*4096;
-                                reserve += ressize;
-#endif
-                                rc = DosSetMem(newbase, cbSize - ((int)newbase - (int)lpvAddress), flag);
-                        }
-                }
-                else    return(NULL);
-        }
-#ifdef DEBUG
-        else {
-                ULONG ressize = cbSize;
-                if(ressize & 0xFFF) {
-                        ressize = ((ressize >> 12) + 1)*4096;
-                }
-                else    ressize = (ressize >> 12)*4096;
-                reserve += ressize;
-        }
-#endif
-#endif
-  }
-  else {
-#ifdef DEBUG
-        commit += cbSize;
-#endif
-    /*knut: flAllocMem */
-    rc = DosAllocMem(&Address, cbSize, flag | flAllocMem );
-  }
-
-//TODO: Set last error in case rc != 0
-  if(rc) {
-        dprintf(("DosSetMem returned %d\n", rc));
-        return(NULL);
-  }
-
-  dprintf(("VirtualAlloc returned %X\n", Address));
-  return(Address);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API VirtualFree(LPVOID lpvAddress, DWORD cbSize, DWORD FreeType)
-{
- APIRET rc;
-
-  dprintf(("VirtualFree at %d; %d bytes, freetype %d\n", (int)lpvAddress, cbSize, FreeType));
-
-  if(FreeType & MEM_DECOMMIT) {
-        rc = DosSetMem(lpvAddress, cbSize, PAG_DECOMMIT);
-  }
-  else  rc = DosFreeMem(lpvAddress);    //MEM_RELEASE, cbSize == 0 (or should be)
-
-//TODO: Set last error in case rc != 0
-  if(rc)        return(FALSE);
-  return(TRUE);
-}
-//******************************************************************************
-//LPVOID lpvAddress;            /* address of region of committed pages */
-//DWORD  cbSize;                /* size of the region   */
-//DWORD  fdwNewProtect;         /* desired access protection    */
-//PDWORD pfdwOldProtect;        /* address of variable to get old protection    */
-//TODO: Not 100% complete
-//TODO: SetLastError on failure
-//******************************************************************************
-BOOL WIN32API VirtualProtect(LPVOID lpvAddress, DWORD cbSize, DWORD fdwNewProtect,
-                                DWORD *pfdwOldProtect)
-{
- APIRET rc;
- ULONG  pageFlags = 0;
- int npages;
-
-  dprintf(("VirtualProtect %X; %d bytes, new flags %X (%X)\n", (int)lpvAddress, cbSize, fdwNewProtect, pfdwOldProtect));
-//  _interrupt(3);
-  if(pfdwOldProtect == NULL)
-        return(FALSE);
-
-  rc = DosQueryMem(lpvAddress, &cbSize, &pageFlags);
-  if(rc) {
-        dprintf(("DosQueryMem returned %d\n", rc));
-        return(FALSE);
-  }
-  dprintf(("Old memory flags %X\n", pageFlags));
-  *pfdwOldProtect = 0;
-  if(pageFlags & PAG_READ && !(pageFlags & PAG_WRITE))
-        *pfdwOldProtect |= PAGE_READONLY;
-  if(pageFlags & (PAG_READ | PAG_WRITE))
-        *pfdwOldProtect |= PAGE_READWRITE;
-  if(pageFlags & PAG_EXECUTE)
-        *pfdwOldProtect |= PAGE_EXECUTE_READ;
-  if(pageFlags & PAG_GUARD)
-        *pfdwOldProtect |= PAGE_GUARD;
-  pageFlags = 0;
-
-  if(fdwNewProtect & PAGE_READONLY)     pageFlags |= PAG_READ;
-  if(fdwNewProtect & PAGE_READWRITE)    pageFlags |= (PAG_READ | PAG_WRITE);
-  if(fdwNewProtect & PAGE_EXECUTE_READ) pageFlags |= PAG_EXECUTE;
-  if(fdwNewProtect & PAGE_EXECUTE_READWRITE)
-        pageFlags |= (PAG_EXECUTE | PAG_WRITE);
-  if(fdwNewProtect & PAGE_GUARD)        pageFlags |= PAG_GUARD;
-//Not supported in OS/2??
-//  if(fdwNewProtect & PAGE_NOACCESS)
-
-  dprintf(("New memory flags %X\n", pageFlags));
-  if(pageFlags == 0) {
-        dprintf(("pageFlags == 0\n"));
-        return(TRUE);   //nothing to do
-  }
-  npages = ((int)lpvAddress + cbSize >> 12) - ((int)lpvAddress >> 12) + 1;
-
-  lpvAddress = (LPVOID)((int)lpvAddress & ~0xFFF);
-  cbSize     = npages*4096;
-  dprintf(("lpvAddress = %X, cbSize = %d\n", lpvAddress, cbSize));
-
-  rc = DosSetMem(lpvAddress, cbSize, pageFlags);
-  if(rc) {
-        dprintf(("DosSetMem returned %d\n", rc));
-        return(FALSE);
-  }
-  return(TRUE);
-}
-//******************************************************************************
-#define PMEMORY_BASIC_INFORMATION void *
-//******************************************************************************
-DWORD WIN32API VirtualQuery(LPVOID lpvAddress, PMEMORY_BASIC_INFORMATION pmbiBuffer,
-                               DWORD cbLength)
-{
-  dprintf(("VirtualQuery - stub\n"));
-  return(0);
-}
-//******************************************************************************
-//******************************************************************************
-#ifdef __WATCOMC__  /*PLF Sat  97-06-21 17:12:36*/
-    extern void interrupt3( void );
-    #pragma aux interrupt3= \
-              "int 3"
-#endif
-void WIN32API DebugBreak()
-{
-  dprintf(("DebugBreak\n"));
-#ifdef __WATCOMC__
-  interrupt3();
-#else
-  _interrupt(3);
-#endif
-}
-//******************************************************************************
-//TODO: Implement this??
-//******************************************************************************
-BOOL WIN32API GetThreadContext(HANDLE hThread, LPWINCONTEXT lpContext)
-{
-  dprintf(("GetThreadContext NOT IMPLEMENTED!! (TRUE)\n"));
-  memset(lpContext, 0, sizeof(WINCONTEXT));
-  return TRUE;
-}
-//******************************************************************************
-//TODO: Implement this??
-//******************************************************************************
-BOOL WIN32API SetThreadContext(HANDLE hThread, LPWINCONTEXT lpContext)
-{
-  dprintf(("SetThreadContext NOT IMPLEMENTED!!\n"));
-
-  return FALSE;
-}
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API VirtualLock( LPVOID lpAddress, DWORD dwSize )
-{
-  dprintf(("VirtualLock at %d; %d bytes - stub (TRUE)\n", (int)lpAddress, dwSize));
-  return TRUE;
-}
-
-//******************************************************************************
-BOOL WIN32API VirtualUnlock( LPVOID lpAddress, DWORD dwSize )
-{
-  dprintf(("VirtualUnlock at %d; %d bytes - stub (TRUE)\n", (int)lpAddress, dwSize));
-  return TRUE;
-}
-
-
-/*****************************************************************************
- * Name      : BOOL VirtualProtectEx
- * Purpose   : The VirtualProtectEx function changes the access protection on
- *             a region of committed pages in the virtual address space of a specified
- *             process. Note that this function differs from VirtualProtect,
- *             which changes the access protection on the calling process only.
- * Parameters: HANDLE hProcess       handle of process
- *             LPVOID lpvAddress     address of region of committed pages
- *             DWORD  cbSize         size of region
- *             DWORD  fdwNewProtect  desired access protection
- *             PDWORD pfdwOldProtect address of variable to get old protection
- * Variables :
- * Result    : size of target buffer
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
- *****************************************************************************/
-
-BOOL WIN32API VirtualProtectEx(HANDLE hProcess,
-                                  LPVOID lpvAddress,
-                                  DWORD  cbSize,
-                                  DWORD  fdwNewProtect,
-                                  LPDWORD pfdwOldProtect)
-{
-  dprintf(("KERNEL32: VirtualProtectEx(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
-           hProcess,
-           lpvAddress,
-           cbSize,
-           fdwNewProtect,
-           pfdwOldProtect));
-
-  return (FALSE);
-}
-
-
-/*****************************************************************************
- * Name      : DWORD VirtualQueryEx
- * Purpose   : The VirtualQueryEx function provides information about a range
- *             of pages within the virtual address space of a specified process.
- * Parameters: HANDLE  hProcess                     handle of process
- *             LPCVOID  lpvAddress                  address of region
- *             PMEMORY_BASIC_INFORMATION pmbiBuffer address of information buffer
- *             DWORD  cbLength                      size of buffer
- * Variables :
- * Result    : number of bytes returned in buffer
- * Remark    :
- * Status    : UNTESTED STUB
- *
- * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
- *****************************************************************************/
-
-DWORD WIN32API VirtualQueryEx(HANDLE  hProcess,
-                                 LPVOID  lpvAddress,
-                                 PMEMORY_BASIC_INFORMATION pmbiBuffer,
-                                 DWORD   cbLength)
-{
-  dprintf(("KERNEL32: VirtualQueryEx(%08x,%08xh,%08xh,%08xh) not implemented.\n",
-           hProcess,
-           lpvAddress,
-           pmbiBuffer,
-           cbLength));
-
-  return (0);
-}
-
Index: trunk/src/kernel32/THUNK.C
===================================================================
--- trunk/src/kernel32/THUNK.C	(revision 47)
+++ 	(revision )
@@ -1,181 +1,0 @@
-/* $Id: THUNK.C,v 1.2 1999-05-31 22:08:09 phaller Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * Win32 thunking API functions (mostly stubs)
- *
- * Copyright 1998 Patrick Haller (stubs + Wine port) (?)
- *
- * Original WINE code (win32\kernel32.c)
- *
- * KERNEL32 thunks and other undocumented stuff
- *
- * Copyright 1997-1998 Marcus Meissner
- * Copyright 1998      Ulrich Weigand
- */
-#include <os2win.h>
-#include <string.h>
-#include <builtin.h>
-#include "thunk.h"
-#include "misc.h"
-
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API MapLS(void *address)
-{
-//  _interrupt(3);
-  dprintf(("MapLS %X, not supported\n", address));
-  return((DWORD)address);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API ThunkProc(DWORD arg1)
-{
-  dprintf(("ThunkProc - stub\n"));
-  return(0);
-}
-//******************************************************************************
-//******************************************************************************
-void WIN32API FT_Prolog(CONTEXT *context)
-{
-  dprintf(("FT_Prolog - stub\n"));
-}
-//******************************************************************************
-//******************************************************************************
-/**********************************************************************
- *      QT_Thunk            (KERNEL32)
- *
- * The target address is in EDX.
- * The 16 bit arguments start at ESP+4.
- * The number of 16bit argumentbytes is EBP-ESP-0x44 (68 Byte thunksetup).
- * [ok]
- */
-VOID WIN32API QT_Thunk(CONTEXT *context)
-{
-    dprintf(("QT_Thunk\n"));
-#if 0
-    CONTEXT context16;
-    DWORD   argsize;
-
-    memcpy(&context16,context,sizeof(context16));
-
-    CS_reg(&context16)   = HIWORD(EDX_reg(context));
-    IP_reg(&context16)   = LOWORD(EDX_reg(context));
-
-    argsize = EBP_reg(context)-ESP_reg(context)-0x44;
-
-    /* additional 4 bytes used by the relaycode for storing the stackptr */
-    memcpy( ((LPBYTE)CURRENT_STACK16)-argsize-4,
-        (LPBYTE)ESP_reg(context)+4,
-        argsize
-    );
-    EAX_reg(context) = CallTo16_regs_short(&context16,-argsize);
-#endif
-}
-//******************************************************************************
-/***********************************************************************
- * Generates a FT_Prolog call.
- *
- *  0FB6D1                  movzbl edx,cl
- *  8B1495xxxxxxxx      mov edx,[4*edx + xxxxxxxx]
- *  68xxxxxxxx          push FT_Prolog
- *  C3              lret
- */
-static void _write_ftprolog(LPBYTE thunk,DWORD thunkstart)
-{
- LPBYTE x;
-
-  x = thunk;
-  *x++  = 0x0f;*x++=0xb6;*x++=0xd1; /* movzbl edx,cl */
-  *x++  = 0x8B;*x++=0x14;*x++=0x95;*(DWORD*)x= thunkstart;
-  x+=4; /* mov edx, [4*edx + thunkstart] */
-  *x++  = 0x68; *(DWORD*)x = (DWORD)FT_Prolog;
-  x+=4;     /* push FT_Prolog */
-  *x++  = 0xC3;     /* lret */
-  /* fill rest with 0xCC / int 3 */
-}
-//******************************************************************************
-/***********************************************************************
- * Generates a QT_Thunk style call.
- *
- *  33C9                    xor ecx, ecx
- *  8A4DFC                  mov cl , [ebp-04]
- *  8B148Dxxxxxxxx          mov edx, [4*ecx + (EAX+EDX)]
- *  B8yyyyyyyy              mov eax, QT_Thunk
- *  FFE0                    jmp eax
- */
-static void _write_qtthunk(LPBYTE start,DWORD thunkstart)
-{
- LPBYTE x;
-
-  x = start;
-  *x++  = 0x33;*x++=0xC9; /* xor ecx,ecx */
-  *x++  = 0x8A;*x++=0x4D;*x++=0xFC; /* movb cl,[ebp-04] */
-  *x++  = 0x8B;*x++=0x14;*x++=0x8D;*(DWORD*)x= thunkstart;
-  x+=4; /* mov edx, [4*ecx + (EAX+EDX) */
-  *x++  = 0xB8; *(DWORD*)x = (DWORD)QT_Thunk;
-  x+=4;     /* mov eax , QT_Thunk */
-  *x++  = 0xFF; *x++ = 0xE0;    /* jmp eax */
-  /* should fill the rest of the 32 bytes with 0xCC */
-}
-
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API ThunkConnect32(thunkstruct *ths,  LPSTR thunkfun16,
-                                 LPSTR module16, LPSTR module32, HMODULE hmod32,
-                                 DWORD dllinitarg1 )
-{
- thunkstruct *ths16;
-
-//  _interrupt(3);
-  dprintf(("ThunkConnect32 %s %s %s not supported\n", thunkfun16, module16, module32));
-
-  if(strncmp(ths->magic,"SL01",4) && strncmp(ths->magic,"LS01",4))
-    return 0;
-
-  ths16 = (thunkstruct *)LocalAlloc(LPTR, ths->length);
-  ths16->length = ths->length;
-  ths16->ptr    = (DWORD)ThunkProc;
-
-  if(!strncmp(ths->magic,"SL01",4))  {
-    ths->x0C = (DWORD)ths16;
-    *(DWORD *)ths16->magic  = 0x0000304C;
-  }
-  if(!strncmp(ths->magic,"LS01",4))  {
-    ths->ptr = ths16->ptr;
-    /* code offset for QT_Thunk is at 0x1C...  */
-    _write_qtthunk (((LPBYTE)ths) + ths->x1C,ths->ptr);
-
-    /* code offset for FT_Prolog is at 0x20...  */
-    _write_ftprolog(((LPBYTE)ths) + ths->x20,ths->ptr);
-    return 1;
-  }
-  return TRUE;
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API K32Thk1632Prolog(DWORD arg1)
-{
-  dprintf(("OS2K32Thk1632Prolog %X not supported\n", arg1));
-  return(0);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API K32Thk1632Epilog(DWORD arg1)
-{
-  dprintf(("K32Thk1632Epilog %X not supported\n", arg1));
-  return(0);
-}
-//******************************************************************************
-//******************************************************************************
-DWORD WIN32API MapSLFix(DWORD arg1)
-{
-  dprintf(("MapSLFix %X not supported\n", arg1));
-  return(0);
-}
-//******************************************************************************
-//******************************************************************************
Index: trunk/src/kernel32/comm.c
===================================================================
--- trunk/src/kernel32/comm.c	(revision 47)
+++ 	(revision )
@@ -1,246 +1,0 @@
-/* $Id: comm.c,v 1.2 1999-05-31 22:08:10 phaller Exp $ */
-
-/*
- * PE2LX dialog conversion code
- *
- * Copyright 1998 Patrick Haller (?)
- * Copyright 1998 Felix Maschek	 (?)
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * *Comm* stubs
- */
-#include <os2win.h>
-#include "unicode.h"
-#include "misc.h"
-
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API BuildCommDCBA( LPCSTR lpDef, LPDCB lpDCB )
-{
-  dprintf(("BuildCommDCBA Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API BuildCommDCBW( LPCWSTR lpDef, LPDCB lpDCB )
-{
-  dprintf(("BuildCommDCBW Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API BuildCommDCBAndTimeoutsA( LPCSTR lpDef, LPDCB lpDCB, LPCOMMTIMEOUTS lpCommTimeouts )
-{
-  dprintf(("BuildCommDCBAndTimeoutsA Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API BuildCommDCBAndTimeoutsW( LPCWSTR lpDef, LPDCB lpDCB, LPCOMMTIMEOUTS lpCommTimeouts )
-{
-  dprintf(("BuildCommDCBAndTimeoutsW Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API CommConfigDialogA( LPCSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC )
-{
-  dprintf(("CommConfigDialogA Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API CommConfigDialogW( LPCWSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC )
-{
-  dprintf(("CommConfigDialogW Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API GetDefaultCommConfigA( LPCSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize )
-{
-  dprintf(("GetDefaultCommConfigA Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API GetDefaultCommConfigW( LPCWSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize )
-{
-  dprintf(("GetDefaultCommConfigW Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API SetDefaultCommConfigA( LPCSTR lpszName, LPCOMMCONFIG lpCC, DWORD dwSize )
-{
-  dprintf(("SetDefaultCommConfigA Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API SetDefaultCommConfigW( LPCWSTR lpszName, LPCOMMCONFIG lpCC, DWORD dwSize )
-{
-  dprintf(("SetDefaultCommConfigW Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API ClearCommBreak( HANDLE hFile )
-{
-  dprintf(("ClearCommBreak Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API SetupComm( HANDLE hFile, DWORD dwInQueue, DWORD dwOutQueue )
-{
-  dprintf(("SetupComm Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API EscapeCommFunction( HANDLE hFile, UINT dwFunc )
-{
-  dprintf(("EscapeCommFunction Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API GetCommConfig( HANDLE hCommDev, LPCOMMCONFIG lpCC, LPDWORD lpdwSize )
-{
-  dprintf(("GetCommConfig Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API GetCommModemStatus( HANDLE hFile, LPDWORD lpModemStat )
-{
-  dprintf(("GetCommModemStatus Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API SetCommBreak( HANDLE hFile )
-{
-  dprintf(("SetCommBreak Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API SetCommConfig( HANDLE hCommDev, LPCOMMCONFIG lpCC, DWORD dwSize )
-{
-  dprintf(("SetCommConfig Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API TransmitCommChar( INT hFile, CHAR cChar )
-{
-  dprintf(("TransmitCommChar Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API SetCommTimeouts(INT hCommDev, LPCOMMTIMEOUTS lpctmo)
-{
-  dprintf(("OS2SetCommTimeouts Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API GetCommTimeouts(INT hCommDev, LPCOMMTIMEOUTS lpctmo)
-{
-  dprintf(("OS2GetCommTimeouts Not implemented\n"));
-  return(FALSE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API GetCommState(INT hCommDev, LPDCB lpdcb)
-{
-  dprintf(("OS2GetCommState Not implemented\n"));
-  return(FALSE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API SetCommState(INT hCommDev, LPDCB lpdcb)
-{
-  dprintf(("OS2SetCommState Not implemented\n"));
-  return(FALSE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API ClearCommError(INT hCommDev, LPDWORD lpdwErrors, LPCOMSTAT lpcst)
-{
-  dprintf(("OS2ClearCommError Not implemented\n"));
-  return(FALSE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API PurgeComm(HANDLE hCommDev, DWORD fdwAction)
-{
-  dprintf(("OS2PurgeComm Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API SetCommMask(INT hCommDev, DWORD fdwEvtMask)
-{
-  dprintf(("SetCommMask Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API GetCommMask(HANDLE hCommDev, LPDWORD fdwEvtMask)
-{
-  dprintf(("GetCommMask Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API GetCommProperties(HANDLE hCommDev, LPCOMMPROP lpcmmp)
-{
-  dprintf(("GetCommProperties Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
-BOOL WIN32API WaitCommEvent(HANDLE hCommDev, LPDWORD lpfdwEvtMask,
-                   LPOVERLAPPED lpo)
-{
-  dprintf(("WaitCommEvent Not implemented (TRUE)\n"));
-  return(TRUE);
-}
-
-//------------------------------------------------------------------------------
-
Index: trunk/src/kernel32/devio.c
===================================================================
--- trunk/src/kernel32/devio.c	(revision 47)
+++ 	(revision )
@@ -1,300 +1,0 @@
-/* $Id: devio.c,v 1.1 1999-05-24 20:19:46 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * Win32 Device IOCTL API functions for OS/2
- *
- * Copyright 1998 Sander van Leeuwen
- *
- */
-#define INCL_DOSPROFILE
-#define INCL_DOSDEVICES
-#define INCL_DOSDEVIOCTL
-#define INCL_GPI
-#define INCL_DOSFILEMGR          /* File Manager values      */
-#define INCL_DOSERRORS           /* DOS Error values         */
-#define INCL_DOSPROCESS          /* DOS Process values       */
-#define INCL_DOSMISC             /* DOS Miscellanous values  */
-#include <os2.h>
-#include <string.h>
-
-#include <win32type.h>
-#include "misc.h"
-#include "devio.h"
-#include "cio.h"
-#include "map.h"
-#include "except.h"
-#include <builtin.h>
-
-static fX86Init  = FALSE;
-//SvL: Used in iccio.asm (how can you put these in the .asm data segment without messing things up?)
-ULONG  ioentry   = 0;
-USHORT gdt       = 0;
-char   devname[] = "/dev/fastio$";
-
-static BOOL GpdDevIOCtl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
-static BOOL MAPMEMIOCtl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
-static BOOL FXMEMMAPIOCtl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
-
-static WIN32DRV knownDriver[] =
-    {{"GpdDev", "", TRUE, 666,          GpdDevIOCtl},
-    {"MAPMEM", "PMAP$", FALSE, 0,       MAPMEMIOCtl},
-    {"FXMEMMAP.VXD", "PMAP$", FALSE, 0,     FXMEMMAPIOCtl}};
-
-static int nrKnownDrivers = sizeof(knownDriver)/sizeof(WIN32DRV);
-
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode,
-                 LPVOID lpInBuffer, DWORD nInBufferSize,
-                 LPVOID lpOutBuffer, DWORD nOutBufferSize,
-                 LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped)
-{
- int i;
-
-  for(i=0;i<nrKnownDrivers;i++) {
-    if(hDevice == knownDriver[i].hDevice) {
-        return knownDriver[i].devIOCtl(hDevice, dwIoControlCode,
-                           lpInBuffer, nInBufferSize,
-                           lpOutBuffer, nOutBufferSize,
-                           lpBytesReturned, lpOverlapped);
-    }
-  }
-  dprintf(("DeviceIoControl: Device not found!\n"));
-  return(FALSE);
-}
-//******************************************************************************
-//******************************************************************************
-static BOOL GpdDevIOCtl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped)
-{
- ULONG port, val = 0;
-
-  if(fX86Init == FALSE) {
-    if(io_init() == 0)
-        fX86Init = TRUE;
-    else    return(FALSE);
-  }
-
-  *lpBytesReturned = 0;
-
-  port = ((GENPORT_WRITE_INPUT *)lpInBuffer)->PortNumber;
-
-  switch((dwIoControlCode >> 2) & 0xFFF) {
-    case IOCTL_GPD_READ_PORT_UCHAR:
-        if(nOutBufferSize < sizeof(char))
-            return(FALSE);
-
-        val = c_inb(port);
-        *(char *)lpOutBuffer = val;
-        *lpBytesReturned = sizeof(char);
-        break;
-    case IOCTL_GPD_READ_PORT_USHORT:
-        if(nOutBufferSize < sizeof(USHORT))
-            return(FALSE);
-
-        val = c_inw(port);
-        *(USHORT *)lpOutBuffer = val;
-        *lpBytesReturned = sizeof(USHORT);
-        break;
-    case IOCTL_GPD_READ_PORT_ULONG:
-        if(nOutBufferSize < sizeof(ULONG))
-            return(FALSE);
-
-        val = c_inl(port);
-        *(ULONG *)lpOutBuffer = val;
-        *lpBytesReturned = sizeof(ULONG);
-        break;
-    case IOCTL_GPD_WRITE_PORT_UCHAR:
-        val   = ((GENPORT_WRITE_INPUT *)lpInBuffer)->CharData;
-        c_outb(port, val);
-        break;
-    case IOCTL_GPD_WRITE_PORT_USHORT:
-        val   = ((GENPORT_WRITE_INPUT *)lpInBuffer)->ShortData;
-        c_outw(port, val);
-        break;
-    case IOCTL_GPD_WRITE_PORT_ULONG:
-        val   = ((GENPORT_WRITE_INPUT *)lpInBuffer)->LongData;
-        c_outl(port, val);
-        break;
-    default:
-        dprintf(("GpdDevIOCtl unknown func %X\n", (dwIoControlCode >> 2) & 0xFFF));
-        return(FALSE);
-  }
-
-  return(TRUE);
-}
-//******************************************************************************
-//******************************************************************************
-static BOOL MAPMEMIOCtl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped)
-{
- PHYSICAL_MEMORY_INFO *meminfo = (PHYSICAL_MEMORY_INFO *)lpInBuffer;
- struct map_ioctl memmap;
-
-  *lpBytesReturned = 0;
-
-  switch((dwIoControlCode >> 2) & 0xFFF) {
-    case IOCTL_MAPMEM_MAP_USER_PHYSICAL_MEMORY:
-        if(nInBufferSize != sizeof(PHYSICAL_MEMORY_INFO))
-            return(FALSE);
-
-        memmap.a.phys = meminfo->BusAddress.u.LowPart;
-        memmap.size = meminfo->Length;
-        dprintf(("DeviceIoControl map phys address %X length %X\n", memmap.a.phys, memmap.size));
-        if(mpioctl((HFILE)hDevice, IOCTL_MAP, &memmap) == -1) {
-            dprintf(("mpioctl failed!\n"));
-            return(FALSE);
-        }
-
-        dprintf(("DeviceIoControl map virt address = %X\n", memmap.a.user));
-        *(ULONG *)lpOutBuffer = (ULONG)memmap.a.user;
-        break;
-    case IOCTL_MAPMEM_UNMAP_USER_PHYSICAL_MEMORY:
-        dprintf(("Unmap mapping %X\n", *(ULONG *)lpInBuffer));
-        memmap.a.phys = *(ULONG *)lpInBuffer;
-        memmap.size = 0;
-        if(mpioctl((HFILE)hDevice, IOCTL_MAP, &memmap) == -1)
-            return(FALSE);
-        break;
-    default:
-        dprintf(("MAPMEMIOCtl unknown func %X\n", (dwIoControlCode >> 2) & 0xFFF));
-        return(FALSE);
-  }
-
-  return(TRUE);
-}
-//******************************************************************************
-//******************************************************************************
-static BOOL FXMEMMAPIOCtl(HANDLE hDevice, DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped)
-{
- struct map_ioctl memmap;
- MAPDEVREQUEST *vxdmem = (MAPDEVREQUEST *)lpInBuffer;
-
-  switch(dwIoControlCode) {
-    case 1:
-        break;
-    case 2:
-//      _interrupt(3);
-        memmap.a.phys = (DWORD)vxdmem->mdr_PhysicalAddress;
-        memmap.size = vxdmem->mdr_SizeInBytes;
-        dprintf(("DeviceIoControl map phys address %X length %X\n", memmap.a.phys, memmap.size));
-        if(mpioctl((HFILE)hDevice, IOCTL_MAP, &memmap) == -1) {
-            dprintf(("mpioctl failed!\n"));
-            return(FALSE);
-        }
-
-        dprintf(("DeviceIoControl map virt address = %X\n", memmap.a.user));
-        vxdmem->mdr_LinearAddress = (PVOID)memmap.a.user;
-        break;
-    default:
-        dprintf(("FXMEMMAPIOCtl unknown func %X\n", (dwIoControlCode >> 2) & 0xFFF));
-        return(FALSE);
-  }
-
-  return(TRUE);
-}
-//******************************************************************************
-//******************************************************************************
-void OS2CloseFile(HANDLE hDevice)
-{
-  DosClose((HFILE)hDevice);
-}
-//******************************************************************************
-//******************************************************************************
-HANDLE OS2CreateFile(char *szName, DWORD fdwAccess, DWORD fdwShareMode)
-{
- APIRET rc;
- int    i;
- char  *drvname = NULL;
- HFILE  hfFileHandle   = 0L;     /* Handle for file being manipulated */
- ULONG  ulAction       = 0;      /* Action taken by DosOpen */
- ULONG  sharetype = 0;
-
-  for(i=0;i<nrKnownDrivers;i++) {
-    if(strcmp(szName, knownDriver[i].szWin32Name) == 0) {
-        drvname = knownDriver[i].szOS2Name;
-        break;
-    }
-  }
-  if(drvname == 0) {
-    return(0);
-  }
-
-  //TODO
-  if(knownDriver[i].fCreateFile == TRUE)
-    return(knownDriver[i].hDevice);
-
-  if(fdwAccess & (GENERIC_READ | GENERIC_WRITE))
-    sharetype |= OPEN_ACCESS_READWRITE;
-  else
-  if(fdwAccess & GENERIC_WRITE)
-    sharetype |= OPEN_ACCESS_WRITEONLY;
-
-  if(fdwShareMode == 0)
-    sharetype |= OPEN_SHARE_DENYREADWRITE;
-  else
-  if(fdwShareMode & (FILE_SHARE_READ | FILE_SHARE_WRITE))
-    sharetype |= OPEN_SHARE_DENYNONE;
-  else
-  if(fdwShareMode & FILE_SHARE_WRITE)
-    sharetype |= OPEN_SHARE_DENYREAD;
-  else
-  if(fdwShareMode & FILE_SHARE_READ)
-    sharetype |= OPEN_SHARE_DENYWRITE;
-
-  rc = DosOpen(	drvname,                        /* File path name */
-               	&hfFileHandle,                  /* File handle */
-               	&ulAction,                      /* Action taken */
-	       	0,
-         	FILE_NORMAL,
-           	FILE_OPEN,
-           	sharetype,
-               	0L);                            /* No extended attribute */
-
-  dprintf(("DosOpen %s returned %d\n", drvname, rc));
-
-  if(rc == NO_ERROR) {
-    knownDriver[i].hDevice = (DWORD)hfFileHandle;
-    return((HANDLE)hfFileHandle);
-  }
-  else  return(0);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)
-{
- QWORD  time;
- APIRET rc;
-
-  rc = DosTmrQueryTime(&time);
-  if(rc) {
-    dprintf(("DosTmrQueryTime returned %d\n", rc));
-    return(FALSE);
-  }
-  lpPerformanceCount->u.LowPart  = time.ulLo;
-  lpPerformanceCount->u.HighPart = time.ulHi;
-  return(TRUE);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency)
-{
- APIRET  rc;
- ULONG   freq;
-
-  rc = DosTmrQueryFreq(&freq);
-  if(rc) {
-    dprintf(("DosTmrQueryFreq returned %d\n", rc));
-    return(FALSE);
-  }
-  lpFrequency->u.LowPart  = freq;
-  lpFrequency->u.HighPart = 0;
-  dprintf(("OS2QueryPerformanceFrequency returned 0x%X%X\n", lpFrequency->u.HighPart, lpFrequency->u.LowPart));
-  return(TRUE);
-}
-//******************************************************************************
-//******************************************************************************
-
Index: trunk/src/kernel32/initterm.c
===================================================================
--- trunk/src/kernel32/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,153 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:19:41 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * KERNEL32 DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen
- * Copyright 1998 Peter Fitzsimmons
- *
- */
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSMISC
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-extern void APIENTRY Win32DllExitList(ULONG reason);
-
-/* Tue 03.03.1998: knut */
-/* flag to optimize DosAllocMem to use all the memory on SMP machines */
-ULONG flAllocMem;
-
-#ifndef PAG_ANY
-    #define PAG_ANY    0x00000400
-#endif
-
-#ifndef QSV_VIRTUALADDRESSLIMIT
-    #define QSV_VIRTUALADDRESSLIMIT 30
-#endif
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-    size_t i;
-    APIRET rc;
-    ULONG sysinfo;
-
-    /*-------------------------------------------------------------------------*/
-    /* If ulFlag is zero then the DLL is being loaded so initialization should */
-    /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-    /* termination should be performed.                                        */
-    /*-------------------------------------------------------------------------*/
-
-    switch (ulFlag)
-    {
-        case 0 :
-
-            /*******************************************************************/
-            /* The C run-time environment initialization function must be      */
-            /* called before any calls to C run-time functions that are not    */
-            /* inlined.                                                        */
-            /*******************************************************************/
-
-            if (_CRT_init() == -1)
-                return 0UL;
-            __ctordtorInit();
-
-            dprintf(("kernel32 init\n"));
-            CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-            /*******************************************************************/
-            /* A DosExitList routine must be used to clean up if runtime calls */
-            /* are required and the runtime is dynamically linked.             */
-            /*******************************************************************/
-
-            rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-            if (rc)
-                return 0UL;
-
-            rc = DosExitList(0x00002A00|EXLST_ADD, Win32DllExitList);
-            if (rc)
-                return 0UL;
-
-            /* knut: check for high memory support */
-            rc = DosQuerySysInfo(QSV_VIRTUALADDRESSLIMIT, QSV_VIRTUALADDRESSLIMIT, &sysinfo, sizeof(sysinfo));
-
-            if ( rc == 0 && sysinfo > 512 )   //VirtualAddresslimit is in MB
-                flAllocMem = PAG_ANY;      // high memory support. Let's use it!
-            else   flAllocMem = 0;        // no high memory support
-
-            break;
-        case 1 :
-            break;
-        default  :
-            return 0UL;
-    }
-
-    /***********************************************************/
-    /* A non-zero value must be returned to indicate success.  */
-    /***********************************************************/
-    return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-    dprintf(("kernel32 exit\n"));
-    _dump_allocated(10);    /*PLF Wed  98-03-18 23:55:07*/
-    __ctordtorTerm();
-    _CRT_term();
-    DosExitList(EXLST_EXIT, cleanup);
-    return ;
-}
Index: trunk/src/kernel32/kernel32.vpj
===================================================================
--- trunk/src/kernel32/kernel32.vpj	(revision 47)
+++ 	(revision )
@@ -1,99 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd kernel32.dll
-execute=:Execute:E&xecute,kernel32.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 0 1 1 1
-[FILES]
-async.cpp
-atom.cpp
-cio.h
-comm.c
-comm.h
-CONKEYB.ICO
-CONPRIO.ICO
-conprop.cpp
-conprop.h
-CONPROP.ICO
-console.cpp
-CONSOLE.ICO
-console.rc
-console2.h
-consolerc.h
-CONSPKR.ICO
-devio.c
-devio.h
-directory.cpp
-disk.cpp
-except.asm
-except.h
-EXCEPTIONS.CPP
-EXCEPTIONS.H
-fileio.cpp
-HandleManager.cpp
-HandleManager.h
-HEAP.CPP
-HEAP.H
-iccio.asm
-INITTERM.C
-KERNEL32.CPP
-KERNEL32.DEF
-LANG.CPP
-LFILE.C
-LFILE.H
-makefile
-map.c
-map.h
-mapos2.h
-message.cpp
-misc.c
-MMAP.CPP
-MMAP.H
-nameid.cpp
-network.cpp
-NPIPE.C
-OBSOLETE.c
-os2heap.cpp
-os2heap.h
-OS2NATIVE.c
-os2util.c
-os2util.h
-pefile.cpp
-pefile.h
-profile.cpp
-resource.cpp
-stubs.cpp
-stubs.h
-thread.cpp
-thread.H
-THUNK.C
-thunk.h
-time.cpp
-UNICODE.CPP
-vmutex.cpp
-win32util.c
-windll.cpp
-winexe.cpp
-winimage.cpp
-winimgres.cpp
-winmod.cpp
-winres.cpp
-WINRES.H
-wprocess.cpp
-wprocess.h
-..\..\include\kernel32.h
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/kernel32/map.c
===================================================================
--- trunk/src/kernel32/map.c	(revision 47)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/* $Id: map.c,v 1.1 1999-05-24 20:19:47 ktk Exp $ */
-
-/* Copyright (C) 1995 by Holger Veit (Holger.Veit@gmd.de)
- * Use at your own risk! No Warranty! The author is not responsible for
- * any damage or loss of data caused by proper or improper use of this
- * device driver.
- */
-
-#define INCL_DOS
-#define INCL_DOSDEVICES
-#define INCL_DOSDEVIOCTL
-#include <os2.h>
-
-#include "map.h"
-#include "mapos2.h"
-
-int mpioctl(HFILE fd, int func,struct map_ioctl* data)
-{
-    struct xf86_pmap_param par;
-    struct xf86_pmap_data dta;
-    ULONG len;
-    APIRET rc;
-
-    switch (func) {
-    case IOCTL_MAP:
-        par.u.physaddr = data->a.phys;
-        par.size = data->size;
-        rc = DosDevIOCtl(fd, XFREE86_PMAP, PMAP_MAP,
-            (ULONG*)&par, sizeof(par), &len,
-            (ULONG*)&dta, sizeof(dta), &len);
-        if (!rc) data->a.user = (void*)dta.addr;
-        return rc ? -1 : 0;
-    case IOCTL_UMAP:
-        par.u.physaddr = (ULONG)data->a.user;
-        par.size = 0;
-        rc = DosDevIOCtl(fd, XFREE86_PMAP, PMAP_UNMAP,
-            (ULONG*)&par, sizeof(par), &len,
-            NULL, 0, NULL);
-        return rc ? -1 : 0;
-    default:
-        return -1;
-    }
-}
Index: trunk/src/kernel32/misc.c
===================================================================
--- trunk/src/kernel32/misc.c	(revision 47)
+++ 	(revision )
@@ -1,318 +1,0 @@
-/* $Id: misc.c,v 1.2 1999-05-31 22:08:12 phaller Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * Logging procedures
- *
- * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
- * Copyright 1998 Joel Troster
- * Copyright 1998 Peter FitzSimmons
- *
- */
-#define INCL_BASE
-#define INCL_WIN
-#define INCL_WINERRORS
-#define INCL_DOSFILEMGR
-#include <os2.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-
-#include <odin.h>
-#include <win32type.h>
-#include "misc.h"
-
-
-//#define PMPRINTF
-#ifdef PMPRINTF
-
-/* ----- Customization variables ----- */
-#define PRINTFID      ""
-#define PRINTFMAXLEN  300
-#define PRINTFLINELEN 100
-#define PRINTFTHREADS  54
-#define PRINTFQNAME   "\\QUEUES\\PRINTF32"
-
-/* ----- Includes and externals ----- */
-#include <stddef.h>                /* .. */
-#include <time.h>                  /* .. */
-
-extern ULONG flAllocMem;    /*Tue 03.03.1998: knut */
-
-/* ----- Local defines ----- */
-#define PRINTFIDSIZE sizeof(PRINTFID)
-#define PRINTFMAXBUF PRINTFIDSIZE+PRINTFLINELEN
-
-/* ----- Per-thread output buffer and current indices into line ---- */
-struct perthread {
-  LONG   lineindex;                /* where next char */
-  LONG   tidemark;                 /* rightmost char */
-  int    bell;                     /* TRUE if line has bell */
-  UCHAR  line[PRINTFMAXBUF];       /* accumulator */
-  };
-
-/* ----- Local static variables ----- */
-static ULONG  ourpid=0;            /* our process ID */
-static ULONG  servepid=0;          /* process IDs of the server */
-static HQUEUE qhandle=0;           /* handle for the queue */
-static struct perthread *tps[PRINTFTHREADS+1]; /* -> per-thread data */
-
-/* ----- Local subroutine ----- */
-static int printf_(struct perthread *);
-
-/* ----------------------------------------------------------------- */
-/* The "printf" function.  Note this has a variable number of        */
-/* arguments.                                                        */
-/* ----------------------------------------------------------------- */
-int SYSTEM EXPORT WriteLog(char *f, ...)
-  {
-  TIB    *ptib;                    /* process/thread id structures */
-  PIB    *ppib;                    /* .. */
-  TID    ourtid;                   /* thread ID */
-  struct perthread *tp;            /* pointer to per-thread data */
-  int    rc;                       /* returncode */
-  ULONG  urc;                      /* returncode */
-
-  urc=DosOpenQueue(&servepid, &qhandle, PRINTFQNAME);  /* Open the Q */
-  /* Non-0 RC means Q does not exist or cannot be opened */
-  if (urc==343) return 0;          /* queue does not exist, so quit */
-  if (urc!=0)   return -1;         /* report any other error */
-
-  /* First determine our thread ID (and hence get access to the      */
-  /* correct per-thread data.  If the per-thread data has not been   */
-  /* allocated, then allocate it now.  It is never freed, once       */
-  /* allocated, as PRINTF is not notified of end-of-thread.          */
-  DosGetInfoBlocks(&ptib,&ppib);   /* get process/thread info */
-  ourtid=ptib->tib_ptib2->tib2_ultid;   /* .. and copy TID */
-  if (ourtid>PRINTFTHREADS)        /* too many threads .. */
-    return 0;                      /* .. so quit, quietly */
-  tp=tps[ourtid];                  /* copy to local pointer */
-  if (tp==NULL) {                  /* uninitialized (NULL=0) */
-    /* allocate a per-thread structure */
-    tp=(struct perthread *)malloc(sizeof(struct perthread));
-    if (tp==NULL) return -1;       /* out of memory -- return error */
-    tps[ourtid]=tp;                /* save for future calls */
-    strcpy(tp->line,PRINTFID);     /* initialize: line.. */
-    tp->lineindex=PRINTFIDSIZE-1;  /* ..where next char */
-    tp->tidemark =PRINTFIDSIZE-2;  /* ..rightmost char */
-    tp->bell=FALSE;                /* ..if line has bell */
-    if (ourpid==0) ourpid=ppib->pib_ulpid;   /* save PID for all to use */
-    }
-
-  { /* Block for declarations -- only needed if queue exists, etc. */
-    LONG  count;                   /* count of characters formatted */
-    UCHAR buffer[PRINTFMAXLEN+1];  /* formatting area */
-    LONG  i, newind;               /* work */
-    UCHAR ch;                      /* .. */
-    va_list argptr;                /* -> variable argument list */
-
-    va_start(argptr, f);           /* get pointer to argument list */
-    count=vsprintf(buffer, f, argptr);
-    va_end(argptr);                /* done with variable arguments */
-
-    if (count<0) return count-1000;/* bad start */
-
-    if (count>PRINTFMAXLEN) {
-      /* Disaster -- we are probably "dead", but just in case we */
-      /* are not, carry on with truncated data. */
-      count=PRINTFMAXLEN;
-      }
-    buffer[count]='\0';            /* ensure terminated */
-    /* OK, ready to go with the data now in BUFFER                    */
-    /* We copy from the formatted string to the output (line) buffer, */
-    /* taking note of certain control characters and sending a line   */
-    /* the queue whenever we see a LF control, or when the line       */
-    /* fills (causing a forced break).                                */
-    for (i=0; ; i++) {
-      ch=buffer[i]; if (!ch) break;
-      switch(ch) {
-        case '\r':                 /* carriage return */
-          tp->lineindex=PRINTFIDSIZE-1; /* back to start of line */
-          break;
-        case '\n':                 /* new line */
-        case '\f':                 /* form feed */
-          rc=printf_(tp);          /* print a line */
-          if (rc!=0) return rc;    /* error */
-          break;
-        case '\t':                 /* tab */
-          newind=tp->lineindex-PRINTFIDSIZE+1;   /* offset into data */
-          newind=tp->lineindex+5-newind%5;    /* new index requested */
-          if (newind>=PRINTFMAXBUF) newind=PRINTFMAXBUF;    /* clamp */
-          for (; tp->lineindex<newind; tp->lineindex++) {
-            if (tp->lineindex>tp->tidemark) {  /* beyond current end */
-              tp->line[tp->lineindex]=' ';              /* add space */
-              tp->tidemark=tp->lineindex;
-              }
-            }
-          break;
-        case '\v':                 /* vertical tab */
-          /* ignore it */
-          break;
-        case '\b':                 /* backspace */
-          tp->lineindex=max(tp->lineindex-1,PRINTFIDSIZE);
-          break;
-        case '\a':                 /* alert (bell) */
-          tp->bell=TRUE;
-          break;
-        default:                   /* ordinary character */
-          tp->line[tp->lineindex]=ch;
-          if (tp->lineindex>tp->tidemark)  /* is rightmost.. */
-            tp->tidemark=tp->lineindex;
-          tp->lineindex++;                 /* step for next */
-        } /* switch */
-      if (tp->lineindex>=PRINTFMAXBUF) {
-        rc=printf_(tp);            /* print a line */
-        if (rc!=0) return rc;      /* error */
-        }
-
-      } /* copy loop */
-    return count;                  /* all formatted data processed */
-    } /* block */
-  } /* printf */
-
-/* ----- printf_(tp) -- Local subroutine to send a line ------------ */
-/* A line has been completed (or overflowed): write it to the queue. */
-int printf_(struct perthread *tp)  /* pointer to per-thread data */
-  {
-  ULONG   urc;                     /* unsigned returncode */
-  PSZ     pszTo, pszFrom;          /* character pointers */
-  PVOID   addr;                    /* address of output data */
-  long    size;                    /* total size of output data */
-  time_t  timenow;                 /* holds current time */
-
-  tp->line[tp->tidemark+1]='\0';   /* add terminator */
-  size=tp->tidemark+2;             /* total length of data */
-
-  /* Get some shared memory that can be given away */
-  urc=DosAllocSharedMem(&addr, NULL, (unsigned)size,
-    OBJ_GIVEABLE|PAG_WRITE|PAG_COMMIT|flAllocMem);
-                                   /*knut: added flAllocMem */
-
-  if (urc!=0) return -2;           /* error */
-
-  pszTo=addr;                      /* copy for clarity */
-  pszFrom=&(tp->line[0]);          /* pointer to source */
-  strcpy(pszTo,pszFrom);           /* copy the string to shared memory */
-
-  if (ourpid!=servepid) {          /* (no giveaway needed if to self) */
-    urc=DosGiveSharedMem(addr, servepid, PAG_READ); /* give access */
-    if (urc!=0) return -3;}        /* error */
-
-  /* Write the selector, size, and timestamp to the queue */
-  if (tp->bell) size=-size;        /* BELL passed by negation */
-  time(&timenow);                  /* optional - else use 0 */
-  urc=DosWriteQueue(qhandle,       /* handle */
-         (unsigned)timenow,        /* 'request' (timestamp) */
-         (unsigned)size,           /* 'length'  (length/bell) */
-                   addr,           /* 'address' (address) */
-                   0);             /* priority (FIFO if enabled) */
-  if (urc!=0) return -4;           /* error */
-  if (ourpid!=servepid) {          /* if given away.. */
-    urc=DosFreeMem(addr);          /* .. *we* are done with it */
-    if (urc!=0) return -5;}        /* error */
-  /* Reset the line buffer and indices */
-  tp->lineindex=PRINTFIDSIZE-1;    /* where next char */
-  tp->tidemark =PRINTFIDSIZE-2;    /* rightmost char */
-  tp->bell     =FALSE;             /* true if line has bell */
-  return 0;                        /* success! */
-  } /* printf_ */
-#else
-
-
-#if 1   /*PLF Mon  97-09-08 20:04:28*/
-static FILE *flog = NULL;   /*PLF Mon  97-09-08 20:00:15*/
-static BOOL init = FALSE;
-static BOOL fLogging = TRUE;
-
-int SYSTEM EXPORT WriteLog(char *tekst, ...)
-{
-    va_list argptr;
-    if(!init){
-        init = TRUE;
-        if(!getenv("NOWIN32LOG")) {
-             flog = fopen("win32os2.log", "w");
-    }
-    else fLogging = FALSE;
-    }
-
-    if(fLogging && flog){
-        va_start(argptr, tekst);
-        vfprintf(flog, tekst, argptr);
-        va_end(argptr);
-    if(tekst[strlen(tekst)-1] != '\n')
-        fprintf(flog, "\n");
-    }
-    return 1;
-}
-
-int SYSTEM EXPORT WriteLogError(char *tekst, ...)
-{
-    va_list argptr;
-
-    va_start(argptr, tekst);
-    printf("ERROR: ");
-    vprintf(tekst, argptr);
-    va_end(argptr);
-    if(tekst[strlen(tekst)-1] != '\n') {
-    printf("\n");
-    }
-
-    return 1;
-}
-
-#else   /*PLF Mon  97-09-08 20:04:26*/
-/******************************************************************************/
-static BOOL init = FALSE;
-static BOOL fLog = TRUE;
-/******************************************************************************/
-int SYSTEM EXPORT WriteLog(char *tekst, ...)
-{
-ULONG Action, Wrote;
-HFILE log;
-APIRET rc;
-char message[4096];
-va_list argptr;
-ULONG openFlags = OPEN_ACTION_CREATE_IF_NEW;
-
- if(fLog == FALSE)
-    return(FALSE);
-
- if(!init) {
-    init       = TRUE;
-    openFlags |= OPEN_ACTION_REPLACE_IF_EXISTS;
-        if(getenv("NOWIN32LOG"))
-            fLog = FALSE;
- }
- else   openFlags |= OPEN_ACTION_OPEN_IF_EXISTS;
-
- rc = DosOpen(
-              "win32os2.log",
-              &log,           /* file handle returned */
-              &Action,
-              0L,
-              FILE_NORMAL,
-              openFlags,
-              OPEN_ACCESS_READWRITE | OPEN_SHARE_DENYWRITE,
-              (PEAOP2)NULL);
-
- rc = DosSetFilePtr(log, 0, FILE_END, &Wrote);
- va_start(argptr, tekst);
- vsprintf(message, tekst, argptr);
- va_end(argptr);
-
- rc = DosWrite(log, message, strlen(message), &Wrote);
-
- DosClose(log);   /*PLF Mon  97-09-08 20:01:43*/
- return(TRUE);
-}
-#endif  /*PLF Mon  97-09-08 20:04:23*/
-/******************************************************************************/
-/******************************************************************************/
-
-
-#endif
Index: trunk/src/kernel32/os2util.c
===================================================================
--- trunk/src/kernel32/os2util.c	(revision 47)
+++ 	(revision )
@@ -1,217 +1,0 @@
-/* $Id: os2util.c,v 1.1 1999-05-24 20:19:47 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * Misc util. procedures
- *
- * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
- * Copyright 1998 Peter FitzSimmons
- * Copyright 1998 Patrick Haller
- *
- */
-#define INCL_BASE
-#define INCL_DOSPROCESS
-#include <os2.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>  /*PLF Wed  98-03-18 05:15:04*/
-#include <malloc.h>  /*PLF Wed  98-03-18 05:15:04*/
-#include "os2util.h"
-#include "misc.h"
-#include "version.h"
-
-/***********************************
- * PH: fixups for missing os2win.h *
- ***********************************/
-
-void _System SetLastError(ULONG ulError);
-
-//******************************************************************************
-//******************************************************************************
-void OS2SetExitList(unsigned long handler)
-{
- APIRET rc;
-
-  rc = DosExitList(EXLST_ADD | 0x00002A00, (PFNEXITLIST)handler);
-  if(rc) {
-    dprintf(("DosExitList returned %d\n", rc));
-  }
-}
-//******************************************************************************
-//******************************************************************************
-void OS2ClearExitList()
-{
-  DosExitList(EXLST_EXIT, NULL);
-}
-//******************************************************************************
-//******************************************************************************
-void OS2RemoveExitList(unsigned long handler)
-{
-  DosExitList(EXLST_REMOVE, (PFNEXITLIST)handler);
-}
-//******************************************************************************
-//TODO: not reentrant!
-//******************************************************************************
-char *OS2GetDllName(ULONG hModule)
-{
- static char modname[CCHMAXPATH] = {0};
-
-  DosQueryModuleName(hModule, CCHMAXPATH, modname);
-  return(modname);
-}
-//******************************************************************************
-void SYSTEM CheckVersion(ULONG version, char *modname)
-{
-    dprintf(("CheckVersion of %s, %d\n", modname, version));
-    if(version != PE2LX_VERSION){
-        static char msg[300];
-        int r;
-        dprintf(("Version mismatch! %d, %d: %s\n", version, PE2LX_VERSION, modname));
-        sprintf(msg, "%s is intended for use with a different release of PE2LX.\n", modname);
-        do{
-            r = WinMessageBox(HWND_DESKTOP, NULLHANDLE, msg, "Version Mismatch!", 0, MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION | MB_MOVEABLE);
-        }while(r == MBID_RETRY);   // giggle
-        if( r != MBID_IGNORE )
-            exit(987);
-    }
-}
-
-void SYSTEM CheckVersionFromHMOD(ULONG version, HMODULE hModule)
-{
-    char name[_MAX_PATH];
-
-    // query name of dll.
-    if(!DosQueryModuleName(hModule, sizeof(name), name))
-        CheckVersion(version, name);
-}
-
-/*****************************************************************************
- * Name      : HMODULE OS2iGetModuleHandleA
- * Purpose   : replacement for IBM Open32's GetModuleHandle
- * Parameters: LPCTSTR lpszModule
- * Variables :
- * Result    : HMODULE hModule or NULLHANDLE in case of error
- * Remark    :
- * Status    : REWRITTEN UNTESTED
- *
- * Author    : Patrick Haller [Sun, 1998/04/04 01:55]
- *****************************************************************************/
-
-HMODULE OS2iGetModuleHandleA(PSZ pszModule)
-{
-  HMODULE hModule;                                          /* module handle */
-  APIRET  rc;                                              /* API returncode */
-  static HMODULE hModuleExe;                          /* "cached" hModuleExe */
-  PTIB pTIB;                              /* parameters for DosGetInfoBlocks */
-  PPIB pPIB;
-
-  dprintf(("KERNEL32:GetModuleHandle(%s)\n",
-           pszModule));
-
-  /* @@@PH 98/04/04
-
-     this Open32 function is broken for pszModule == NULL
-     return(GetModuleHandle(pszModule));
-
-     Open32 always returns -1 here, however it should return the handle
-     of the current process. MFC30 crashes.
-
-     SvL, me thinks for PELDR support, you'll have to rewrite
-     this code anyway :)
-
-   */
-
-  if (NULL == pszModule)              /* obtain handle to current executable */
-  {
-    if (hModuleExe != NULLHANDLE)            /* do we have a cached handle ? */
-      return (hModuleExe);
-
-    rc = DosGetInfoBlocks(&pTIB,                      /* get the info blocks */
-                          &pPIB);
-    if (rc != NO_ERROR)                                  /* check for errors */
-    {
-      SetLastError(rc);                                    /* set error code */
-      return (NULLHANDLE);                                 /* signal failure */
-    }
-
-    hModuleExe = pPIB->pib_hmte;                        /* set cached module */
-    hModule = pPIB->pib_hmte;                       /* module table entry ID */
-  }
-  else
-  {
-    rc = DosQueryModuleHandle(pszModule,              /* query module handle */
-                              &hModule);
-
-    if (rc != NO_ERROR)                                  /* check for errors */
-    {
-      SetLastError(rc);                                    /* set error code */
-      return (NULLHANDLE);                                 /* signal failure */
-    }
-  }
-
-  return (hModule);                              /* return determined handle */
-}
-
-
-HMODULE OS2QueryModuleHandle(char *modname)
-{
- HMODULE hModule;
- APIRET  rc;
-
-  rc = DosQueryModuleHandle(modname,              /* query module handle */
-                            &hModule);
-  if(rc)
-    return(-1);
-
-  return(hModule);
-}
-
-//SvL: only for RT_RCDATA!
-ULONG OS2GetResourceSize(HMODULE hinstance, int id)
-{
- APIRET rc;
- ULONG  size;
-
-  rc = DosQueryResourceSize(hinstance, RT_RCDATA, id, &size);
-  if(rc) {
-    dprintf(("DosQueryResourceSize returned %d, %X id = %d\n", rc, hinstance, id));
-    return(0);
-  }
-  return(size);
-}
-
-BOOL OS2GetResource(HMODULE hinstance, int id, char *destbuf, int bufLength)
-{
- APIRET rc;
- char  *resdata;
- ULONG  size;
-
-   rc = DosQueryResourceSize(hinstance, RT_RCDATA, id, &size);
-   if(rc) {
-    dprintf(("OS2GetResource: Can't get resource size of %d!!!\n", id));
-    return(0);
-   }
-   rc = DosGetResource(hinstance, RT_RCDATA, id, (PPVOID)&resdata);
-   if(rc) {
-    dprintf(("OS2GetResource: Can't find resource %d!!!\n", id));
-    return(0);
-   }
-   dprintf(("OS2GetResoure: bufLength %d, size %d, id %d", bufLength, size, id));
-   size = min(size, bufLength);
-   memcpy(destbuf, resdata, size);
-   DosFreeResource(resdata);
-
-   return(FALSE);
-}
-
-
-
-
-void  OS2Wait(ULONG msec)
-{
-   DosSleep(msec);
-}
Index: trunk/src/kernel32/win32util.c
===================================================================
--- trunk/src/kernel32/win32util.c	(revision 47)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/* $Id: win32util.c,v 1.2 1999-05-31 22:08:14 phaller Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * Misc functions
- *
- * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
- *
- */
-#include <os2win.h>
-#include "misc.h"
-
-
-//******************************************************************************
-//******************************************************************************
-ULONG SYSTEM Win32QueryModuleName(ULONG hmod, char *modname, int modsize)
-{
-  dprintf(("Win32QueryModuleHandle %X, %X, %d\n", hmod, modname, modsize));
-  return(GetModuleFileNameA(hmod, modname, modsize));
-}
-//******************************************************************************
-//******************************************************************************
-
Index: trunk/src/mpr/initterm.c
===================================================================
--- trunk/src/mpr/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,124 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:19:50 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * MPR DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen
- * Copyright 1998 Peter Fitzsimmons
- *
- */
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"       /*PLF Wed  98-03-18 23:18:29*/
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-   size_t i;
-   APIRET rc;
-
-   /*-------------------------------------------------------------------------*/
-   /* If ulFlag is zero then the DLL is being loaded so initialization should */
-   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-   /* termination should be performed.                                        */
-   /*-------------------------------------------------------------------------*/
-
-   switch (ulFlag) {
-      case 0 :
-
-         /*******************************************************************/
-         /* The C run-time environment initialization function must be      */
-         /* called before any calls to C run-time functions that are not    */
-         /* inlined.                                                        */
-         /*******************************************************************/
-
-         if (_CRT_init() == -1)
-            return 0UL;
-     __ctordtorInit();
-
-         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-         /*******************************************************************/
-         /* A DosExitList routine must be used to clean up if runtime calls */
-         /* are required and the runtime is dynamically linked.             */
-         /*******************************************************************/
-
-         rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-         if(rc)
-        return 0UL;
-
-         break;
-      case 1 :
-         break;
-      default  :
-         return 0UL;
-   }
-
-   /***********************************************************/
-   /* A non-zero value must be returned to indicate success.  */
-   /***********************************************************/
-   return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-   __ctordtorTerm();
-   _CRT_term();
-   DosExitList(EXLST_EXIT, cleanup);
-   return ;
-}
Index: trunk/src/mpr/mpr.vpj
===================================================================
--- trunk/src/mpr/mpr.vpj	(revision 47)
+++ 	(revision )
@@ -1,27 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd mpr.dll
-execute=:Execute:E&xecute,mpr.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-INITTERM.C
-makefile
-MPR.CPP
-MPR.DEF
-mpr.h
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/ole32/initterm.c
===================================================================
--- trunk/src/ole32/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,124 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:19:52 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * OLE32 DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen
- * Copyright 1998 Peter Fitzsimmons
- *
- */
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"       /*PLF Wed  98-03-18 23:18:29*/
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-   size_t i;
-   APIRET rc;
-
-   /*-------------------------------------------------------------------------*/
-   /* If ulFlag is zero then the DLL is being loaded so initialization should */
-   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-   /* termination should be performed.                                        */
-   /*-------------------------------------------------------------------------*/
-
-   switch (ulFlag) {
-      case 0 :
-
-         /*******************************************************************/
-         /* The C run-time environment initialization function must be      */
-         /* called before any calls to C run-time functions that are not    */
-         /* inlined.                                                        */
-         /*******************************************************************/
-
-         if (_CRT_init() == -1)
-            return 0UL;
-     __ctordtorInit();
-
-         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-         /*******************************************************************/
-         /* A DosExitList routine must be used to clean up if runtime calls */
-         /* are required and the runtime is dynamically linked.             */
-         /*******************************************************************/
-
-         rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-         if(rc)
-        return 0UL;
-
-         break;
-      case 1 :
-         break;
-      default  :
-         return 0UL;
-   }
-
-   /***********************************************************/
-   /* A non-zero value must be returned to indicate success.  */
-   /***********************************************************/
-   return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-   __ctordtorTerm();
-   _CRT_term();
-   DosExitList(EXLST_EXIT, cleanup);
-   return ;
-}
Index: trunk/src/ole32/ole32.vpj
===================================================================
--- trunk/src/ole32/ole32.vpj	(revision 47)
+++ 	(revision )
@@ -1,28 +1,0 @@
-[COMPILER]
-MACRO=\n
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd ole32.dll
-execute=:Execute:E&xecute,ole32.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-INITTERM.C
-makefile
-ole32.cpp
-ole32.def
-ole32.h
-..\..\comtype.h
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/pe2lx/PE2LX.lnk
===================================================================
--- trunk/src/pe2lx/PE2LX.lnk	(revision 47)
+++ 	(revision )
@@ -1,15 +1,0 @@
-name PE2LX.EXE
-file pefile.obj
-file pe.obj
-file lx.obj
-file icon.obj
-file menu.obj
-file dialog.obj
-file misc.obj
-file rcdata.obj
-file icongrp.obj
-file strings.obj
-file bitmap.obj
-file accelerator.obj
-file cursor.obj
-file cursorgrp.obj
Index: trunk/src/shell32/initterm.c
===================================================================
--- trunk/src/shell32/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,126 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:19:57 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * SHELL32 DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen
- * Copyright 1998 Peter Fitzsimmons
- *
- */
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"       /*PLF Wed  98-03-18 23:18:29*/
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-
-
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-   size_t i;
-   APIRET rc;
-
-   /*-------------------------------------------------------------------------*/
-   /* If ulFlag is zero then the DLL is being loaded so initialization should */
-   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-   /* termination should be performed.                                        */
-   /*-------------------------------------------------------------------------*/
-
-   switch (ulFlag) {
-      case 0 :
-
-         /*******************************************************************/
-         /* The C run-time environment initialization function must be      */
-         /* called before any calls to C run-time functions that are not    */
-         /* inlined.                                                        */
-         /*******************************************************************/
-
-         if (_CRT_init() == -1)
-            return 0UL;
-  	 __ctordtorInit();
-
-         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-
-         /*******************************************************************/
-         /* A DosExitList routine must be used to clean up if runtime calls */
-         /* are required and the runtime is dynamically linked.             */
-         /*******************************************************************/
-
-         rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-         if(rc)
-		return 0UL;
-
-         break;
-      case 1 :
-         break;
-      default  :
-         return 0UL;
-   }
-
-   /***********************************************************/
-   /* A non-zero value must be returned to indicate success.  */
-   /***********************************************************/
-   return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-   __ctordtorTerm();  
-   _CRT_term();
-   DosExitList(EXLST_EXIT, cleanup);
-   return ;
-}
Index: trunk/src/shell32/shell32.vpj
===================================================================
--- trunk/src/shell32/shell32.vpj	(revision 47)
+++ 	(revision )
@@ -1,27 +1,0 @@
-[COMPILER]
-MACRO=\n
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd shell32.dll
-execute=:Execute:E&xecute,shell32.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-INITTERM.C
-makefile
-shell32.cpp
-shell32.def
-shell32.h
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/tapi32/initterm.c
===================================================================
--- trunk/src/tapi32/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,124 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:19:58 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * TAPI32 DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen
- * Copyright 1998 Peter Fitzsimmons
- *
- */
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"       /*PLF Wed  98-03-18 23:18:29*/
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-   size_t i;
-   APIRET rc;
-
-   /*-------------------------------------------------------------------------*/
-   /* If ulFlag is zero then the DLL is being loaded so initialization should */
-   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-   /* termination should be performed.                                        */
-   /*-------------------------------------------------------------------------*/
-
-   switch (ulFlag) {
-      case 0 :
-
-         /*******************************************************************/
-         /* The C run-time environment initialization function must be      */
-         /* called before any calls to C run-time functions that are not    */
-         /* inlined.                                                        */
-         /*******************************************************************/
-
-         if (_CRT_init() == -1)
-            return 0UL;
-     __ctordtorInit();
-
-         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-         /*******************************************************************/
-         /* A DosExitList routine must be used to clean up if runtime calls */
-         /* are required and the runtime is dynamically linked.             */
-         /*******************************************************************/
-
-         rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-         if(rc)
-        return 0UL;
-
-         break;
-      case 1 :
-         break;
-      default  :
-         return 0UL;
-   }
-
-   /***********************************************************/
-   /* A non-zero value must be returned to indicate success.  */
-   /***********************************************************/
-   return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-   __ctordtorTerm();
-   _CRT_term();
-   DosExitList(EXLST_EXIT, cleanup);
-   return ;
-}
Index: trunk/src/tapi32/tapi32.vpj
===================================================================
--- trunk/src/tapi32/tapi32.vpj	(revision 47)
+++ 	(revision )
@@ -1,27 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd tapi32.dll
-execute=:Execute:E&xecute,tapi32.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 0 0 1
-[FILES]
-INITTERM.C
-makefile
-tapi32.cpp
-tapi32.def
-tapi32.h
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/user32/initterm.c
===================================================================
--- trunk/src/user32/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,131 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:19:59 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * USER32 DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen
- * Copyright 1998 Peter Fitzsimmons
- *
- */
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"       /*PLF Wed  98-03-18 23:18:29*/
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-void RegisterSystemClasses(ULONG hModule);
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-
-
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-   size_t i;
-   APIRET rc;
-
-   /*-------------------------------------------------------------------------*/
-   /* If ulFlag is zero then the DLL is being loaded so initialization should */
-   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-   /* termination should be performed.                                        */
-   /*-------------------------------------------------------------------------*/
-
-   switch (ulFlag) {
-      case 0 :
-
-         /*******************************************************************/
-         /* The C run-time environment initialization function must be      */
-         /* called before any calls to C run-time functions that are not    */
-         /* inlined.                                                        */
-         /*******************************************************************/
-
-         if (_CRT_init() == -1)
-            return 0UL;
-     __ctordtorInit();
-
-         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-         /*******************************************************************/
-         /* A DosExitList routine must be used to clean up if runtime calls */
-         /* are required and the runtime is dynamically linked.             */
-         /*******************************************************************/
-
-         rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-         if(rc)
-        return 0UL;
-
-     //SvL: 18-7-'98, Register system window classes (button, listbox etc etc)
-     RegisterSystemClasses(hModule);
-         break;
-      case 1 :
-         break;
-      default  :
-         return 0UL;
-   }
-
-   /***********************************************************/
-   /* A non-zero value must be returned to indicate success.  */
-   /***********************************************************/
-   return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-   dprintf(("user32 exit\n"));
-   __ctordtorTerm();
-   _CRT_term();
-   dprintf(("user32 exit done\n"));
-   DosExitList(EXLST_EXIT, cleanup);
-   return ;
-}
Index: trunk/src/user32/user32.vpj
===================================================================
--- trunk/src/user32/user32.vpj	(revision 47)
+++ 	(revision )
@@ -1,54 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd user32.dll
-execute=:Execute:E&xecute,user32.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-char.cpp
-defwndproc.cpp
-DIALOG.CPP
-dlgconvert.cpp
-DLGCONVERT.H
-HOOK.CPP
-hooks.cpp
-hooks.h
-icon.cpp
-icon.h
-IMAGE.H
-INITTERM.C
-loadres.cpp
-Makefile
-menu.cpp
-RESSTRING.C
-RESSTRING.H
-SYSCLR.CPP
-SYSCLR.H
-syscolor.cpp
-syscolor.h
-user32.cpp
-USER32.DEF
-user32.h
-USRCALL.CPP
-USRCALL.H
-WNDCLASS.CPP
-WNDCLASS.H
-WNDPROC.CPP
-WNDPROC.H
-WNDSUBPROC.CPP
-WNDSUBPROC.H
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/version/version.vpj
===================================================================
--- trunk/src/version/version.vpj	(revision 47)
+++ 	(revision )
@@ -1,26 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd version.dll
-execute=:Execute:E&xecute,version.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-INITTERM.C
-makefile
-VERSION.c
-VERSION.DEF
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/winmm/winmm.vpj
===================================================================
--- trunk/src/winmm/winmm.vpj	(revision 47)
+++ 	(revision )
@@ -1,52 +1,0 @@
-[COMPILER]
-MACRO=\n
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd winmm.dll
-execute=:Execute:E&xecute,winmm.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-aux.cpp
-aux.h
-auxos2.cpp
-driver.cpp
-dwaveout.cpp
-dwaveout.h
-INITTERM.C
-IRTMidi.cpp
-irtmidi.hpp
-joy.cpp
-make.cmd
-makefile
-mci.cpp
-midi.cpp
-MIDI.HPP
-midistrm.cpp
-mixer.cpp
-mmio.cpp
-os2timer.cpp
-os2timer.h
-playsound.c
-timegettime.c
-wavein.cpp
-waveout.cpp
-winmm.cpp
-WINMM.DEF
-winmm.h
-winmmtype.h
-wintimer.h
-wintype.h
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/winspool/winspool.vpj
===================================================================
--- trunk/src/winspool/winspool.vpj	(revision 47)
+++ 	(revision )
@@ -1,26 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd winspool.dll
-execute=:Execute:E&xecute,winspool.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-INITTERM.C
-makefile
-winspool.c
-winspool.DEF
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/wnetap32/wnetap32.vpj
===================================================================
--- trunk/src/wnetap32/wnetap32.vpj	(revision 47)
+++ 	(revision )
@@ -1,26 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd wnetap32.dll
-execute=:Execute:E&xecute,wnetap32.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-INITTERM.C
-makefile
-wnetap32.cpp
-wnetap32.def
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
Index: trunk/src/wsock32/initterm.c
===================================================================
--- trunk/src/wsock32/initterm.c	(revision 47)
+++ 	(revision )
@@ -1,126 +1,0 @@
-/* $Id: initterm.c,v 1.1 1999-05-24 20:20:09 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * WSOCK32 DLL entry point
- *
- * Copyright 1998 Sander van Leeuwen
- * Copyright 1998 Peter Fitzsimmons
- *
- */
-
-/*-------------------------------------------------------------*/
-/* INITERM.C -- Source for a custom dynamic link library       */
-/*              initialization and termination (_DLL_InitTerm) */
-/*              function.                                      */
-/*                                                             */
-/* When called to perform initialization, this sample function */
-/* gets storage for an array of integers, and initializes its  */
-/* elements with random integers.  At termination time, it     */
-/* frees the array.  Substitute your own special processing.   */
-/*-------------------------------------------------------------*/
-
-
-/* Include files */
-#define  INCL_DOSMODULEMGR
-#define  INCL_DOSPROCESS
-#include <os2.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <builtin.h>
-#include "misc.h"       /*PLF Wed  98-03-18 23:19:26*/
-
-/*-------------------------------------------------------------------*/
-/* _CRT_init is the C run-time environment initialization function.  */
-/* It will return 0 to indicate success and -1 to indicate failure.  */
-/*-------------------------------------------------------------------*/
-int _CRT_init(void);
-/*-------------------------------------------------------------------*/
-/* _CRT_term is the C run-time environment termination function.     */
-/* It only needs to be called when the C run-time functions are      */
-/* statically linked.                                                */
-/*-------------------------------------------------------------------*/
-void _CRT_term(void);
-void __ctordtorInit( void );
-void __ctordtorTerm( void );
-
-/*-------------------------------------------------------------------*/
-/* A clean up routine registered with DosExitList must be used if    */
-/* runtime calls are required and the runtime is dynamically linked. */
-/* This will guarantee that this clean up routine is run before the  */
-/* library DLL is terminated.                                        */
-/*-------------------------------------------------------------------*/
-static void APIENTRY cleanup(ULONG reason);
-
-
-
-/****************************************************************************/
-/* _DLL_InitTerm is the function that gets called by the operating system   */
-/* loader when it loads and frees this DLL for each process that accesses   */
-/* this DLL.  However, it only gets called the first time the DLL is loaded */
-/* and the last time it is freed for a particular process.  The system      */
-/* linkage convention MUST be used because the operating system loader is   */
-/* calling this function.                                                   */
-/****************************************************************************/
-unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
-                                    ulFlag)
-{
-   size_t i;
-   APIRET rc;
-
-   /*-------------------------------------------------------------------------*/
-   /* If ulFlag is zero then the DLL is being loaded so initialization should */
-   /* be performed.  If ulFlag is 1 then the DLL is being freed so            */
-   /* termination should be performed.                                        */
-   /*-------------------------------------------------------------------------*/
-
-   switch (ulFlag) {
-      case 0 :
-
-         /*******************************************************************/
-         /* The C run-time environment initialization function must be      */
-         /* called before any calls to C run-time functions that are not    */
-         /* inlined.                                                        */
-         /*******************************************************************/
-
-         if (_CRT_init() == -1)
-            return 0UL;
-  	 __ctordtorInit();
-
-         CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed  98-03-18 05:28:48*/
-
-         /*******************************************************************/
-         /* A DosExitList routine must be used to clean up if runtime calls */
-         /* are required and the runtime is dynamically linked.             */
-         /*******************************************************************/
-
-         rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup);
-         if(rc)
-		return 0UL;
-
-         break;
-      case 1 :
-         break;
-      default  :
-         return 0UL;
-   }
-
-   /***********************************************************/
-   /* A non-zero value must be returned to indicate success.  */
-   /***********************************************************/
-   return 1UL;
-}
-
-
-static void APIENTRY cleanup(ULONG ulReason)
-{
-   __ctordtorTerm();  
-   _CRT_term();
-   DosExitList(EXLST_EXIT, cleanup);
-   return ;
-}
Index: trunk/src/wsock32/notify.c
===================================================================
--- trunk/src/wsock32/notify.c	(revision 47)
+++ 	(revision )
@@ -1,81 +1,0 @@
-/* $Id: notify.c,v 1.1 1999-05-24 20:20:09 ktk Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * Winsock code
- *
- * Copyright 1998 Vince Vielhaber
- *
- */
-
-
-#include <os2win.h>
-//#include <wsock32.h>
-#include "misc.h"
-
-typedef unsigned int    u_int;
-typedef u_int           SOCKET;
-
-typedef unsigned long TID;
-
-typedef struct AsyncStatus {
-    HWND hwnd;     // owner's hwindow
-    u_int msg;     // message to send when event occurs
-    ULONG event;    // event that may occur
-    SOCKET socket; // the socket
-    int status;    // blocking yes/no
-    TID threadID;  // Thread ID for async
-    int MsgStat;   // has message been sent yet?
-    struct AsyncStatus *Next; // pointer to next AsyncStatus in the list
-    struct AsyncStatus *Prev; // pointer to previous AsyncStatus in the list
-} AsyncStatus;
-
-
-
-/*
- * WSAMAKESELECTREPLY is intended for use by the Windows Sockets implementation
- * when constructing the response to WSAAsyncSelect().
- */
-//#define OS2WSAMAKESELECTREPLY(event,error)     MAKELONG(event,error)
-#ifdef MAKELONG
-#undef MAKELONG
-#endif
-#define MAKELONG(a, b)      ((LONG)(((WORD)(a)) | ((DWORD)((WORD)(b))) << 16))
-#define OS2WSAMAKESELECTREPLY(event,error)     MAKELONG(event,error)
-
-int Notify(AsyncStatus *as, int event)
-{
-int rc;
-    
-#ifdef DEBUG
-    WriteLog("WSOCK32: Open32 Notifying %x, %x, %d\n",
-         (HWND)as->hwnd,as->msg,(int)as->socket);
-#endif
-
-    rc = PostMessageA(as->hwnd,as->msg,as->socket,OS2WSAMAKESELECTREPLY(event,0));
-
-return rc;
-}
-
-// WPARAM is UINT, LPARAM is LONG
-
-int NotifyWSA(HWND hw,u_int msg,UINT wp,LONG lp)
-{
-int rc;
-
-#ifdef DEBUG
-    WriteLog("WSOCK32: Open32 WSA-Notifying %x, %x\n",
-         (HWND)hw,msg);
-#endif
-
-    rc = PostMessageA(hw,msg,(WPARAM)wp,(LPARAM)lp);
-
-return rc;
-
-}
-
-
Index: trunk/src/wsock32/wsock32.c
===================================================================
--- trunk/src/wsock32/wsock32.c	(revision 47)
+++ 	(revision )
@@ -1,1331 +1,0 @@
-/* $Id: wsock32.c,v 1.2 1999-05-31 14:09:47 phaller Exp $ */
-
-/*
- *
- * Project Odin Software License can be found in LICENSE.TXT
- *
- */
-/*
- * Win32 SOCK32 for OS/2
- *
- * 1998/08/25 Vince Vielhaber
- *
- * @(#) wsock32.c     	1.0.0   1998/08/25 VV initial release
- *                      1.0.1   1999/04/27 VV cleanup and implement select.
- *                      1.0.2   1999/05/31 PH support for TCP/IP 4.1 + 4.2 headers
- *
- */
-
-/* this is for IBM TCP/IP 5.0 headers as present in the current Warp 4 toolkit */
-#define TCPV40HDRS 1
-
-
-#define INCL_DOSPROCESS     /* Process and thread values */
-#define INCL_DOSFILEMGR     /* for DosRead and DosWrite */
-#define INCL_DOSQUEUES      /* for unnamed pipes */
-#define INCL_DOSERRORS      /* DOS error values          */
-#define INCL_WINMESSAGEMGR  /* Window Message Functions     */
-#define INCL_WINMENUS       /* Window Menu Functions        */
-
-#define VV_BSD_SELECT       /* undefine this if it interferes with other routines */
-
-#ifdef VV_BSD_SELECT
-# define BSD_SELECT
-#endif
-
-#include <os2.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#include <ctype.h>
-#include <types.h>
-#include <netdb.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <netinet/in.h>
-
-#ifdef VV_BSD_SELECT
-# include <sys/select.h>
-#endif
-
-#include <sys/time.h>
-#include <win32type.h>
-#include "wsock32.h"
-#include "misc.h"
-
-
-#define FAR
-//#define WIN32API APIENTRY
-
-static WHOSTENT whsnt;
-static WSERVENT wsvnt;
-static WPROTOENT wptnt;
-
- /*+-------------------------------------------------------------------+*/
- /*| _CRT_init is the C run-time environment initialization function.  |*/
- /*|It will return 0 to indicate success and -1 to indicate failure.   |*/
- /*+-------------------------------------------------------------------+*/
- 
-int _CRT_init (void);
- 
- /*+-------------------------------------------------------------------+*/
- /*| _CRT_term is the C run-time environment termination function.     |*/
- /*+-------------------------------------------------------------------+*/
- 
-void _CRT_term (unsigned long);
-
-void _System AsyncLoop(ULONG);
-void CheckThreads(AsyncStatus *);
-void NotifyApp(int,AsyncStatus *);
-int Notify(AsyncStatus *,int);
-
-int NotifyWSA(HWND hw,u_int msg,UINT wp,LONG lp);
-
-void _System WSAFunct(ULONG); // for the wsa database calls
-void SetErrForDatabaseCalls(void);
-
-
-size_t nSize;
-int *pArray;
-
-int MsgSent;
-int LocalErrorNumber = 0;
-
-
-TID tidAsyncLoop = 0;     /* ID of AsyncSelect (AsyncLoop) thread */
-
-/*
-
- 
-typedef struct AsyncStatus {
-    HWND hwnd;     // owner's hwindow
-    u_int msg;     // message to send when event occurs
-    long event;    // event that may occur
-    SOCKET socket; // the socket
-    int status;    // blocking yes/no
-    TID threadID;  // Thread ID for async
-    int MsgStat;   // has message been sent yet?
-    struct AsyncStatus *Next; // pointer to next AsyncStatus in the list
-    struct AsyncStatus *Prev; // pointer to previous AsyncStatus in the list
-} AsyncStatus;
- 
- 
- 
-*/
-
-AsyncStatus *TopASY = 0;
-
-
-#define BLOCKING 0
-#define NONBLOCKING 1
-
-
-
-typedef struct WSAStruct {
-    int CallingWhat;
-    HWND hw;
-    u_int msg;
-    char *carg1;
-    char *carg2;
-    int iarg1;
-    int iarg2;
-    char *buf;
-    int buflen;
-} WSAStruct;
-
-
-#define GETSERVBYNAME    1
-#define GETSERVBYPORT    2
-#define GETPROTOBYNAME   3
-#define GETPROTOBYNUMBER 4
-#define GETHOSTBYNAME    5
-#define GETHOSTBYADDR    6
-
-
-
-
-typedef struct PipeStruct {
-    AsyncStatus as;
-    int MsgLoop;
-    HFILE rcv;
-    HFILE snd;
-} PipeStruct;
-
-PipeStruct PS;
-
-
-
-#ifdef FD_CLR
-#undef FD_CLR
-#define FD_CLR(x,y) WFD_CLR(x,y)
-#undef FD_SET
-#define FD_SET(x,y) WFD_SET(x,y)
-#undef FD_ZERO
-#define FD_ZERO(x) WFD_ZERO(x)
-#undef FD_ISSET
-#define FD_ISSET(x,y) WFD_SET(x,y)
-#endif
-
-
-
-
-
-
-int WIN32API OS2__WSAFDIsSet(SOCKET fd, Wfd_set FAR *set) 
-{
-int i = set->fd_count;
-
-#ifdef DEBUG
-    WriteLog("WSOCK32: __WSAFDIsSet\n");
-#endif
- 
-     while (i--)
-         if (set->fd_array[i] == fd)
-             return 1;
- 
-return 0;
-}
-
-
-
-AsyncStatus * FindASY(SOCKET s)
-{
-AsyncStatus *as;
-
-    for(as = TopASY; as; as = as->Next)
-        if(as->socket == s)
-            return as;
-
-return 0;
-}
-
-
-
-SOCKET WIN32API OS2accept (SOCKET s, struct sockaddr *addr,
-                        int *addrlen) {
-#ifdef DEBUG
-    WriteLog("WSOCK32: accept\n");
-#endif
-
-    return accept(s,addr,addrlen);
-}
-
-int WIN32API OS2bind (SOCKET s, const struct sockaddr *addr, int namelen)
-{
- int rc;
-
-#ifdef DEBUG
-    WriteLog("WSOCK32: bind\n");
-#endif
-
-    rc = bind(s,(struct sockaddr *)addr,namelen);
-    dprintf(("bind returned %X\n", rc));
-    return(rc);
-}
-
-int WIN32API OS2closesocket (SOCKET s)
-{
-AsyncStatus *as;
-#ifdef DEBUG
-    WriteLog("WSOCK32: closesocket\n");
-#endif
-
-    as = FindASY(s);
-    if(as == NULL) {
-        LocalErrorNumber = 10038;
-        return -1;
-    }
-
-    CheckThreads(as);
-
-#ifdef DEBUG
-    WriteLog("WSOCK32: closesocket\n");
-#endif
-    if(as->Prev && as->Next)
-        as->Prev->Prev = as->Next->Next; // I SURE HOPE THIS IS RIGHT!!!!!!!!
-    free(as);
-    
-    return soclose((int)s);
-}
-
-int WIN32API OS2connect (SOCKET s, const struct sockaddr *name, int namelen)
-{
-#ifdef DEBUG
-//char message[512];
-//struct Wsockaddr_in *xname;
-
-  WriteLog("WSOCK32: connect\n");
-
-
-#endif
-
-    return connect(s,(struct sockaddr *)name,namelen);
-}
-
-int WIN32API OS2ioctlsocket (SOCKET s, long cmd, u_long *argp)
-{
- int rc;
-
-#ifdef DEBUG
-    WriteLog("WSOCK32: ioctlsocket unimplemented\n");
-#endif
-
-    rc = ioctl(s, cmd, argp, 4);
-    dprintf(("ioctl returned %X\n", rc));
-    return(rc);
-}
-
-int WIN32API OS2getpeername (SOCKET s, struct sockaddr *name,
-                          int * namelen)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: getpeername\n");
-#endif
-
-    return getpeername(s,name,namelen);
-}
-
-int WIN32API OS2getsockname (SOCKET s, struct sockaddr *name,
-                          int * namelen)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: getsockname\n");
-#endif
-
-    return getsockname(s,name,namelen);
-}
-
-int WIN32API OS2getsockopt (SOCKET s, int level, int optname,
-                         char * optval, int *optlen)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: getsockopt\n");
-#endif
-
-    return getsockopt(s,level,optname,optval,optlen);
-}
-
-u_long WIN32API OS2htonl (u_long hostlong)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: htonl\n");
-#endif
-
-    return htonl(hostlong);
-}
-
-u_short WIN32API OS2htons (u_short hostshort)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: htons\n");
-#endif
-
-    return htons(hostshort);
-}
-
-unsigned long WIN32API OS2inet_addr (const char * cp)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: inet_addr\n");
-#endif
-
-    return inet_addr(cp);
-}
-
-char * WIN32API OS2inet_ntoa (struct in_addr in)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: inet_ntoa\n");
-#endif
-
-    return inet_ntoa(in);
-}
-
-int WIN32API OS2listen (SOCKET s, int backlog)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: listen\n");
-#endif
-
-    return listen(s,backlog);
-}
-
-u_long WIN32API OS2ntohl (u_long netlong)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: ntohl\n");
-#endif
-
-    return ntohl(netlong);
-}
-
-u_short WIN32API OS2ntohs (u_short netshort)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: ntohs\n");
-#endif
-
-    return ntohs(netshort);
-}
-
-int WIN32API OS2recv (SOCKET s, char * buf, int len, int flags)
-{
-unsigned long ii;
-int xx,yy;
-char buff[200];
-AsyncStatus *as;
-#ifdef DEBUG
-    WriteLog("WSOCK32: recv socket: %u\n",(unsigned int)s);
-    WriteLog("WSOCK32: recv len: %d\n",len);
-    WriteLog("WSOCK32: recv flags: %d\n",flags);
-
-#endif
-
-    PS.MsgLoop = 0;
-
-    as = FindASY(s);
-
-    if(as != NULL) as->MsgStat = 2;
-
-    
-    xx = recv(s,buf,len,flags);
-
-return xx;
-}
-
-
-
-int WIN32API OS2recvfrom (SOCKET s, char * buf, int len, int flags,
-                       struct sockaddr *from, int * fromlen)
-{
- int rc;
-
-#ifdef DEBUG
-    WriteLog("WSOCK32: recvfrom\n");
-#endif
-
-    rc = recvfrom(s,buf,len,flags,from,fromlen);
-    dprintf(("recvfrom returned %X\n", rc));
-    return(rc);
-}
-
-
-
-#ifdef VV_BSD_SELECT
-
-
-int WIN32API OS2select (int nfds, Wfd_set *readfds, Wfd_set *writefds,
-                     Wfd_set *exceptfds, const struct Wtimeval *timeout)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: select\n");
-#endif
-
-
-    return select(nfds,readfds,writefds,exceptfds,timeout);
-    
-}
-
-
-
-#else
-
-
-int WIN32API OS2select (int nfds, Wfd_set *readfds, Wfd_set *writefds,
-                     Wfd_set *exceptfds, const struct Wtimeval *timeout)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: select\n");
-#endif
-
-    // NEED TO DO THIS ONE!!!!!
-    
-    return 0;
-}
-#endif
-
-
-
-int WIN32API OS2send (SOCKET s, const char * buf, int len, int flags)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: send socket: %u\n",(unsigned int)s);
-//    WriteLog("WSOCK32: send buf: %s\n",buf);
-    WriteLog("WSOCK32: send len: %d\n",len);
-    WriteLog("WSOCK32: send flags: %d\n",flags);
-#endif
-
-    return send(s,buf,len,flags);
-}
-
-int WIN32API OS2sendto (SOCKET s, const char * buf, int len, int flags,
-                     const struct sockaddr *to, int tolen)
-{
- int rc;
-
-#ifdef DEBUG
-    WriteLog("WSOCK32: sendto\n");
-#endif
-
-    rc = sendto(s,buf,len,flags,to,tolen);
-    dprintf(("sendto returned %X\n", rc));
-    return(rc);
-}
-
-int WIN32API OS2setsockopt (SOCKET s, int level, int optname,
-                         const char * optval, int optlen)
-{
-struct Wlinger *yy;
-struct linger xx;
-
-#ifdef DEBUG
-    WriteLog("WSOCK32: setsockopt\n");
-#endif
-
-    if(level == SOL_SOCKET && optname == SO_LINGER) {
-	yy = (struct Wlinger *)optval;
-	xx.l_onoff = (int)yy->l_onoff;
-	xx.l_linger = (int)yy->l_linger;
-
-        return setsockopt(s,level,optname,(const char *)&xx,optlen);
-    } 
-
-    else return setsockopt(s,level,optname,optval,optlen);
-
-}
-
-int WIN32API OS2shutdown (SOCKET s, int how)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: shutdown\n");
-#endif
-
-    return shutdown(s,how);
-}
-
-SOCKET WIN32API OS2socket (int af, int type, int protocol)
-{
-SOCKET s;
-AsyncStatus *as;
-#ifdef DEBUG
-    WriteLog("WSOCK32: socket\n");
-#endif
-
-    s = (SOCKET)socket(af,type,protocol);
-
-    if(s > 0) {
-        as = (AsyncStatus *)malloc(sizeof(AsyncStatus));
-        if(as != NULL) {
-           as->hwnd = (HWND)0;
-           as->msg = 0;
-           as->event = 0L;
-           as->socket = s;
-           as->status = BLOCKING;
-           as->threadID = 0;
-           as->MsgStat = 0;
-           as->Next = TopASY;
-           as->Prev = NULL;
-           if(TopASY) TopASY->Prev = as;
-           TopASY = as;
-        } else {
-            soclose(s);
-            return -1;
-        }
-    }
-    dprintf(("WSOCK32: socket returned %X\n", s));
-
-return s;
-}
-
-/* Database function prototypes */
-
-
-void SetErrForDatabaseCalls(void)
-{
-
-    switch(h_errno) {
-        case 1:
-            OS2WSASetLastError(11001); // host not found
-            break;
-        case 2:
-            OS2WSASetLastError(11002); // try again later
-            break;
-        case 3:
-            OS2WSASetLastError(11003); // No recovery
-            break;
-        case 4:
-            OS2WSASetLastError(11004); // No address or no data
-            break;
-        default:
-            OS2WSASetLastError(0); // unknown error and should never get here
-#ifdef DEBUG
-WriteLog("WSOCK32: Unknown error condition: %d\n",h_errno);
-#endif
-            break;
-    }
-
-return;
-}
-
-
-
-
-WHOSTENT * WIN32API OS2gethostbyaddr(const char * addr,
-                                        int len, int type)
-{
-WHOSTENT *yy;
-struct hostent *xx;
-#ifdef DEBUG
-    WriteLog("WSOCK32: gethostbyaddr\n");
-#endif
-
-    xx = gethostbyaddr(addr,len,type);
-
-    if(xx == NULL) {
-        SetErrForDatabaseCalls();
-        return (WHOSTENT *)NULL;
-    }
-
-    whsnt.h_name = xx->h_name;
-    whsnt.h_aliases = xx->h_aliases;
-    whsnt.h_addrtype = (short)xx->h_addrtype;
-    whsnt.h_length = (short)xx->h_length;
-    whsnt.h_addr_list = xx->h_addr_list;
-
-return &whsnt;
-}
-
-
-
-
-WHOSTENT * WIN32API OS2gethostbyname(const char * name)
-{
-WHOSTENT *yy;
-struct hostent *xx;
-#ifdef DEBUG
-    WriteLog("WSOCK32: gethostbyname: %s\n",name);
-#endif
-
-    xx = gethostbyname(name);
-
-    if(xx == NULL) {
-        SetErrForDatabaseCalls();
-        return (WHOSTENT *)NULL;
-    }
-
-    whsnt.h_name = xx->h_name;
-    whsnt.h_aliases = xx->h_aliases;
-    whsnt.h_addrtype = (short)xx->h_addrtype;
-    whsnt.h_length = (short)xx->h_length;
-    whsnt.h_addr_list = xx->h_addr_list;
-  
-return &whsnt;    
-}
-
-
-
-
-
-
-int WIN32API _OS2gethostname (char * name, int namelen)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: _gethostname\n");
-#endif
-
-    return gethostname(name,namelen);
-}
-
-
-
-int WIN32API OS2gethostname (char * name, int namelen)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: gethostname\n");
-#endif
-
-    return gethostname(name,namelen);
-}
-
-WSERVENT * WIN32API OS2getservbyport(int port, const char * proto)
-{
-struct servent *xx;
-#ifdef DEBUG
-    WriteLog("WSOCK32: getservbyport\n");
-#endif
-
-    xx = getservbyport(port,proto);
-
-    if(xx == NULL) { // this call doesn't generate an error message
-        return (WHOSTENT *)NULL;
-    }
-
-    wsvnt.s_name = xx->s_name;
-    wsvnt.s_aliases = xx->s_aliases;
-    wsvnt.s_port = (short)xx->s_port;
-    wsvnt.s_proto = xx->s_proto;
-
-return &wsvnt;
-}
-
-WSERVENT * WIN32API OS2getservbyname(const char * name,
-                                        const char * proto)
-{
-WSERVENT *yy;
-struct servent *xx;
-#ifdef DEBUG
-    WriteLog("WSOCK32: getservbyname\n");
-#endif
-
-    xx = getservbyname(name,proto);
-
-    if(xx == NULL) { // this call doesn't generate an error message
-      return (WHOSTENT *)NULL;
-    }
-
-    wsvnt.s_name = xx->s_name;
-    wsvnt.s_aliases = xx->s_aliases;
-    wsvnt.s_port = (short)xx->s_port;
-    wsvnt.s_proto = xx->s_proto;
-
-return &wsvnt;
-}
-
-WPROTOENT * WIN32API OS2getprotobynumber(int proto)
-{
-struct protoent *xx;
-#ifdef DEBUG
-    WriteLog("WSOCK32: getprotobynumber\n");
-#endif
-
-    xx = getprotobynumber(proto);
-
-    if(xx == NULL) { // this call doesn't generate an error message
-        return (WHOSTENT *)NULL;
-    }
-
-    wptnt.p_name = xx->p_name;
-    wptnt.p_aliases = xx->p_aliases;
-    wptnt.p_proto = (short)xx->p_proto;
-
-return &wptnt;
-}
-
-WPROTOENT * WIN32API OS2getprotobyname(const char * name)
-{
-struct protoent *xx;
-#ifdef DEBUG
-    WriteLog("WSOCK32: getprotobyname\n");
-#endif
-
-    xx = getprotobyname(name);
-
-    if(xx == NULL) { // this call doesn't generate an error message
-        return (WHOSTENT *)NULL;
-    }
-
-    wptnt.p_name = xx->p_name;
-    wptnt.p_aliases = xx->p_aliases;
-    wptnt.p_proto = (short)xx->p_proto;
-
-return &wptnt;
-}
-
-
-
-
-int WIN32API OS2WSAStartup(USHORT wVersionRequired, LPWSADATA lpWsaData)
-{
-APIRET rc;
-int ii;
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAStartup\n");
-#endif
-  /* Make sure that the version requested is >= 1.1.   */
-  /* The low byte is the major version and the high    */
-  /* byte is the minor version.                        */
-  
-  if ( LOBYTE( wVersionRequired ) < 1 ||
-       ( LOBYTE( wVersionRequired ) == 1 &&
-         HIBYTE( wVersionRequired ) < 1 )) {
-      return WSAVERNOTSUPPORTED;
-  }
-  
-  /* Since we only support 1.1, set both wVersion and  */
-  /* wHighVersion to 1.1.                              */
-  
-  lpWsaData->wVersion = MAKEWORD( 1, 1 );
-  lpWsaData->wHighVersion = MAKEWORD( 1, 1 );
-  strcpy(lpWsaData->szDescription,"Win32OS2 WSOCK32.DLL Ver. 1.1");
-  lpWsaData->iMaxUdpDg = 32767;
-  lpWsaData->iMaxSockets = 2048;
-  strcpy(lpWsaData->szSystemStatus,"No Status");
-
-  LocalErrorNumber = 0;
-
-  if(sock_init() == 0) {
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAStartup sock_init returned 0\n");
-#endif
-      return 0;
-  }
-  else ii = sock_errno();
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAStartup exiting: %d\n",ii);
-#endif
-return ii;
-}
-
-
-
-
-
-
-int WIN32API OS2WSACleanup(void)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSACleanup\n");
-#endif
-
-    CheckThreads((AsyncStatus *)NULL);
-    
-    return 0;
-}
-
-void WIN32API OS2WSASetLastError(int iError)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSASetLastError(%d)\n",iError);
-#endif
-
-    LocalErrorNumber = iError;
-    
-    return; 
-}
-
-int WIN32API OS2WSAGetLastError(void)
-{
-int ii;
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAGetLastError\n");
-#endif
-
-    if(LocalErrorNumber == 0) {
-        ii = sock_errno(); // WSAGetLastError();
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAGetLastError: %d\n",ii);
-#endif
-	return ii;
-    }
-    else {
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAGetLastError: %d\n",LocalErrorNumber);
-#endif
-	return LocalErrorNumber;
-    }
-}
-
-BOOL WIN32API OS2WSAIsBlocking(void)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAIsBlocking unimplemented\n");
-#endif
-
-    return -5000; //WSAIsBlocking();
-}
-
-int WIN32API OS2WSAUnhookBlockingHook(void)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAUnhookBlockingHook unimplemented\n");
-#endif
-
-    return -5000; //WSAUnhookBlockingHook();
-}
-
-FARPROC WIN32API OS2WSASetBlockingHook(FARPROC lpBlockFunc)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSASetBlockingHook Unimplemented\n");
-#endif
-
-    return (FARPROC)NULL;
-}
-
-int WIN32API OS2WSACancelBlockingCall(void)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSACancelBlockingCall unimplemented\n");
-#endif
-
-    return -5000; //WSACancelBlockingCall();
-}
-
-
-
-
-
-// The following 6 calls need to start a new thread, perform
-// the operation, copy ALL the info to the buffer provided then
-// notify the sender.
-
-
-LHANDLE WIN32API OS2WSAAsyncGetServByName(HWND hWnd, u_int wMsg,
-                                        const char * name,
-                                        const char * proto,
-                                        char * buf, int buflen)
-{
-WSAStruct *wsa;
-PFNTHREAD   pfnAsyncThread = &WSAFunct; /* Address of thread program   */
-ULONG       ulThreadParm = 100;          /* Parameter to thread routine     */
-APIRET      rc           = NO_ERROR;     /* Return code */
-TID         tid;
-
-
-OS2WSASetLastError(WSAEWOULDBLOCK);
-return 0;
-
-#ifdef DEBUG
-WriteLog("WSOCK32: WSAAsyncGetServByName.  name: %s, proto: %s \n",name,proto);
-#endif
-
-    wsa = (WSAStruct *)malloc(sizeof(WSAStruct));
-    if(wsa == NULL) {
-        OS2WSASetLastError(WSAEWOULDBLOCK);
-        return 0;
-    }
-
-    wsa->CallingWhat = GETSERVBYNAME;
-    wsa->hw = hWnd;
-    wsa->msg = wMsg;
-    wsa->carg1 = strdup(name);
-    wsa->carg2 = strdup(proto);
-    wsa->buf = buf;
-    wsa->buflen = buflen;
-
-    ulThreadParm = (ULONG)wsa;
-    
-    rc = DosCreateThread(&tid,           /* Thread ID (returned by function)  */
-                         pfnAsyncThread, /* Address of thread program         */
-                         ulThreadParm,   /* Parameter passed to ThreadProc    */
-                         CREATE_READY |  /* Thread is ready when created      */
-                         STACK_SPARSE,   /* Do not pre-commit stack pages     */
-                         8192L);         /* Stack size, rounded to page bdy   */
-    if (rc != NO_ERROR) {
-#ifdef DEBUG
-        WriteLog("WSOCK32: DosCreateThread error in WSAAsyncGetServByName: return code = %u\n", rc);
-#endif
-        OS2WSASetLastError(rc);
-        free(wsa);
-        return 0;
-    }
-
-#ifdef DEBUG
-    WriteLog("WSOCK32 THREAD: DosCreateThread's tid: %lu, ThreadParm = %p\n",(unsigned long)tid,ulThreadParm);
-    WriteLog("WSOCK32 THREAD: hwnd: %p\n",wsa->hw);
-#endif
-
-    return (LHANDLE)tid; //WSAAsyncGetServByName(hWnd,wMsg,name,proto,buf,buflen);
-}
-
-LHANDLE WIN32API OS2WSAAsyncGetServByPort(HWND hWnd, u_int wMsg, int port,
-                                        const char * proto, char * buf,
-                                        int buflen)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAAsyncGetServByPort unimplemented\n");
-#endif
-
-    return -5000; //WSAAsyncGetServByPort(hWnd,wMsg,port,proto,buf,buflen);
-}
-
-LHANDLE WIN32API OS2WSAAsyncGetProtoByName(HWND hWnd, u_int wMsg,
-                                         const char * name, char * buf,
-                                         int buflen)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAAsyncGetProtoByName unimplemented\n");
-#endif
-
-    return -5000; //WSAAsyncGetProtoByName(hWnd,wMsg,name,buf,buflen);
-}
-
-LHANDLE WIN32API OS2WSAAsyncGetProtoByNumber(HWND hWnd, u_int wMsg,
-                                           int number, char * buf,
-                                           int buflen)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAAsyncGetProtoByNumber unimplemented\n");
-#endif
-
-    return -5000; //WSAAsyncGetProtoByNumber(hWnd,wMsg,number,buf,buflen);
-}
-
-LHANDLE WIN32API OS2WSAAsyncGetHostByName(HWND hWnd, u_int wMsg,
-                                        const char * name, char * buf,
-                                        int buflen)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAAsyncGetHostByName unimplemented\n");
-#endif
-
-    return -5000; //WSAAsyncGetHostByName(hWnd,wMsg,name,buf,buflen);
-}
-
-LHANDLE WIN32API OS2WSAAsyncGetHostByAddr(HWND hWnd, u_int wMsg,
-                                        const char * addr, int len, int type,
-                                        char * buf, int buflen)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAAsyncGetHostByAddr unimplemented\n");
-#endif
-
-
-
-
-    
-    return -5000; //WSAAsyncGetHostByAddr(hWnd,wMsg,addr,len,type,buf,buflen);
-}
-
-
-
-
-
-
-
-int WIN32API OS2WSACancelAsyncRequest(LHANDLE hAsyncTaskHandle)
-{
-TID tid;
-APIRET rc;
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSACancelAsyncRequest unimplemented\n");
-#endif
-
-    rc = 0;
-    
-    tid = (LHANDLE)hAsyncTaskHandle;
-
-    if(tid == 0) rc = WSAEINVAL;
-
-    if(!rc) rc = DosKillThread(tid);
-
-    switch(rc) {
-        case 0: // SUCCESS!!
-            return 0;
-        case 170:
-            rc = WSAEINPROGRESS;
-            break;
-        case 309:
-            rc = WSAEINVAL;
-            break;
-        default:
-            rc = -5000;
-            break;
-    } // end switch
-
-    OS2WSASetLastError(rc);
-    return SOCKET_ERROR; // ERROR!
-}
-
-
-
-
-
-int WIN32API OS2WSAAsyncSelect(SOCKET s, HWND hWnd, u_int wMsg,
-                            long lEvent)
-{
-PFNTHREAD   pfnAsyncThread = &AsyncLoop; /* Address of thread program   */
-ULONG       ulThreadParm = 100;          /* Parameter to thread routine     */
-APIRET      rc           = NO_ERROR;     /* Return code                     */
-unsigned long ii;
-AsyncStatus *as;
-#ifdef DEBUG
-char buf[150];
-sprintf(buf,"WSOCK32: WSAAsyncSelect\n         Message: %x\n         Event: %ld\n         hwindow: %x\n",
-        wMsg,lEvent,(HWND)hWnd);
-    WriteLog(buf);
-#endif
-
-    as = FindASY(s);
-
-    if(as == NULL) return 0;
-    
-    CheckThreads(as);
-
-    as->hwnd = hWnd;
-    as->msg = wMsg;
-    as->event = lEvent;
-
-    ulThreadParm = (ULONG)as;
-    
-    rc = DosCreateThread(&(as->threadID),  /* Thread ID (returned by function)  */
-                         pfnAsyncThread, /* Address of thread program         */
-                         ulThreadParm,   /* Parameter passed to ThreadProc    */
-                         CREATE_READY |  /* Thread is ready when created      */
-                         STACK_SPARSE,   /* Do not pre-commit stack pages     */
-                         8192L);         /* Stack size, rounded to page bdy   */
-    if (rc != NO_ERROR) {
-#ifdef DEBUG
-        WriteLog("WSOCK32: DosCreateThread error: return code = %u\n", rc);
-#endif
-        OS2WSASetLastError(rc);
-        return 0;
-    }
-
-    return 1; //WSAAsyncSelect(s,hWnd,wMsg,lEvent);
-}
-
-
-
-void _System AsyncLoop(ULONG ASP)
-{
-int socks[1],r,w,e,rc,ii;
-AsyncStatus *as;
-
-    as = (AsyncStatus *)ASP;
-
-    r = w = e = 0;
-    if(as->event & FD_READ) r = 1;
-    if(as->event & FD_WRITE) w = 1;
-    if(as->event & FD_OOB) e = 1;
-
-    socks[0] = (int)as->socket;
-
-    if((r+w+e) == 0) {
-#ifdef DEBUG
-        WriteLog("WSOCK32: Turning off async\n");
-#endif
-        ii = 0;
-        rc = ioctl(socks[0],FIONBIO,(char *)&ii,sizeof(ii));
-        as->threadID = 0;
-        as->hwnd = 0;
-        as->msg = 0;
-        as->event = 0;
-        as->status = BLOCKING;
-        return;
-    } // end if
-    else
-    {
-#ifdef DEBUG
-        WriteLog("WSOCK32: Setting up non-blocking sockets\n");
-#endif
-        ii = 1;
-        rc = ioctl(socks[0],FIONBIO,(char *)&ii,sizeof(ii));
-        if(rc != 0) {
-#ifdef DEBUG
-	    WriteLog("WSOCK32: ioctl failed trying to non-block.\n");
-#endif
-	    return;
-        } 
-        as->status = NONBLOCKING;
-    } // end else
-
-    do {
-        rc = select(socks,r,0,0,0); // ioctl may be better for this.
-        if(rc > 0) {
-            rc = ioctl(socks[0],FIONREAD,(char *)&ii,sizeof(ii));
-            if(rc == 0 && ii > 0) {
-            /* data is ready */
-                NotifyApp(FD_READ,as);
-//#ifdef DEBUG
-//                WriteLog("WSOCK32: Data Waiting\n");
-//#endif
-            }
-        }
-        if(rc < 0) {
-            rc = sock_errno();
-            /* something ain't right */
-            if(rc == 10038) { // Connection closed
-                NotifyApp(FD_CLOSE,as);
-                DosSleep(500);
-                return;
-            }
-#ifdef DEBUG
-            WriteLog("WSOCK32: Select error: %d\n",rc);
-#endif
-        } // end if
-        DosSleep(50);
-    } while(1);
-
-return;
-}
-
-
-
-void CheckThreads(AsyncStatus *as)
-{
-AsyncStatus *asy;
-
-    if(as != NULL)
-        if(as->threadID != 0) DosKillThread(as->threadID);
-
-    for(asy = TopASY; asy; asy = asy->Next)
-        if(asy->threadID != 0) DosKillThread(asy->threadID);
-    
-return;
-}
-
-
-
-void NotifyApp(int xx,AsyncStatus *as)
-{
-    BOOL    fResult;        /* message-posted indicator             */
-    unsigned long ii;
-
-
-//#ifdef DEBUG
-//    WriteLog("WSOCK32: Notifying the caller.  rc = %d\n",xx);
-//#endif
-
-    if(as->MsgStat == 0) {
-        fResult = Notify(as,xx);
-#ifdef DEBUG
-    WriteLog("WSOCK32: Notify returns: %d\n",fResult);
-#endif
-    } // end if
-
-    if(as->MsgStat == 2) as->MsgStat = 0;
-    else as->MsgStat = 1;
-
-return;
-}
-
-
-
-void _System WSAFunct(ULONG xx)
-{
-WSAStruct *wsa;
-WSERVENT *ooo;
-char *yy;
-int ii;
-size_t ss;
-UINT wp;
-LONG lp;
-int id = *_threadid;
-
-    wsa = (WSAStruct *)xx;
-
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSAFunct: xx = %p, hwnd = %p\n",xx,wsa->hw);
-    WriteLog("WSOCK32: WSAFunct info carg1 = %s, carg2 = %s\n",wsa->carg1,wsa->carg2);
-    WriteLog("WSOCK32: WSAFunct info buf = %p, %d\n",wsa->buf,wsa->buflen);
-#endif
-
-    switch (wsa->CallingWhat) {
-        case GETSERVBYNAME:
-            yy = (char *)OS2getservbyname(wsa->carg1,wsa->carg2);
-            ss = sizeof(WSERVENT);
-            break;
-        case GETSERVBYPORT:
-            yy = (char *)OS2getservbyport(wsa->iarg1,wsa->carg1);
-            break;
-        case GETPROTOBYNUMBER:
-            yy = (char *)OS2getprotobynumber(wsa->iarg1);
-            break;
-        case GETPROTOBYNAME:
-            yy = (char *)OS2getprotobyname(wsa->carg1);
-            break;
-        case GETHOSTBYNAME:
-            yy = (char *)OS2gethostbyname(wsa->carg1);
-            break;
-        case GETHOSTBYADDR:
-            yy = (char *)OS2gethostbyaddr(wsa->carg1,wsa->iarg1,wsa->iarg2);
-            break;
-        default:
-            yy = (char *)NULL;
-            OS2WSASetLastError(-5000);
-            break;
-    } // end switch
-
-#ifdef DEBUG
-    WriteLog("WSOCK32: THREAD id = %lu\n",(unsigned long)id);
-    if(yy) {
-        ooo = (WSERVENT *)yy;
-        WriteLog("WSOCK32: WSAFunct service name = %s\n",ooo->s_name);
-        WriteLog("WSOCK32: WSAFunct service port = %d\n",(int)ooo->s_port);
-    }
-#endif
-
-    wp = id;
-
-    if(yy == (char *)NULL) {
-#ifdef DEBUG
-        WriteLog("WSOCK32: WSAFunct error\n");
-        WriteLog("WSOCK32: WSAFunct error carg1 = %s, carg2 = %s\n",wsa->carg1,wsa->carg2);
-#endif
-        ii = OS2WSAGetLastError();
-        lp = OS2WSAMAKEASYNCREPLY(0,ii);
-    } // end if
-
-    else {
-        if(wsa->buflen < ss) ii = WSAENOBUFS;
-        else ii = 0;
-        lp = OS2WSAMAKEASYNCREPLY(ss,ii);
-        if(ii == 0) memmove(*(wsa->buf),yy,ss);
-    }
-
-#ifdef DEBUG
-#endif
-
-    
-    do {
-        if(WinQueryAnchorBlock(wsa->hw))
-            ii = NotifyWSA(wsa->hw,wsa->msg,wp,lp);
-    } while(ii != TRUE);
-
-    free(wsa);
-
-return;
-}
-
-
-
-    
-
-int WIN32API OS2WSARecvEx (SOCKET s, char FAR * buf, int len, int FAR *flags)
-{
-#ifdef DEBUG
-    WriteLog("WSOCK32: WSARecvEx not implemented.\n");
-#endif
-
-//    return WSARecvEx(s,buf,len,flags);
-    return 0;
-}
-
-void WIN32API OS2s_perror(char *pszMessage,
-                          void *pUnknown)
-{
-  perror(pszMessage);
-}
-
-
-//typedef struct _TRANSMIT_FILE_BUFFERS {
-//    PVOID Head;
-//    DWORD HeadLength;
-//    PVOID Tail;
-//    DWORD TailLength;
-//} TRANSMIT_FILE_BUFFERS, *PTRANSMIT_FILE_BUFFERS, *LPTRANSMIT_FILE_BUFFERS;
-//
-//BOOL WIN32API OS2TransmitFile (
-//    IN SOCKET hSocket,
-//    IN HANDLE hFile,
-//    IN DWORD nNumberOfBytesToWrite,
-//    IN DWORD nNumberOfBytesPerSend,
-//    IN LPOVERLAPPED lpOverlapped,
-//    IN LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers,
-//    IN DWORD dwReserved)
-//{
-//    return FALSE;
-//}
-
-
-
-
-
-
-
-
-
-
-
Index: trunk/src/wsock32/wsock32.vpj
===================================================================
--- trunk/src/wsock32/wsock32.vpj	(revision 47)
+++ 	(revision )
@@ -1,29 +1,0 @@
-[COMPILER]
-compile=concur|capture|:Compile:&Compile,nmake %n.obj
-make=concur|capture|:Build:&Build,nmake
-rebuild=concur|capture|:Rebuild:&Rebuild,nmake /A
-debug=:Debug:&Debug,ipmd wsock32.dll
-execute=:Execute:E&xecute,wsock32.dll
-user1=hide|:User 1:User 1,
-user2=hide|:User 2:User 2,
-usertool_resource_editor=hide|:Resource Editor:Resource Editor,dlgedit
-workingdir=
-includedirs=..\..\include;%(INCLUDE)
-tagfiles=
-reffile=
-MACRO=\n
-FILTEREXPANSION=1 1 1 1 1
-[FILES]
-INITTERM.C
-makefile
-notify.c
-wsock32.c
-wsock32.def
-wsock32.h
-..\..\include\w_winsock.h
-[ASSOCIATION]
-[STATE]
-FILEHIST: 0
-PRINTER: 2
-
-
