reactos/ntoskrnl/wmi/wmi.c

290 lines
6.2 KiB
C
Raw Normal View History

/*
* PROJECT: ReactOS Kernel
* LICENSE: GPL - See COPYING in the top level directory
* FILE: ntoskrnl/io/wmi.c
* PURPOSE: I/O Windows Management Instrumentation (WMI) Support
* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#define NDEBUG
#include <debug.h>
/* FUNCTIONS *****************************************************************/
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMIRegistrationControl(IN PDEVICE_OBJECT DeviceObject,
IN ULONG Action)
{
DPRINT1("IoWMIRegistrationControl() called for DO %p, requesting %d action, returning success\n",
DeviceObject, Action);
return STATUS_SUCCESS;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMIAllocateInstanceIds(IN GUID *Guid,
IN ULONG InstanceCount,
OUT ULONG *FirstInstanceId)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMISuggestInstanceName(IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL,
IN PUNICODE_STRING SymbolicLinkName OPTIONAL,
IN BOOLEAN CombineNames,
OUT PUNICODE_STRING SuggestedInstanceName)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMIWriteEvent(IN PVOID WnodeEventItem)
{
DPRINT1("IoWMIWriteEvent() called for WnodeEventItem %p, returning success\n",
WnodeEventItem);
/* Free the buffer if we are returning success */
if (WnodeEventItem != NULL)
ExFreePool(WnodeEventItem);
return STATUS_SUCCESS;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMIOpenBlock(IN GUID *DataBlockGuid,
IN ULONG DesiredAccess,
OUT PVOID *DataBlockObject)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMIQueryAllData(IN PVOID DataBlockObject,
IN OUT ULONG *InOutBufferSize,
OUT PVOID OutBuffer)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMIQueryAllDataMultiple(IN PVOID *DataBlockObjectList,
IN ULONG ObjectCount,
IN OUT ULONG *InOutBufferSize,
OUT PVOID OutBuffer)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMIQuerySingleInstance(IN PVOID DataBlockObject,
IN PUNICODE_STRING InstanceName,
IN OUT ULONG *InOutBufferSize,
OUT PVOID OutBuffer)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMIQuerySingleInstanceMultiple(IN PVOID *DataBlockObjectList,
IN PUNICODE_STRING InstanceNames,
IN ULONG ObjectCount,
IN OUT ULONG *InOutBufferSize,
OUT PVOID OutBuffer)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMISetSingleInstance(IN PVOID DataBlockObject,
IN PUNICODE_STRING InstanceName,
IN ULONG Version,
IN ULONG ValueBufferSize,
IN PVOID ValueBuffer)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMISetSingleItem(IN PVOID DataBlockObject,
IN PUNICODE_STRING InstanceName,
IN ULONG DataItemId,
IN ULONG Version,
IN ULONG ValueBufferSize,
IN PVOID ValueBuffer)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMIExecuteMethod(IN PVOID DataBlockObject,
IN PUNICODE_STRING InstanceName,
IN ULONG MethodId,
IN ULONG InBufferSize,
IN OUT PULONG OutBufferSize,
IN OUT PUCHAR InOutBuffer)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMISetNotificationCallback(IN PVOID Object,
IN WMI_NOTIFICATION_CALLBACK Callback,
IN PVOID Context)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMIHandleToInstanceName(IN PVOID DataBlockObject,
IN HANDLE FileHandle,
OUT PUNICODE_STRING InstanceName)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
IoWMIDeviceObjectToInstanceName(IN PVOID DataBlockObject,
IN PDEVICE_OBJECT DeviceObject,
OUT PUNICODE_STRING InstanceName)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
WmiQueryTraceInformation(IN TRACE_INFORMATION_CLASS TraceInformationClass,
OUT PVOID TraceInformation,
IN ULONG TraceInformationLength,
OUT PULONG RequiredLength OPTIONAL,
IN PVOID Buffer OPTIONAL)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
__cdecl
WmiTraceMessage(IN TRACEHANDLE LoggerHandle,
IN ULONG MessageFlags,
IN LPGUID MessageGuid,
IN USHORT MessageNumber,
IN ...)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
NTAPI
WmiTraceMessageVa(IN TRACEHANDLE LoggerHandle,
IN ULONG MessageFlags,
IN LPGUID MessageGuid,
IN USHORT MessageNumber,
IN va_list MessageArgList)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
Alex Ionescu <ionucu@videotron.ca> Dispatcher Objects Rewrite (minus Queues, coming in next patch). Global Changes: - Use KOBJECT enumerations for all objects, remove obsoleted ros-internal enumeration. - Reformatting, commenting, and addition of Debug Prints for easier debugging - Properly create Executive Objects. They don't need a creation routine. - Make sure to properly lock and release the Dispatcher Database. Mutex/Mutant: - Correct MUTANT_BASIC_INFORMATION - Return previous state in Kernel Functions, intead of 1 or 0 all the time. - Initialize listhead properly - Removed code duplication between mutant and mutex release. - Fix bugs in release - Add proper exeption if the mutex is not owned. Kernel Queues: - Optimize the code - Use Inserted Flag Timers: - Some changes in setting the default data to allow KiInsertTimer to be called internally by the wait code in the next patch. Events: - Optimize and simplify KeInitializeEvent - Implement KeInitializeEventPair - Fix KePulseEvent. It was completely messed up and also used unneeded Interlocked function. - Fix KeResetEvent. It was not locking the dispatcher lock but using Interlocked. - Fix KeSetEvent. It was not differentiating between Notification and Sycronization events and also signaling the Event even if nobody was waiting on it. Semaphores: - Fix KeReleaseSemaphore. It was not checking if nobody was waiting on it before unwaiting the thread. - Fix not releasing dispatcher database before raising an exception. - Add check to NtCreateSemaphore to make sure the counts make sense. Event Pairs: - Remove Thread Event Pair. They are only used for NT4 QuickLPC which is obsoleted. - Use KeInitializeEventPair svn path=/trunk/; revision=14045
2005-03-14 02:08:17 +00:00
/*
* @unimplemented
*/
NTSTATUS
NTAPI
Alex Ionescu <ionucu@videotron.ca> Dispatcher Objects Rewrite (minus Queues, coming in next patch). Global Changes: - Use KOBJECT enumerations for all objects, remove obsoleted ros-internal enumeration. - Reformatting, commenting, and addition of Debug Prints for easier debugging - Properly create Executive Objects. They don't need a creation routine. - Make sure to properly lock and release the Dispatcher Database. Mutex/Mutant: - Correct MUTANT_BASIC_INFORMATION - Return previous state in Kernel Functions, intead of 1 or 0 all the time. - Initialize listhead properly - Removed code duplication between mutant and mutex release. - Fix bugs in release - Add proper exeption if the mutex is not owned. Kernel Queues: - Optimize the code - Use Inserted Flag Timers: - Some changes in setting the default data to allow KiInsertTimer to be called internally by the wait code in the next patch. Events: - Optimize and simplify KeInitializeEvent - Implement KeInitializeEventPair - Fix KePulseEvent. It was completely messed up and also used unneeded Interlocked function. - Fix KeResetEvent. It was not locking the dispatcher lock but using Interlocked. - Fix KeSetEvent. It was not differentiating between Notification and Sycronization events and also signaling the Event even if nobody was waiting on it. Semaphores: - Fix KeReleaseSemaphore. It was not checking if nobody was waiting on it before unwaiting the thread. - Fix not releasing dispatcher database before raising an exception. - Add check to NtCreateSemaphore to make sure the counts make sense. Event Pairs: - Remove Thread Event Pair. They are only used for NT4 QuickLPC which is obsoleted. - Use KeInitializeEventPair svn path=/trunk/; revision=14045
2005-03-14 02:08:17 +00:00
NtTraceEvent(IN ULONG TraceHandle,
IN ULONG Flags,
IN ULONG TraceHeaderLength,
IN struct _EVENT_TRACE_HEADER* TraceHeader)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*Eof*/