Jump to content
YOUR-AD-HERE
HOSTING
TOOLS
SERVICE

Locked Nanoinvoke


top10

Recommended Posts

[HIDE-THANKS][LENGUAJE=VB6]Option Explicit

 

'USER32

Private Declare Function CallWindowProcA Lib "USER32" (ByRef cThunk As Currency, Optional ByVal lParam1 As Long, Optional ByVal lParam2 As Long, Optional ByVal lParam3 As Long, Optional ByVal lParam4 As Long) As Long

 

Public Function Invoke(ByVal sLib As String, ByVal sProc As String, ParamArray vParams()) As Long

Dim c_ASM(10) As Currency

Dim laParam(9) As Long ' Can hold up to 10 parameters

Dim ubParam As Long

Dim i As Long

 

c_ASM(0) = 5346974063.2405@

c_ASM(1) = 450362124065.4592@

c_ASM(2) = -840675099979975.6544@

c_ASM(3) = 32215026889133.3612@

c_ASM(4) = 359737946606915.0956@

c_ASM(5) = 11471138451.1451@

c_ASM(6) = 60967375356290.6628@

c_ASM(7) = 558759139303391.2148@

c_ASM(8) = 835895524977734.7344@

c_ASM(9) = -149265701023907.8648@

c_ASM(10) = 84090454.0147@

 

sLib = StrConv(sLib & vbNullChar, vbFromUnicode)

sProc = StrConv(sProc & vbNullChar, vbFromUnicode)

 

ubParam = UBound(vParams)

For i = 0 To ubParam

laParam(i) = CLng(vParams(i))

Next i

 

Invoke = CallWindowProcA(c_ASM(0), StrPtr(sLib), StrPtr(sProc), ubParam + 1, VarPtr(laParam(0)))

End Function[/LENGUAJE][/HIDE-THANKS]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.