Git Product home page Git Product logo

wdk-getprocessimagenamewithapclevelfromprocessid's Introduction

WDK-GetProcessImageNameWithAPCLevelFromProcessId

WDK-GetProcessImageNameWithAPCLevelFromProcessId

Here's an example:

#include "queryprocessname.h"

FLT_PREOP_CALLBACK_STATUS
SpyPreOperationCallback(
__inout PFLT_CALLBACK_DATA Data,
__in PCFLT_RELATED_OBJECTS FltObjects,
__deref_out_opt PVOID *CompletionContext
)
{
	if (KeGetCurrentIrql() <= APC_LEVEL)
	{
		UNICODE_STRING OutputName;
		OutputName.Length = 0;
		OutputName.MaximumLength = 2048 * sizeof(WCHAR);
		OutputName.Buffer = ExAllocatePoolWithTag(PagedPool, OutputName.MaximumLength, 0);
		if (OutputName.Buffer != NULL)
		{
			// APC_LEVEL일 경우가 있기 때문에 APC_LEVEL에서도 프로세스 이름을 가져오는 함수를 호출합니다.
			status = GetProcessImageNameWithAPCLevel(&OutputName);
			if (NT_SUCCESS(status) == TRUE)
			{
			}
			ExFreePoolWithTag(OutputName.Buffer, 0);
		}
	}
	
	.....................
	.....................
	
	
}

NTSTATUS
DriverEntry(
__in PDRIVER_OBJECT DriverObject,
__in PUNICODE_STRING RegistryPath
)
{
	if (InitGetProcessImageNameWithAPCLevel() == FALSE)
	{
		KdPrint(("Failed to InitGetProcessImageNameWithAPCLevel\n"));

		return STATUS_UNSUCCESSFUL;
	}


	..................
}

wdk-getprocessimagenamewithapclevelfromprocessid's People

Contributors

lain10240 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.