Inregistrare ocx/dll

Programare in Visual Basic 5/6
Visual Basic 5/6 programming

Inregistrare ocx/dll

Post Number:#1  Postby freshmeat » 09 Nov 2012 11:34

Code: Select all
Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Declare Function LoadLibrary _
        Lib "kernel32" _
        Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Declare Function GetProcAddress _
        Lib "kernel32" (ByVal hModule As Long, _
                        ByVal lpProcName As String) As Long
Declare Function scCallPtr Lib "CALLPTR.DLL" (ByVal pProc As Long) As Long

Public Function RegOcx(FisierReg As String)

    On Error Resume Next

    Dim nHandle       As Long

    Dim lnProcAddress As Long

    nHandle = LoadLibrary(FisierReg)

    If nHandle > 31 Then
        lnProcAddress = GetProcAddress(nHandle, "DllRegisterServer")
       
        If lnProcAddress > 0 Then
            scCallPtr lnProcAddress
        End If
        FreeLibrary nHandle
    End If
    RegOcx = lnProcAddress
End Function


Pentru functionarea scriptului aveti nevoie de CallPtr.dll
Attachments
CallPtr DLL.zip
(1.12 KiB) Downloaded 115 times
User avatar
freshmeat
Mediu
Mediu
Progress to next rank:
36%
 
Status: Offline
Posts: 68
Age: 31
Joined: 08 Nov 2012 10:24
Location: Romania

Invitations sent: 0
Referrals: 0
National Flag:
Romania
Local time: 24 Nov 2017 14:11
Has thanked: 10 times
Been thanked: 18 times

Return to Visual Basic

Who is online

Users browsing this forum: No registered users and 1 guest

cron