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
(1.12 KiB) Downloaded 128 times
User avatar
Progress to next rank:
Status: Offline
Posts: 68
Age: 32
Joined: 08 Nov 2012 10:24
Location: Romania

Invitations sent: 0
Referrals: 0
National Flag:
Local time: 22 Feb 2018 04:11
Has thanked: 10 times
Been thanked: 18 times

Return to Visual Basic

Who is online

Users browsing this forum: No registered users and 2 guests