From: Larry Buller
Subject: PBDLL 2.0 Direct 32
Please help. I am using PBDLL2.0 Direct32.DLL 23k 7/10/97
There is only this version of direct32 on the machine in C:\windows.
My "MV32.dll" loads fine and runs fine. However when I try pb_Unload16
I get an Invalid page fault in Direct32.dll error. For a while it was
running
fine in the IDE, but would crash when compiled, but now it crashes in
the IDE also.
It removes MV32.dll (per modview) before crashing.
It will crash even when exiting imediately after loading.
debugging in the VB5 IDE shows normal values for hDLL&
The folks at Power Basic have not responded to repeated requests for
help.
Has any one out there had similar problems or solutions?
Thanx Larry Buller
*******VB5 main form*********
Private Sub Form_Load()
hDLL& = pb_Load16("mv32.dll")
hproc1& = pb_GetProc16(hDLL&, "inpt")
hproc2& = pb_GetProc16(hDLL&, "outp")
hproc3& = pb_GetProc16(hDLL&, "jogrun")
hproc4& = pb_GetProc16(hDLL&, "mh")
hproc5& = pb_GetProc16(hDLL&, "SetParam")
hproc6& = pb_GetProc16(hDLL&, "chkvars")
End Sub
***********called when application exited**********
Private Sub Form_Unload(cancel As Integer)
s% = pb_Unload16(hDLL&)
End Sub
********** VB5 code module********
************declarations***********
Global xcur&, ycur& 'last known spindle position
Global port%
Global control, accelrate As Integer
Global startdelay, rundelay, acdcsteps As Long
Global hproc1&, hproc2&, hproc3&, hproc4&, hproc5&, hproc6&, hDLL&
Declare Function inpt% Lib "DIRECT32.DLL" Alias "pb_Call16" (ByVal
hproc1&, port As Integer)
Declare Sub outp Lib "DIRECT32.DLL" Alias "pb_Call16" (ByVal hproc2&,
port As Integer, dat As Integer)
Declare Sub jogrun Lib "DIRECT32.DLL" Alias "pb_Call16" (ByVal hproc3&,
ByRef xcur&, ByRef ycur&)
Declare Function mh Lib "DIRECT32.DLL" Alias "pb_Call16" (ByVal hproc4&,
x&, y&, ByRef xcur&, ByRef ycur&) As Integer
Declare Sub SetParam Lib "DIRECT32.DLL" Alias "pb_Call16" (ByVal
hproc5&, ByVal port As Integer, ByVal startdelay As Long, ByVal rundelay
As Long, ByVal acdcsteps As Long, ByVal control As Integer, ByVal
accelrate As Integer)
Declare Sub ChkVars Lib "DIRECT32.DLL" Alias "pb_Call16" (ByVal hproc6&,
ByRef p As Integer, ByRef sd As Long, ByRef rd As Long, ByRef acdc As
Long, ByRef ctl As Integer, ByRef ar As Integer)
Declare Function pb_GetProc16 Lib "DIRECT32.DLL" (ByVal hDLL&, ByVal
zFunction As String) As Long
Declare Function pb_Load16 Lib "DIRECT32.DLL" (ByVal dllName As String)
As Long
Declare Function pb_Unload16 Lib "DIRECT32.DLL" (ByVal hDLL&) As Integer
****************************DLL******************
'pbdll20
$compile dll
Sub SetParam STDCALL (byval p as integer,_
byval sd as long,_
byval rd as long,_
byval acdc as long,_
byval ctl as integer,_
byval ar as integer) export32
Continued with next message...
*** QwkNews (tm) v2.1
* [TN71] Toast House Import
--- GEcho 1.20/Pro
---------------
* Origin: Toast House Remote (1:100/561)
|