Public Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)...CopyMemory ByVal lRetValueAddress, ByVal VarPtr(TestFunction), LenB(TestFunction)...
Declare Function init Lib "m_32.dll" (ByVal port%, ByVal baud As Long) As Long
声明一下就行了 Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long 说明ShellExecute 是动态连接库shell32.dll的函数名
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
说明ShellExecute 是动态连接库shell32.dll的函数名
regsvr32注册一下 然后在vb中引用 然后实例化一个对象直接操作就OK了
比如说FileOP.dll 先复制到x:\windows\system32\下 然后
regsvr32 fileop.dll注册 vb 部件 --引用