I don't know where to look, i guess i need to strip the app.
We use a lot of string literals.
Code:
$IF 0 VB callback example; Option Explicit '// c:\pbwork\vbdebug\vbdebug.dll 'ProjectID : 108 'Project : VBDebug 'Module : 'Date pasted : 2000-2-16 / 16-02-2000 14:01:22 Declare Sub SetVBCVALLBACK Lib "C:\PBWORK\VBDEBUG\VBDEBUG.DLL" Alias "SETVBCVALLBACK" (ByVal AddressOfVB As Long) Declare Sub RunVBCall Lib "C:\PBWORK\VBDEBUG\VBDEBUG.DLL" Alias "RUNVBCALL" () Sub VBDEBUG(ByVal ID As Long, Param1 As Double, Param2 As Double, Param3 As Double, Param4 As Double, Param5 As Double) ' Stop MsgBox ID & ", " & Param1 & ", " & Param2 & ", " & Param3 & ", " & Param4 & ", " & Param5 End Sub Option Explicit Private Sub Command1_Click() SetVBCVALLBACK Val(AddressOf VBDEBUG) RunVBCall End Sub $ENDIF DECLARE Sub VBDEBUG ( ByVal ID As Long, Param1 As Double, Param2 As Double, Param3 As Double, Param4 As Double, Param5 As Double ) Global VBCallBack As DWORD Sub DOVBCALL CDECL ( ParamCount As Long _ [,ID As Long _ , Param1 As Double _ , Param2 As Double _ , Param3 As Double _ , Param4 As Double _ , Param5 As Double _ ] ) Dim pID As Long Dim p1 As Double Dim p2 As Double Dim p3 As Double Dim p4 As Double Dim p5 As Double If Clng( VBCallBack ) = 0 Then Exit Sub If ParamCount > 0 Then pID = ID If ParamCount > 1 Then P1 = Param1 If ParamCount > 2 Then P2 = Param2 If ParamCount > 3 Then P3 = Param3 If ParamCount > 4 Then P4 = Param4 If ParamCount > 5 Then P5 = Param5 Call DWORD VBCallBack USING VBDEBUG( pID, P1, P2, P3, P4, P5 ) If ParamCount > 0 Then ID = pID If ParamCount > 1 Then Param1 = P1 If ParamCount > 2 Then Param2 = P2 If ParamCount > 3 Then Param3 = P3 If ParamCount > 4 Then Param4 = P4 If ParamCount > 5 Then Param5 = P5 End Sub Sub SetVBCVALLBACK( ByVal AddressOfVB As Long ) EXPORT VBCallBack = CDWD( AddressOfVB ) End Sub Sub RunVBCall() EXPORT DOVBCALL 0 DOVBCALL 6, 100, 1, 2, 3, 4, 5 End Sub
Leave a comment: