shell "regsvr32.exe C:\xxx\yyy.oca" 这个只能注册自定义控件,及VB编得活动动态库 而不是注册这msword9.olb 我调用API还是不能注册啊,看来,你对这一方面还不是很懂啊,我说得,可能太直接了,呵呵,不过我也很感谢你多次的帮助 Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal Hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Declare Function ShellAbout Lib "shell32.dll" Alias "ShellAboutA" (ByVal Hwnd As Long, ByVal szApp As String, ByVal szOtherStuff As String, ByVal hIcon As Long) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal Hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long DllHand = LoadLibrary(“C:\System32\msword9.olb” & Chr(0)) DllProc = GetProcAddress(DllHand, "DllRegisterServer" & Chr(0)) CallWindowProc DllProc, DllHand, 0, 0, 0 FreeLibrary DllHand If DllProc <> 0 Then DllRegister = True Else GoTo Err End If
[此贴子已经被作者于2006-3-15 14:31:15编辑过] |