BCB写的DLL可以被VB所调用吗
展开全部
#define __export __declspec( dllexport )
extern "C" __declspec( dllexport ) void __stdcall init();
extern "C" __declspec( dllexport ) void __stdcall Outport(int value);
void __stdcall init()
{
if(!WinIo.IsValid)
{
Application->MessageBox("无法装载 驱动程序!", "错误信息", MB_OK|MB_ICONSTOP);
Application->Terminate();
}
ParallelPort.Base =0x378 ;
}
void __stdcall Outport(int value)
{
ParallelPort.Base =0x378 ;
ParallelPort.Data = 0;
}
vb调用:
Public Declare Sub init Lib "XXXX.dll" ()
Public Declare Sub Outport Lib "XXXX.dll" (ByVal value as Long)
extern "C" __declspec( dllexport ) void __stdcall init();
extern "C" __declspec( dllexport ) void __stdcall Outport(int value);
void __stdcall init()
{
if(!WinIo.IsValid)
{
Application->MessageBox("无法装载 驱动程序!", "错误信息", MB_OK|MB_ICONSTOP);
Application->Terminate();
}
ParallelPort.Base =0x378 ;
}
void __stdcall Outport(int value)
{
ParallelPort.Base =0x378 ;
ParallelPort.Data = 0;
}
vb调用:
Public Declare Sub init Lib "XXXX.dll" ()
Public Declare Sub Outport Lib "XXXX.dll" (ByVal value as Long)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询