首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

vb调用动态库有关问题

2012-03-23 
vb调用动态库问题dephi:function Read_Guest_Card(AReaderType,ACardType,APort,ASector,ABlock:ByteAHot

vb调用动态库问题
dephi:
function Read_Guest_Card(
  AReaderType,
  ACardType,
  APort,
  ASector,
  ABlock:Byte;
  AHotelPwd:Pchar;
  var ALockNo,
  AStartSuite,
  AEndSuite,
  ACardID,
  ASubCardID:integer;
  ATime:Pchar
  ):integer; stdcall; External DLL_Name;

vb:
Public Declare Function Adx_Read_Guest_Card Lib "dll_name.dll" Alias "Read_Guest_Card" (ByVal AReaderType As Byte, ByVal ACardType As Byte, ByVal APort As Byte, ByVal ASector As Byte, ByVal ABlock As Byte, ByVal AHotelPwd As String, ByVal ALockNo As Long, ByVal AStartSuite As Byte, ByVal AEndSuite As Byte, ByVal ACardID As Long, ByVal ASubCardID As Long, ByVal ATime As String) As Byte

vb调用

  Dim ALockNo As Byte
  Dim AStartSuite As Byte
  Dim AEndSuite As Byte
  Dim ACardID As Integer
  Dim ASubCardID As Integer
  Dim ATime As String * 11
  Dim iRet As Byte
  AdxLockType=1
  AdxCardType=1
  ComPort=1
  HotelCode = "12345678"
  iRet = Adx_Read_Guest_Card(AdxLockType, AdxCardType, ComPort, IIf(AdxCardType = 1, 3, 5), 0, HotelCode, ALockNo, AStartSuite, AEndSuite, ACardID, ASubCardID, ATime)

执行这个函数的时候直接崩毁掉了

[解决办法]
堆栈溢出/除法溢出都简称溢出
错误描述要明确。

如果你去看病,一句“我肚子疼”,医生能马上开药?
[解决办法]
把你的VB代码发上来看看?
我坚持认为是你的函数在VB中的声明有问题

热点排行