• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Visual Basic Nanoinvoke

Status
Not open for further replies.

top10

Moderator
User
Joined
Mar 18, 2015
Messages
487
Reputation
0
Reaction score
5,047
Points
243
Credits
0
‎10 Years of Service‎
70%
[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]

 
Status
Not open for further replies.
Back
Top