mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
Added vfw.h header for compiling comctl32.dll with older w32api.
svn path=/trunk/; revision=6253
This commit is contained in:
parent
fb45e50cc0
commit
8d31e83bb5
12 changed files with 1519 additions and 268 deletions
|
@ -23,7 +23,7 @@ MP := 0
|
||||||
#
|
#
|
||||||
# Whether to compile for ACPI compliant systems
|
# Whether to compile for ACPI compliant systems
|
||||||
#
|
#
|
||||||
ACPI := 0
|
ACPI := 1
|
||||||
|
|
||||||
#
|
#
|
||||||
# Whether to use Structured Exception Handling
|
# Whether to use Structured Exception Handling
|
||||||
|
|
1130
reactos/include/wine/vfw.h
Normal file
1130
reactos/include/wine/vfw.h
Normal file
File diff suppressed because it is too large
Load diff
|
@ -267,7 +267,7 @@ StretchBlt(
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("FIXME: StretchBlt can only Blt, not Stretch!\n");
|
DPRINT1("FIXME: StretchBlt can only Blt, not Stretch!\n");
|
||||||
return FALSE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: create.c,v 1.70 2003/09/12 17:51:47 vizzini Exp $
|
/* $Id: create.c,v 1.71 2003/10/06 17:53:55 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -326,6 +326,7 @@ _except_handler(
|
||||||
void * DispatcherContext )
|
void * DispatcherContext )
|
||||||
{
|
{
|
||||||
DPRINT1("Process terminated abnormally due to unhandled exception\n");
|
DPRINT1("Process terminated abnormally due to unhandled exception\n");
|
||||||
|
DPRINT1("Address: %x\n", ExceptionRecord->ExceptionAddress);
|
||||||
|
|
||||||
if (3 < ++_except_recursion_trap)
|
if (3 < ++_except_recursion_trap)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: button.c,v 1.11 2003/09/07 17:36:40 ekohl Exp $
|
/* $Id: button.c,v 1.12 2003/10/06 17:53:55 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS User32
|
* PROJECT: ReactOS User32
|
||||||
|
@ -142,7 +142,7 @@ inline static WCHAR *get_button_text( HWND hwnd )
|
||||||
GetWindowTextW( hwnd, buffer, len );
|
GetWindowTextW( hwnd, buffer, len );
|
||||||
buffer[len] = 0;
|
buffer[len] = 0;
|
||||||
}
|
}
|
||||||
DbgPrint("[button] TextLen %d Text = %s\n", len, buffer);
|
DbgPrint("[button] TextLen %d Text = %S\n", len, buffer);
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: bitmap.c,v 1.14 2003/08/22 20:17:08 weiden Exp $
|
/* $Id: bitmap.c,v 1.15 2003/10/06 17:53:55 navaraf Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
* FILE: lib/user32/windows/input.c
|
* FILE: lib/user32/windows/input.c
|
||||||
|
@ -596,7 +596,6 @@ LoadImageW(HINSTANCE hinst,
|
||||||
return(LoadIconImage(hinst, lpszName, cxDesired, cyDesired, fuLoad));
|
return(LoadIconImage(hinst, lpszName, cxDesired, cyDesired, fuLoad));
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
DbgBreakPoint();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
|
|
@ -577,6 +577,8 @@ RtlFormatCurrentUserKeyPath(IN OUT PUNICODE_STRING KeyPath)
|
||||||
/* ------------------------------------------ Private Implementation */
|
/* ------------------------------------------ Private Implementation */
|
||||||
|
|
||||||
|
|
||||||
|
#define HACK
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
RtlpGetRegistryHandle(ULONG RelativeTo,
|
RtlpGetRegistryHandle(ULONG RelativeTo,
|
||||||
PWSTR Path,
|
PWSTR Path,
|
||||||
|
@ -590,6 +592,13 @@ RtlpGetRegistryHandle(ULONG RelativeTo,
|
||||||
|
|
||||||
if (RelativeTo & RTL_REGISTRY_HANDLE)
|
if (RelativeTo & RTL_REGISTRY_HANDLE)
|
||||||
{
|
{
|
||||||
|
#ifdef HACK
|
||||||
|
ULONG PreviousMode;
|
||||||
|
extern VOID KeSetPreviousMode(ULONG Mode);
|
||||||
|
|
||||||
|
PreviousMode = KeGetPreviousMode();
|
||||||
|
KeSetPreviousMode(KernelMode);
|
||||||
|
#endif
|
||||||
Status = NtDuplicateObject(NtCurrentProcess(),
|
Status = NtDuplicateObject(NtCurrentProcess(),
|
||||||
(HANDLE)Path,
|
(HANDLE)Path,
|
||||||
NtCurrentProcess(),
|
NtCurrentProcess(),
|
||||||
|
@ -597,6 +606,9 @@ RtlpGetRegistryHandle(ULONG RelativeTo,
|
||||||
0,
|
0,
|
||||||
FALSE,
|
FALSE,
|
||||||
DUPLICATE_SAME_ACCESS);
|
DUPLICATE_SAME_ACCESS);
|
||||||
|
#ifdef HACK
|
||||||
|
KeSetPreviousMode(PreviousMode);
|
||||||
|
#endif
|
||||||
return(Status);
|
return(Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: driver.c,v 1.18 2003/09/29 20:43:06 navaraf Exp $
|
/* $Id: driver.c,v 1.19 2003/10/06 17:53:55 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
* 15/05/98: Created
|
* 15/05/98: Created
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* INCLUDES ****************************************************************/
|
/* INCLUDES *******************************************************************/
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
|
@ -19,23 +19,20 @@
|
||||||
#include <internal/id.h>
|
#include <internal/id.h>
|
||||||
#include <internal/pool.h>
|
#include <internal/pool.h>
|
||||||
#include <internal/registry.h>
|
#include <internal/registry.h>
|
||||||
|
#include <internal/se.h>
|
||||||
|
|
||||||
#include <roscfg.h>
|
#include <roscfg.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <internal/debug.h>
|
||||||
|
|
||||||
|
|
||||||
typedef struct _SERVICE_GROUP
|
typedef struct _SERVICE_GROUP
|
||||||
{
|
{
|
||||||
LIST_ENTRY GroupListEntry;
|
LIST_ENTRY GroupListEntry;
|
||||||
UNICODE_STRING GroupName;
|
UNICODE_STRING GroupName;
|
||||||
|
|
||||||
BOOLEAN ServicesRunning;
|
BOOLEAN ServicesRunning;
|
||||||
|
|
||||||
} SERVICE_GROUP, *PSERVICE_GROUP;
|
} SERVICE_GROUP, *PSERVICE_GROUP;
|
||||||
|
|
||||||
|
|
||||||
typedef struct _SERVICE
|
typedef struct _SERVICE
|
||||||
{
|
{
|
||||||
LIST_ENTRY ServiceListEntry;
|
LIST_ENTRY ServiceListEntry;
|
||||||
|
@ -50,11 +47,9 @@ typedef struct _SERVICE
|
||||||
ULONG Tag;
|
ULONG Tag;
|
||||||
|
|
||||||
BOOLEAN ServiceRunning; // needed ??
|
BOOLEAN ServiceRunning; // needed ??
|
||||||
|
|
||||||
} SERVICE, *PSERVICE;
|
} SERVICE, *PSERVICE;
|
||||||
|
|
||||||
|
/* GLOBALS ********************************************************************/
|
||||||
/* GLOBALS *******************************************************************/
|
|
||||||
|
|
||||||
static LIST_ENTRY GroupListHead = {NULL, NULL};
|
static LIST_ENTRY GroupListHead = {NULL, NULL};
|
||||||
static LIST_ENTRY ServiceListHead = {NULL, NULL};
|
static LIST_ENTRY ServiceListHead = {NULL, NULL};
|
||||||
|
@ -64,8 +59,7 @@ POBJECT_TYPE EXPORTED IoDriverObjectType = NULL;
|
||||||
#define TAG_DRIVER TAG('D', 'R', 'V', 'R')
|
#define TAG_DRIVER TAG('D', 'R', 'V', 'R')
|
||||||
#define TAG_DRIVER_EXTENSION TAG('D', 'R', 'V', 'E')
|
#define TAG_DRIVER_EXTENSION TAG('D', 'R', 'V', 'E')
|
||||||
|
|
||||||
|
/* PRIVATE FUNCTIONS **********************************************************/
|
||||||
/* FUNCTIONS ***************************************************************/
|
|
||||||
|
|
||||||
NTSTATUS STDCALL
|
NTSTATUS STDCALL
|
||||||
IopCreateDriver(PVOID ObjectBody,
|
IopCreateDriver(PVOID ObjectBody,
|
||||||
|
@ -111,229 +105,6 @@ IopInitDriverImplementation(VOID)
|
||||||
RtlInitUnicodeStringFromLiteral(&IoDriverObjectType->TypeName, L"Driver");
|
RtlInitUnicodeStringFromLiteral(&IoDriverObjectType->TypeName, L"Driver");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* NAME EXPORTED
|
|
||||||
* NtLoadDriver
|
|
||||||
*
|
|
||||||
* DESCRIPTION
|
|
||||||
* Loads a device driver.
|
|
||||||
*
|
|
||||||
* ARGUMENTS
|
|
||||||
* DriverServiceName
|
|
||||||
* Name of the service to load (registry key).
|
|
||||||
*
|
|
||||||
* RETURN VALUE
|
|
||||||
* Status.
|
|
||||||
*
|
|
||||||
* REVISIONS
|
|
||||||
*/
|
|
||||||
NTSTATUS STDCALL
|
|
||||||
NtLoadDriver(IN PUNICODE_STRING DriverServiceName)
|
|
||||||
{
|
|
||||||
RTL_QUERY_REGISTRY_TABLE QueryTable[3];
|
|
||||||
WCHAR FullImagePathBuffer[MAX_PATH];
|
|
||||||
UNICODE_STRING ImagePath;
|
|
||||||
UNICODE_STRING FullImagePath;
|
|
||||||
NTSTATUS Status;
|
|
||||||
ULONG Type;
|
|
||||||
PDEVICE_NODE DeviceNode;
|
|
||||||
PMODULE_OBJECT ModuleObject;
|
|
||||||
LPWSTR Start;
|
|
||||||
|
|
||||||
DPRINT("NtLoadDriver(%wZ) called\n", DriverServiceName);
|
|
||||||
|
|
||||||
RtlInitUnicodeString(&ImagePath, NULL);
|
|
||||||
|
|
||||||
/* Get service data */
|
|
||||||
RtlZeroMemory(&QueryTable,
|
|
||||||
sizeof(QueryTable));
|
|
||||||
|
|
||||||
QueryTable[0].Name = L"Type";
|
|
||||||
QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED;
|
|
||||||
QueryTable[0].EntryContext = &Type;
|
|
||||||
|
|
||||||
QueryTable[1].Name = L"ImagePath";
|
|
||||||
QueryTable[1].Flags = RTL_QUERY_REGISTRY_DIRECT;
|
|
||||||
QueryTable[1].EntryContext = &ImagePath;
|
|
||||||
|
|
||||||
Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
|
|
||||||
DriverServiceName->Buffer,
|
|
||||||
QueryTable,
|
|
||||||
NULL,
|
|
||||||
NULL);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
DPRINT1("RtlQueryRegistryValues() failed (Status %lx)\n", Status);
|
|
||||||
RtlFreeUnicodeString(&ImagePath);
|
|
||||||
return(Status);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImagePath.Length == 0)
|
|
||||||
{
|
|
||||||
wcscpy(FullImagePathBuffer, L"\\SystemRoot\\system32\\drivers");
|
|
||||||
wcscat(FullImagePathBuffer, wcsrchr(DriverServiceName->Buffer, L'\\'));
|
|
||||||
wcscat(FullImagePathBuffer, L".sys");
|
|
||||||
}
|
|
||||||
else if (ImagePath.Buffer[0] != L'\\')
|
|
||||||
{
|
|
||||||
wcscpy(FullImagePathBuffer, L"\\SystemRoot\\");
|
|
||||||
wcscat(FullImagePathBuffer, ImagePath.Buffer);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wcscpy(FullImagePathBuffer, ImagePath.Buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
RtlFreeUnicodeString(&ImagePath);
|
|
||||||
RtlInitUnicodeString(&FullImagePath, FullImagePathBuffer);
|
|
||||||
|
|
||||||
DPRINT("FullImagePath: '%S'\n", FullImagePathBuffer);
|
|
||||||
DPRINT("Type %lx\n", Type);
|
|
||||||
|
|
||||||
/* Use IopRootDeviceNode for now */
|
|
||||||
Status = IopCreateDeviceNode(IopRootDeviceNode, NULL, &DeviceNode);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
DPRINT1("IopCreateDeviceNode() failed (Status %lx)\n", Status);
|
|
||||||
return(Status);
|
|
||||||
}
|
|
||||||
|
|
||||||
ModuleObject = LdrGetModuleObject(DriverServiceName);
|
|
||||||
if (ModuleObject != NULL)
|
|
||||||
{
|
|
||||||
return(STATUS_IMAGE_ALREADY_LOADED);
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = LdrLoadModule(&FullImagePath, &ModuleObject);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
DPRINT1("LdrLoadModule() failed (Status %lx)\n", Status);
|
|
||||||
IopFreeDeviceNode(DeviceNode);
|
|
||||||
return(Status);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set a service name for the device node */
|
|
||||||
Start = wcsrchr(DriverServiceName->Buffer, L'\\');
|
|
||||||
if (Start == NULL)
|
|
||||||
Start = DriverServiceName->Buffer;
|
|
||||||
else
|
|
||||||
Start++;
|
|
||||||
RtlCreateUnicodeString(&DeviceNode->ServiceName, Start);
|
|
||||||
|
|
||||||
Status = IopInitializeDriver(ModuleObject->EntryPoint,
|
|
||||||
DeviceNode,
|
|
||||||
(Type == 2 || Type == 8),
|
|
||||||
ModuleObject->Base,
|
|
||||||
ModuleObject->Length,
|
|
||||||
FALSE);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
DPRINT1("IopInitializeDriver() failed (Status %lx)\n", Status);
|
|
||||||
LdrUnloadModule(ModuleObject);
|
|
||||||
IopFreeDeviceNode(DeviceNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(Status);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS STDCALL
|
|
||||||
NtUnloadDriver(IN PUNICODE_STRING DriverServiceName)
|
|
||||||
{
|
|
||||||
RTL_QUERY_REGISTRY_TABLE QueryTable[2];
|
|
||||||
WCHAR FullImagePathBuffer[MAX_PATH];
|
|
||||||
UNICODE_STRING ImagePath;
|
|
||||||
UNICODE_STRING FullImagePath;
|
|
||||||
UNICODE_STRING ObjectName;
|
|
||||||
PDRIVER_OBJECT DriverObject;
|
|
||||||
NTSTATUS Status;
|
|
||||||
PMODULE_OBJECT ModuleObject;
|
|
||||||
LPWSTR Start;
|
|
||||||
|
|
||||||
DPRINT("DriverServiceName: '%wZ'\n", DriverServiceName);
|
|
||||||
|
|
||||||
/* Get the service name from the module name */
|
|
||||||
Start = wcsrchr(DriverServiceName->Buffer, L'\\');
|
|
||||||
if (Start == NULL)
|
|
||||||
Start = DriverServiceName->Buffer;
|
|
||||||
else
|
|
||||||
Start++;
|
|
||||||
|
|
||||||
ObjectName.Length = wcslen(Start) + 8;
|
|
||||||
ObjectName.Buffer = ExAllocatePool(NonPagedPool,
|
|
||||||
ObjectName.Length * sizeof(WCHAR));
|
|
||||||
wcscpy(ObjectName.Buffer, L"\\Driver\\");
|
|
||||||
memcpy(ObjectName.Buffer + 8, Start, (ObjectName.Length - 8) * sizeof(WCHAR));
|
|
||||||
|
|
||||||
/* Find the driver object */
|
|
||||||
Status = ObReferenceObjectByName(&ObjectName, 0, 0, 0, IoDriverObjectType,
|
|
||||||
KernelMode, 0, (PVOID*)&DriverObject);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
DPRINT("Can't locate driver object for %wZ\n", ObjectName);
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
ObDereferenceObject(DriverObject);
|
|
||||||
|
|
||||||
RtlInitUnicodeString(&ImagePath, NULL);
|
|
||||||
|
|
||||||
/* Get service data */
|
|
||||||
RtlZeroMemory(&QueryTable,
|
|
||||||
sizeof(QueryTable));
|
|
||||||
|
|
||||||
QueryTable[0].Name = L"ImagePath";
|
|
||||||
QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
|
|
||||||
QueryTable[0].EntryContext = &ImagePath;
|
|
||||||
|
|
||||||
Status = RtlQueryRegistryValues(RTL_REGISTRY_ABSOLUTE,
|
|
||||||
DriverServiceName->Buffer,
|
|
||||||
QueryTable,
|
|
||||||
NULL,
|
|
||||||
NULL);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
DPRINT1("RtlQueryRegistryValues() failed (Status %lx)\n", Status);
|
|
||||||
RtlFreeUnicodeString(&ImagePath);
|
|
||||||
return(Status);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImagePath.Length == 0)
|
|
||||||
{
|
|
||||||
wcscpy(FullImagePathBuffer, L"\\SystemRoot\\system32\\drivers");
|
|
||||||
wcscat(FullImagePathBuffer, wcsrchr(DriverServiceName->Buffer, L'\\'));
|
|
||||||
wcscat(FullImagePathBuffer, L".sys");
|
|
||||||
}
|
|
||||||
else if (ImagePath.Buffer[0] != L'\\')
|
|
||||||
{
|
|
||||||
wcscpy(FullImagePathBuffer, L"\\SystemRoot\\");
|
|
||||||
wcscat(FullImagePathBuffer, ImagePath.Buffer);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wcscpy(FullImagePathBuffer, ImagePath.Buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
RtlFreeUnicodeString(&ImagePath);
|
|
||||||
RtlInitUnicodeString(&FullImagePath, FullImagePathBuffer);
|
|
||||||
|
|
||||||
ModuleObject = LdrGetModuleObject(DriverServiceName);
|
|
||||||
if (ModuleObject == NULL)
|
|
||||||
{
|
|
||||||
return STATUS_UNSUCCESSFUL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Unload the module and release the references to the device object */
|
|
||||||
|
|
||||||
if (DriverObject->DriverUnload)
|
|
||||||
(*DriverObject->DriverUnload)(DriverObject);
|
|
||||||
ObDereferenceObject(DriverObject);
|
|
||||||
ObDereferenceObject(DriverObject);
|
|
||||||
LdrUnloadModule(ModuleObject);
|
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static NTSTATUS STDCALL
|
static NTSTATUS STDCALL
|
||||||
IopCreateGroupListEntry(PWSTR ValueName,
|
IopCreateGroupListEntry(PWSTR ValueName,
|
||||||
ULONG ValueType,
|
ULONG ValueType,
|
||||||
|
@ -693,4 +464,349 @@ IoDestroyDriverList(VOID)
|
||||||
return(STATUS_SUCCESS);
|
return(STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IopGetDriverNameFromKeyNode
|
||||||
|
*
|
||||||
|
* Returns a module path from service registry key node.
|
||||||
|
*
|
||||||
|
* Parameters
|
||||||
|
* ImagePath
|
||||||
|
* The result path.
|
||||||
|
* KeyHandle
|
||||||
|
* Registry handle for service registry key node
|
||||||
|
* (\Registry\Machine\System\CurrentControlSet\Services\...)
|
||||||
|
*
|
||||||
|
* Return Value
|
||||||
|
* Status
|
||||||
|
*/
|
||||||
|
|
||||||
|
NTSTATUS STDCALL
|
||||||
|
IopGetDriverNameFromKeyNode(PUNICODE_STRING ImagePath, HANDLE KeyHandle)
|
||||||
|
{
|
||||||
|
RTL_QUERY_REGISTRY_TABLE QueryTable[2];
|
||||||
|
UNICODE_STRING RegistryImagePath;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
RtlZeroMemory(&QueryTable, sizeof(QueryTable));
|
||||||
|
RtlInitUnicodeString(&RegistryImagePath, NULL);
|
||||||
|
|
||||||
|
QueryTable[0].Name = L"ImagePath";
|
||||||
|
QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
|
||||||
|
QueryTable[0].EntryContext = &RegistryImagePath;
|
||||||
|
|
||||||
|
Status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE,
|
||||||
|
(PWSTR)KeyHandle, QueryTable, NULL, NULL);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT("RtlQueryRegistryValues() failed (Status %lx)\n", Status);
|
||||||
|
RtlFreeUnicodeString(&RegistryImagePath);
|
||||||
|
return STATUS_UNSUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RegistryImagePath.Length == 0)
|
||||||
|
{
|
||||||
|
return STATUS_UNSUCCESSFUL;
|
||||||
|
} else
|
||||||
|
if (RegistryImagePath.Buffer[0] != L'\\')
|
||||||
|
{
|
||||||
|
ImagePath->Length = sizeof(UNICODE_NULL) +
|
||||||
|
((12 + wcslen(RegistryImagePath.Buffer)) * sizeof(WCHAR));
|
||||||
|
ImagePath->Buffer = ExAllocatePool(NonPagedPool, ImagePath->Length);
|
||||||
|
if (ImagePath->Buffer == NULL)
|
||||||
|
{
|
||||||
|
RtlFreeUnicodeString(&RegistryImagePath);
|
||||||
|
return STATUS_UNSUCCESSFUL;
|
||||||
|
}
|
||||||
|
wcscpy(ImagePath->Buffer, L"\\SystemRoot\\");
|
||||||
|
wcscat(ImagePath->Buffer, RegistryImagePath.Buffer);
|
||||||
|
RtlFreeUnicodeString(&RegistryImagePath);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
ImagePath->Length = RegistryImagePath.Length;
|
||||||
|
ImagePath->Buffer = RegistryImagePath.Buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IopUnloadDriver
|
||||||
|
*
|
||||||
|
* Unloads a device driver.
|
||||||
|
*
|
||||||
|
* Parameters
|
||||||
|
* DriverServiceName
|
||||||
|
* Name of the service to unload (registry key).
|
||||||
|
* UnloadPnpDrivers
|
||||||
|
* Whether to unload Plug & Plug or only legacy drivers. If this
|
||||||
|
* parameter is set to FALSE, the routine will unload only legacy
|
||||||
|
* drivers.
|
||||||
|
*
|
||||||
|
* Return Value
|
||||||
|
* Status
|
||||||
|
*
|
||||||
|
* To do
|
||||||
|
* Guard the whole function by SEH.
|
||||||
|
*/
|
||||||
|
|
||||||
|
NTSTATUS STDCALL
|
||||||
|
IopUnloadDriver(PUNICODE_STRING DriverServiceName, BOOLEAN UnloadPnpDrivers)
|
||||||
|
{
|
||||||
|
UNICODE_STRING ImagePath;
|
||||||
|
UNICODE_STRING ObjectName;
|
||||||
|
PDRIVER_OBJECT DriverObject;
|
||||||
|
PMODULE_OBJECT ModuleObject;
|
||||||
|
HANDLE KeyHandle;
|
||||||
|
NTSTATUS Status;
|
||||||
|
LPWSTR Start;
|
||||||
|
|
||||||
|
DPRINT("IopUnloadDriver('%wZ', %d)\n", DriverServiceName, UnloadPnpDrivers);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get the service name from the module name
|
||||||
|
*/
|
||||||
|
Start = wcsrchr(DriverServiceName->Buffer, L'\\');
|
||||||
|
if (Start == NULL)
|
||||||
|
Start = DriverServiceName->Buffer;
|
||||||
|
else
|
||||||
|
Start++;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Construct the driver object name
|
||||||
|
*/
|
||||||
|
ObjectName.Length = wcslen(Start) + 8;
|
||||||
|
ObjectName.Buffer = ExAllocatePool(NonPagedPool,
|
||||||
|
ObjectName.Length * sizeof(WCHAR));
|
||||||
|
wcscpy(ObjectName.Buffer, L"\\Driver\\");
|
||||||
|
memcpy(ObjectName.Buffer + 8, Start, (ObjectName.Length - 8) * sizeof(WCHAR));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find the driver object
|
||||||
|
*/
|
||||||
|
Status = ObReferenceObjectByName(&ObjectName, 0, 0, 0, IoDriverObjectType,
|
||||||
|
KernelMode, 0, (PVOID*)&DriverObject);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT("Can't locate driver object for %wZ\n", ObjectName);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Free the buffer for driver object name
|
||||||
|
*/
|
||||||
|
ExFreePool(ObjectName.Buffer);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get path of service...
|
||||||
|
*/
|
||||||
|
Status = RtlpGetRegistryHandle(RTL_REGISTRY_ABSOLUTE,
|
||||||
|
DriverServiceName->Buffer, FALSE, &KeyHandle);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT("RtlpGetRegistryHandle() failed (Status %x)\n", Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
Status = IopGetDriverNameFromKeyNode(&ImagePath, KeyHandle);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT("IopGetDriverNameFromKeyNode() failed (Status %x)\n", Status);
|
||||||
|
NtClose(KeyHandle);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
NtClose(KeyHandle);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ... and check if it's loaded
|
||||||
|
*/
|
||||||
|
ModuleObject = LdrGetModuleObject(&ImagePath);
|
||||||
|
if (ModuleObject == NULL)
|
||||||
|
{
|
||||||
|
return STATUS_UNSUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Free the service path
|
||||||
|
*/
|
||||||
|
RtlFreeUnicodeString(&ImagePath);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Unload the module and release the references to the device object
|
||||||
|
*/
|
||||||
|
if (DriverObject->DriverUnload)
|
||||||
|
(*DriverObject->DriverUnload)(DriverObject);
|
||||||
|
ObDereferenceObject(DriverObject);
|
||||||
|
ObDereferenceObject(DriverObject);
|
||||||
|
LdrUnloadModule(ModuleObject);
|
||||||
|
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FUNCTIONS ******************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NtLoadDriver
|
||||||
|
*
|
||||||
|
* Loads a device driver.
|
||||||
|
*
|
||||||
|
* Parameters
|
||||||
|
* DriverServiceName
|
||||||
|
* Name of the service to load (registry key).
|
||||||
|
*
|
||||||
|
* Return Value
|
||||||
|
* Status
|
||||||
|
*/
|
||||||
|
|
||||||
|
NTSTATUS STDCALL
|
||||||
|
NtLoadDriver(IN PUNICODE_STRING DriverServiceName)
|
||||||
|
{
|
||||||
|
RTL_QUERY_REGISTRY_TABLE QueryTable[2];
|
||||||
|
UNICODE_STRING ImagePath;
|
||||||
|
HANDLE KeyHandle;
|
||||||
|
NTSTATUS Status;
|
||||||
|
ULONG Type;
|
||||||
|
PDEVICE_NODE DeviceNode;
|
||||||
|
PMODULE_OBJECT ModuleObject;
|
||||||
|
LPWSTR Start;
|
||||||
|
|
||||||
|
DPRINT("NtLoadDriver(%wZ)\n", DriverServiceName);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check security privileges
|
||||||
|
*/
|
||||||
|
#if 0
|
||||||
|
if (!SeSinglePrivilegeCheck(SeLoadDriverPrivilege, KeGetPreviousMode()))
|
||||||
|
return STATUS_PRIVILEGE_NOT_HELD;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
RtlInitUnicodeString(&ImagePath, NULL);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Open service registry key
|
||||||
|
*/
|
||||||
|
Status = RtlpGetRegistryHandle(RTL_REGISTRY_ABSOLUTE,
|
||||||
|
DriverServiceName->Buffer, FALSE, &KeyHandle);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT("RtlpGetRegistryHandle() failed (Status %x)\n", Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get service type
|
||||||
|
*/
|
||||||
|
RtlZeroMemory(&QueryTable, sizeof(QueryTable));
|
||||||
|
QueryTable[0].Name = L"Type";
|
||||||
|
QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED;
|
||||||
|
QueryTable[0].EntryContext = &Type;
|
||||||
|
Status = RtlQueryRegistryValues(RTL_REGISTRY_HANDLE, (PWSTR)KeyHandle,
|
||||||
|
QueryTable, NULL, NULL);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT("RtlQueryRegistryValues() failed (Status %lx)\n", Status);
|
||||||
|
RtlFreeUnicodeString(&ImagePath);
|
||||||
|
NtClose(KeyHandle);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get module path
|
||||||
|
*/
|
||||||
|
Status = IopGetDriverNameFromKeyNode(&ImagePath, KeyHandle);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT("IopGetDriverNameFromKeyNode() failed (Status %x)\n", Status);
|
||||||
|
NtClose(KeyHandle);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Close service registry key
|
||||||
|
*/
|
||||||
|
NtClose(KeyHandle);
|
||||||
|
|
||||||
|
DPRINT("FullImagePath: '%S'\n", ImagePath.Buffer);
|
||||||
|
DPRINT("Type: %lx\n", Type);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* See, if the driver module isn't already loaded
|
||||||
|
*/
|
||||||
|
ModuleObject = LdrGetModuleObject(&ImagePath);
|
||||||
|
if (ModuleObject != NULL)
|
||||||
|
{
|
||||||
|
return STATUS_IMAGE_ALREADY_LOADED;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create device node
|
||||||
|
*/
|
||||||
|
/* Use IopRootDeviceNode for now */
|
||||||
|
Status = IopCreateDeviceNode(IopRootDeviceNode, NULL, &DeviceNode);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT("IopCreateDeviceNode() failed (Status %lx)\n", Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Load the driver module
|
||||||
|
*/
|
||||||
|
Status = LdrLoadModule(&ImagePath, &ModuleObject);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT("LdrLoadModule() failed (Status %lx)\n", Status);
|
||||||
|
IopFreeDeviceNode(DeviceNode);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set a service name for the device node
|
||||||
|
*/
|
||||||
|
Start = wcsrchr(DriverServiceName->Buffer, L'\\');
|
||||||
|
if (Start == NULL)
|
||||||
|
Start = DriverServiceName->Buffer;
|
||||||
|
else
|
||||||
|
Start++;
|
||||||
|
RtlCreateUnicodeString(&DeviceNode->ServiceName, Start);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize the driver module
|
||||||
|
*/
|
||||||
|
Status = IopInitializeDriver(
|
||||||
|
ModuleObject->EntryPoint,
|
||||||
|
DeviceNode,
|
||||||
|
(Type == 2 /*SERVICE_FILE_SYSTEM_DRIVER*/ ||
|
||||||
|
Type == 8 /*SERVICE_RECOGNIZER_DRIVER*/),
|
||||||
|
ModuleObject->Base,
|
||||||
|
ModuleObject->Length,
|
||||||
|
FALSE);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT1("IopInitializeDriver() failed (Status %lx)\n", Status);
|
||||||
|
LdrUnloadModule(ModuleObject);
|
||||||
|
IopFreeDeviceNode(DeviceNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NtUnloadDriver
|
||||||
|
*
|
||||||
|
* Unloads a legacy device driver.
|
||||||
|
*
|
||||||
|
* Parameters
|
||||||
|
* DriverServiceName
|
||||||
|
* Name of the service to unload (registry key).
|
||||||
|
*
|
||||||
|
* Return Value
|
||||||
|
* Status
|
||||||
|
*/
|
||||||
|
|
||||||
|
NTSTATUS STDCALL
|
||||||
|
NtUnloadDriver(IN PUNICODE_STRING DriverServiceName)
|
||||||
|
{
|
||||||
|
return IopUnloadDriver(DriverServiceName, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
/* Do not edit - Machine generated */
|
/* Do not edit - Machine generated */
|
||||||
#ifndef _INC_REACTOS_BUILDNO
|
#ifndef _INC_REACTOS_BUILDNO
|
||||||
#define _INC_REACTOS_BUILDNO
|
#define _INC_REACTOS_BUILDNO
|
||||||
#define KERNEL_VERSION_BUILD 7
|
#define KERNEL_VERSION_BUILD 36
|
||||||
#define KERNEL_VERSION_BUILD_STR "7"
|
#define KERNEL_VERSION_BUILD_STR "36"
|
||||||
#define KERNEL_RELEASE_RC "0.1.3.7\0"
|
#define KERNEL_RELEASE_RC "0.1.3.36\0"
|
||||||
#define KERNEL_RELEASE_STR "0.1.3.7"
|
#define KERNEL_RELEASE_STR "0.1.3.36"
|
||||||
#define KERNEL_VERSION_RC "0.1.3\0"
|
#define KERNEL_VERSION_RC "0.1.3\0"
|
||||||
#define KERNEL_VERSION_STR "0.1.3"
|
#define KERNEL_VERSION_STR "0.1.3"
|
||||||
#endif
|
#endif
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
//
|
//
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <winuser.h>
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
@ -142,21 +143,12 @@ IDB_LOGOV BITMAP DISCARDABLE "res/logov.bmp"
|
||||||
// Accelerator
|
// Accelerator
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifdef __WINE__
|
|
||||||
IDA_EXPLORER ACCELERATORS DISCARDABLE
|
IDA_EXPLORER ACCELERATORS DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
VK_X, ID_FILE_EXIT, VIRTKEY, ALT, NOINVERT
|
88, ID_FILE_EXIT, VIRTKEY, ALT, NOINVERT
|
||||||
VK_S, ID_VIEW_FULLSCREEN, VIRTKEY, SHIFT, CONTROL,
|
83, ID_VIEW_FULLSCREEN, VIRTKEY, SHIFT, CONTROL,
|
||||||
NOINVERT
|
NOINVERT
|
||||||
END
|
END
|
||||||
#else
|
|
||||||
IDA_EXPLORER ACCELERATORS DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
"X", ID_FILE_EXIT, VIRTKEY, ALT, NOINVERT
|
|
||||||
"S", ID_VIEW_FULLSCREEN, VIRTKEY, SHIFT, CONTROL,
|
|
||||||
NOINVERT
|
|
||||||
END
|
|
||||||
#endif
|
|
||||||
|
|
||||||
IDA_SEARCH_PROGRAM ACCELERATORS DISCARDABLE
|
IDA_SEARCH_PROGRAM ACCELERATORS DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -567,7 +559,7 @@ BEGIN
|
||||||
PUSHBUTTON "&Help",254,158,43,47,14
|
PUSHBUTTON "&Help",254,158,43,47,14
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_SEARCH_PROGRAM DIALOGEX 120, 100, 144, 65
|
IDD_SEARCH_PROGRAM DIALOGEX 0, 0, 144, 65
|
||||||
STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||||
WS_SYSMENU | WS_THICKFRAME
|
WS_SYSMENU | WS_THICKFRAME
|
||||||
EXSTYLE WS_EX_APPWINDOW
|
EXSTYLE WS_EX_APPWINDOW
|
||||||
|
@ -575,7 +567,7 @@ CAPTION "Search Program in Startmenu"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
EDITTEXT IDC_TOPIC,7,7,130,14,ES_AUTOHSCROLL
|
EDITTEXT IDC_TOPIC,7,7,130,14,ES_AUTOHSCROLL
|
||||||
CONTROL "List1",IDC_MAILS_FOUND,"SysListView32",LVS_REPORT | LVS_SINGLESEL|
|
CONTROL "List1",IDC_MAILS_FOUND,"SysListView32",LVS_REPORT |
|
||||||
LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,25,130,33
|
LVS_SHOWSELALWAYS | WS_BORDER | WS_TABSTOP,7,25,130,33
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,9 @@ TARGET_APPTYPE = windows
|
||||||
|
|
||||||
TARGET_NAME = explorer
|
TARGET_NAME = explorer
|
||||||
|
|
||||||
TARGET_CFLAGS = -fexceptions -Os -DNDEBUG -DWIN32 -D_ROS_ -Wall -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501
|
TARGET_CFLAGS = -g3 -fexceptions -Os -DNDEBUG -DWIN32 -D_ROS_ -Wall -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501
|
||||||
|
|
||||||
TARGET_CPPFLAGS = -fexceptions -Os -DNDEBUG -DWIN32 -D_ROS_ -Wall -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501
|
TARGET_CPPFLAGS = -g3 -fexceptions -Os -DNDEBUG -DWIN32 -D_ROS_ -Wall -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501
|
||||||
|
|
||||||
TARGET_RCFLAGS = -DNDEBUG -DWIN32 -D_ROS_
|
TARGET_RCFLAGS = -DNDEBUG -DWIN32 -D_ROS_
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: windc.c,v 1.27 2003/10/04 21:09:29 gvg Exp $
|
/* $Id: windc.c,v 1.28 2003/10/06 17:53:55 navaraf Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -383,6 +383,7 @@ NtUserGetDCEx(HWND hWnd, HANDLE ClipRegion, ULONG Flags)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Dce = Window->Dce;
|
Dce = Window->Dce;
|
||||||
|
DbgPrint("FIXME\n");
|
||||||
/* FIXME: Implement this. */
|
/* FIXME: Implement this. */
|
||||||
DbgBreakPoint();
|
DbgBreakPoint();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue