内核函数们(1):
来源:互联网 发布:郑州大学网络教育官网 编辑:程序博客网 时间:2024/04/29 04:40
字符串:
RtlUpperString ansic
RtlUpcaseUnicodeString unicode
RtlInitUnicodeString Unicode
RtlUnicodeStringToInteger
RtlIntegerToUnicodeString
RtlFreeUnicodeString
RtlUnicodeStringToAnsiString
RtlAnsiStringToUnicodeString
RtlFreeAnsiString
RtlInitString
设备:
ZwCreatFile
InitializeObjectAttributes
ZwOpenFile
ZwClose
ZwSetInfomationFile
ZwQueryInformationFile
ZwWriteFile
内存:
PsGetCurrentProcess
ExAllocatePool
ExAllocatePoolWithTag
ExAllocatePoolWithQuota
ExAllocatePoolWithQuotaTag
ExFreePool
ExFreePoolWithTag
CONTANING_RECORD macro
ExInitializeNPagedLookasideList
ExInitializePagedLookasideList
ExAllocateFromNPagedLookasideList
ExAllocateFromPagedLookasideList
ExFreeToNPagedLookasideList
ExFreeToPagedLookasideList
ExDeleteNPagedLookasideList
ExDeletePageLookasideList
RtlCopyMemory
RtlMoveMemory
RtlFillMemory
RtlZeroMemory
RtlEqualMemory
RtlCompareMemory
IRP
IoCompleteRequest(pIrp,IO_NO_INCREMENT);
IoCreateSymbolicLink
IoGetCurrentIrpStackLocation(pIrp)
IoCreateDevice
IRP PCOCESS
PIO_STACK_LOCATION stack = IoGetCurrentIrpStackLocation(pIrp);
ULONG ulReadLength = stack->Parameters.Read.Length;
pIrp->IoStatus.Status = STATUS_SUCCESS;
pIrp->IoStatus.Information = ulReadLength;
memset(pIrp->AssociatedIrp.SystemBuffer,0xAA,ulReadLength);
IoCompleteRequest(pIrp,IO_NO_INCREMENT);
write size:
stack->Parameters.Write.Length
get offset:
(ULONG)stack->Parameter.Write.ByteOffset.QuadPart
write to Extension:
- memcpy(pDevExt->buffer+ulWriteOffset,pIrp->AssociatedIrp.SystemBuffer,ulWriteLength)
driver synchronization:
- KeGetCurrnetIrql()// get current IRQL
- // the lowest level in the user mode is PASSIVE_LEVEL,
- // the highest DISPATCH_LEVEL.
IRQL adjusting functions:
- KeRaiseIrql()
- KeLowerIrql()
Spin Lock:
- KeInitializeSpinLock()
- //initialization
- KeAcquireSpinLock()
- //application for mem
- KeReleaseSpinLock()
- //release spin lock
- KeAcquireSpinLockAtDpcLevel()
- KeReleaseSpinLockAtDpcLevel()
- //acquire and release spin lock without level changed when at DISPATCH_LEVEL
Synchronize under user mode
- WaitForSingleObject()
- WaitMultipleObjects()
- CreateEvent()
- SetEvent()// to set the event usable
- /////
- //sephamore
- /////
- CreateSephamore()
- ReleaseSephamore()
- ///// sephamore can be waited by waitforsingleobject functions
- /////
- //Mutex
- /////
- CreateMutex()
- ReleaseMutex()
- /////
- // the usage of WaitForMutipleObjects()
- HANDLE hThread[2];
- hThread[0] = (HANDLE)_beginthread(...);
- hThread[1] = (HANDLE)_beginthread(...);
- WaitForMutipleObjects(...);
- //// end
- //
Synchronizing Objects under user mode:
- KeWaitForSingleObject(...)
- KeWaitForMutipleObjects(...)
- //Even
- //
- PsCreateSystemThread(...)
- IoGetCurrentProcess(...)
- PsTerminateSystemThread(...)
- //
Synchronizing Objects under kernel mode:
- //
- KeInitializeEven(...)
- KeSetEvent(...)
- KeInitializeSephamore(...)
- KereleaseSephamore(...)
- KeReadStateSephamore(...)
- //
- KeInitializeMutex(...)
- KeReleaseMutex(...)
- KeStallExecutionProcessor(time)
- //force the process stop for time.
- //
- //
- //
- //Fast Mutex
- ExAcquireFastMutex(...)
- ExReleaseFastMutex(...)
- ExInitializeFastMutex(...)
- //
- 内核函数们(1):
- Windows内核函数(1) - 字符串处理函数
- Windows内核函数(1) - 字符串处理函数
- Windows内核函数(1) - 字符串处理函数
- 寒江独钓(1):内核数据类型和函数
- ARM汇编实战1:内核函数netlink_lookup
- 可重入函数&可重入内核
- 内核函数跟踪工具
- 内核函数 copy_to_user
- 内核函数前缀意义
- 内核延迟函数分析
- linux内核ioctl函数
- linux内核函数kernel_thread
- linux内核函数kthread_run()
- linux内核switch_to函数
- Linux内核start_kernel()函数
- 内核函数分析
- 内核函数系列
- 工作中的认识误区
- 常用的匹配正则表达式和实例
- Web Service
- 有关Html Parser的使用范例, URL解析器
- JDBC连SQL SERVER数据库常见问题
- 内核函数们(1):
- Using POST method in XMLHTTPRequest(Ajax)
- 使用 Hashtable(哈希表)和 IEnumerator 接口 示例
- MSIL 反编译 学习
- ASP.NET文件下载函数
- 关于SQLServer死锁的诊断和定位
- JavaScript正则表达式
- Linux 集群技术介绍
- 新手迈步走