请问这段VB代码是什么意思啊,每句都解释下,谢谢了
OptionExplicitDeclareFunctionGetProcessHeapLib“kerne132”()AsLongDeclareFunctionHeapAl...
Option Explicit
Declare Function GetProcessHeap Lib “kerne132” ( ) As Long
Declare Function HeapAlloc Lib “kerne132” (ByVal hHeap As Long,ByVal dwFlags As Long,ByVal dwBytes As Long) As Long
Declare Function HeapFree Lib “kerne132” (ByVal hHeap As Long,ByVal dwFlags As Long,lpMem As Any) As Long
Public Const HEAP_ZERO_MEMORY = &H8
Public Const HEAP_GENERATE_EXCEPTIONS = &H4
Declare Sub CopyMemory1 Lib “kerne132” Alias “Rt1MoveMemory” ( _ hpvDest As Any,ByVal hpvSource As Long,ByVal cbCopy As Long)
Declare Sub CopyMemory2 Lib “kerne132” Alias “RtlMoveMemory” ( _ hpvDest As Long,hpvSource As Any,ByVal cbCopy As Long) 展开
Declare Function GetProcessHeap Lib “kerne132” ( ) As Long
Declare Function HeapAlloc Lib “kerne132” (ByVal hHeap As Long,ByVal dwFlags As Long,ByVal dwBytes As Long) As Long
Declare Function HeapFree Lib “kerne132” (ByVal hHeap As Long,ByVal dwFlags As Long,lpMem As Any) As Long
Public Const HEAP_ZERO_MEMORY = &H8
Public Const HEAP_GENERATE_EXCEPTIONS = &H4
Declare Sub CopyMemory1 Lib “kerne132” Alias “Rt1MoveMemory” ( _ hpvDest As Any,ByVal hpvSource As Long,ByVal cbCopy As Long)
Declare Sub CopyMemory2 Lib “kerne132” Alias “RtlMoveMemory” ( _ hpvDest As Long,hpvSource As Any,ByVal cbCopy As Long) 展开
1个回答
展开全部
1. 声明 API 函数
Declare Function 函数名 Lib “库文件名” ( 参数1,参数2...)
函数声明后,可以被程序调用
2. 声明全局常量
Public Const 常量名 = 值
常量声明后 程序中可以通过常量名直接取得常量的值
各 API 函数具体参数和使用方法,自己搜搜....(因为文字解释太多)
GetProcessHeap 获取过程的堆句柄
HeapAlloc 分配内存
HeapFree 释放内存
CopyMemory 将一块内存的数据从一个位置复制到另一个位置
如果以上这些看不懂的话,建议先巩固一下数据类型,函数方面基础....
Declare Function 函数名 Lib “库文件名” ( 参数1,参数2...)
函数声明后,可以被程序调用
2. 声明全局常量
Public Const 常量名 = 值
常量声明后 程序中可以通过常量名直接取得常量的值
各 API 函数具体参数和使用方法,自己搜搜....(因为文字解释太多)
GetProcessHeap 获取过程的堆句柄
HeapAlloc 分配内存
HeapFree 释放内存
CopyMemory 将一块内存的数据从一个位置复制到另一个位置
如果以上这些看不懂的话,建议先巩固一下数据类型,函数方面基础....
追问
朋友加个QQ383595592.你帮我看下有些论文分析阐述下好不?我马上要交毕业论文,帮下忙,有些我实在是不懂
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询