Public Function RegServer(ByVal FileName As String) As Boolean Private Declare Sub ExitThread Lib 'kernel32' (ByVal dwExitCode As Long) Private Declare Function GetExitCodeThread Lib 'kernel32' (ByVal hThread As Long, lpExitCode As Long) As Long Private Declare Function CloseHandle Lib 'kernel32' (ByVal hObject As Long) As Long
Private Declare Function FreeLibraryRegister Lib 'kernel32' Alias 'FreeLibrary' (ByVal hLibModule As Long) As Long Private Declare Function GetProcAddressRegister Lib 'kernel32' Alias 'GetProcAddress' (ByVal hModule As Long, ByVal lpProcName As String) As Long Private Declare Function WaitForSingleObject Lib 'kernel32' (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long Private Declare Function CreateThreadForRegister Lib 'kernel32' Alias 'CreateThread' (lpThreadAttributes As Any, ByVal dwStackSize As Long, ByVal lpStartAddress As Long, ByVal lParameter As Long, ByVal dwCreationFlags As Long, lpThreadID As Long) As Long Private Declare Function LoadLibraryRegister Lib 'kernel32' Alias 'LoadLibraryA' (ByVal lpLibFileName As String) As Long 'Put the following code to the Module Project