解决在USER32上找不到CopyCursor的入口点
VB声明复制光标函数:
Public Declare Function CopyCursor Lib "user32" Alias "CopyCursor" (ByVal hcur As Long) As Long
在调用CopyCursor时,会有出错提示:在USER32上找不到CopyCursor的入口点
USER32.DLL中查找这个导出函数CopyCursor,发现找不到这个函数
经查MSDN,发现 CopyCursor 只是一个宏(CopyCursor macro),宏定义为:
#define CopyCursor(pcur) ((HCURSOR)CopyIcon((HICON)(pcur)))
因此,将定义改为以下声明即可
Public Declare Function CopyIcon Lib "user32" Alias "CopyCursor" (ByVal hcur As Long) As Long