|
在VC中使用MFC DLL导出的函数:
void __stdcall PrintPortOut(BYTE data)
{
theApp._outp(0x378,data);
}
并有在.def中输出:EXPORTS
; Explicit exports can go here
PrintPortOut
然后在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
但执行完成总会出错:出现"Bad DLL calling convention" Run-time erroe'49'?
|
|