发布网友 发布时间:2023-10-25 03:49
共1个回答
热心网友 时间:2024-12-05 10:45
数申明PublicConstLVM_FIRSTAsLong=&H1000PublicConstLVM_GETHEADERAsLong=LVM_FIRST+31PublicConstLVM_GETITEMCOUNTAsLong=LVM_FIRST+4PublicConstLVM_GETITEMTEXTAsLong=LVM_FIRST+45PublicConstHDM_FIRSTAsLong=&H1200PublicConstHDM_GETITEMCOUNTAsLong=(HDM_FIRST+0)PublicConstPROCESS_VM_OPERATIONAsLong=&H8PublicConstPROCESS_VM_READAsLong=&H10PublicConstPROCESS_VM_WRITEAsLong=&H20PublicConstMAX_LVMSTRINGAsLong=255PublicConstMEM_COMMITAsLong=&H1000PublicConstMEM_RELEASEAsLong=&H8000&PublicConstPAGE_READWRITEAsLong=&H4PublicConstLVIF_TEXTAsLong=&H1'类型申明PublicTypeLV_ITEMAmaskAsLongiItemAsLongiSubItemAsLongStateAsLongstateMaskAsLongpszTextAsLongcchTextMaxAsLongEndType'API申明PublicDeclareFunctionOpenProcessLib"kernel32"(ByValdwDesiredAccessAsLong,ByValbInheritHandleAsLong,ByValdwProcIdAsLong)AsLong'打开进程PublicDeclareFunctionVirtualAllocExLib"kernel32"(ByValhProcessAsLong,ByVallpAddressAsLong,ByValdwSizeAsLong,ByValflAllocationTypeAsLong,_ByValflProtectAsLong)AsLong'获取内存空间PublicDeclareFunctionVirtualFreeExLib"kernel32"(ByValhProcessAsLong,ByVallpAddressAsLong,ByValdwSizeAsLong,ByValdwFreeTypeAsLong)AsLong'释放内存空间PublicDeclareFunctionWriteProcessMemoryLib"kernel32"(ByValhProcessAsLong,ByVallpBaseAddressAsLong,ByReflpBufferAsLV_ITEMA,ByValnSizeAsLong,_lpNumberOfBytesWrittenAsLong)AsLong'向内存写数据PublicDeclareFunctionReadProcessMemoryLib"kernel32"(ByValhProcessAsLong,ByVallpBaseAddressAsLong,ByReflpBufferAsAny,ByValnSizeAsLong,_lpNumberOfBytesWrittenAsLong)AsLong'向内存读数据PublicDeclareFunctionSendMessageLib"user32"Alias"SendMessageA"(ByValhwndAsLong,ByValwMsgAsLong,ByValwParamAsLong,ByReflParamAsAny)AsLong'发送消息PublicDeclareFunctionCloseHandleLib"kernel32"(ByValhObjectAsLong)AsLong'关闭进程PublicDeclareFunctionGetWindowThreadProcessIdLib"user32"(ByValhwndAsLong,lpdwProcessIdAsLong)AsLong'获得进程ID