|
Functions exported using MFC DLL in VC:
void __stdcall PrintPortOut (BYTE data)
{
theApp._outp (0x378, data);
}
And there is output in .def: EXPORTS
; Explicit exports can go here
PrintPortOut
Then call in VB:
Declare Function q Lib "PrintPort.dll" Alias "PrintPortOut" _
(ByVal pSelectAdapter As Byte)
Private Sub Command1_Click ()
Dim c As String
Dim d As Byte
d = CByte (&H0)
c = q (d)
End Sub
But the execution will always error: "Bad DLL calling convention" Run-time erroe '49'? |
|