Commit 20fff538 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ntdll: Add stub for ProcessInstrumentationCallback info class in NtSetInformationProcess().

parent b335b693
......@@ -3256,6 +3256,32 @@ static void test_debug_object(void)
ok( event.u.LoadDll.fUnicode == TRUE, "event not updated %x\n", event.u.LoadDll.fUnicode );
}
static void test_process_instrumentation_callback(void)
{
PROCESS_INSTRUMENTATION_CALLBACK_INFORMATION info;
NTSTATUS status;
status = NtSetInformationProcess( GetCurrentProcess(), ProcessInstrumentationCallback, NULL, 0 );
ok( status == STATUS_INFO_LENGTH_MISMATCH /* Win10 */ || status == STATUS_INVALID_INFO_CLASS
|| status == STATUS_NOT_SUPPORTED, "Got unexpected status %#x.\n", status );
if (status != STATUS_INFO_LENGTH_MISMATCH)
{
win_skip( "ProcessInstrumentationCallback is not supported.\n" );
return;
}
memset(&info, 0, sizeof(info));
status = NtSetInformationProcess( GetCurrentProcess(), ProcessInstrumentationCallback, &info, sizeof(info) );
ok( status == STATUS_SUCCESS /* Win 10 */ || broken( status == STATUS_PRIVILEGE_NOT_HELD )
|| broken( status == STATUS_INFO_LENGTH_MISMATCH ), "Got unexpected status %#x.\n", status );
memset(&info, 0, sizeof(info));
status = NtSetInformationProcess( GetCurrentProcess(), ProcessInstrumentationCallback, &info, 2 * sizeof(info) );
ok( status == STATUS_SUCCESS || status == STATUS_INFO_LENGTH_MISMATCH
|| broken( status == STATUS_PRIVILEGE_NOT_HELD ) /* some versions and machines before Win10 */,
"Got unexpected status %#x.\n", status );
}
START_TEST(info)
{
char **argv;
......@@ -3322,4 +3348,5 @@ START_TEST(info)
test_NtGetCurrentProcessorNumber();
test_ThreadEnableAlignmentFaultFixup();
test_process_instrumentation_callback();
}
......@@ -1485,6 +1485,17 @@ NTSTATUS WINAPI NtSetInformationProcess( HANDLE handle, PROCESSINFOCLASS class,
}
break;
case ProcessInstrumentationCallback:
{
PROCESS_INSTRUMENTATION_CALLBACK_INFORMATION *instr = info;
FIXME( "ProcessInstrumentationCallback stub.\n" );
if (size < sizeof(*instr)) return STATUS_INFO_LENGTH_MISMATCH;
ret = STATUS_SUCCESS;
break;
}
case ProcessThreadStackAllocation:
{
void *addr = NULL;
......
......@@ -1472,6 +1472,13 @@ typedef struct _FILE_IO_COMPLETION_NOTIFICATION_INFORMATION {
#define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2
#define FILE_SKIP_SET_USER_EVENT_ON_FAST_IO 0x4
typedef struct _PROCESS_INSTRUMENTATION_CALLBACK_INFORMATION
{
ULONG Version;
ULONG Reserved;
VOID *Callback;
} PROCESS_INSTRUMENTATION_CALLBACK_INFORMATION, *PPROCESS_INSTRUMENTATION_CALLBACK_INFORMATION;
typedef enum _FSINFOCLASS {
FileFsVolumeInformation = 1,
FileFsLabelInformation,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment