lichunlin1
lichunlin1
2015-05-08 05:39

vb调用DLL转成DELPHI出错?

  • delphi

1.原来VB的程序,经执行可以通过
VB
数据类型定义
'Profile infomation
Public Type LJIF_PROFILE_INFO
fXStart As Single
fXPitch As Single
End Type
定义
Public Declare Function LJIF_GetProfileData Lib "LJIF.dll" (ByVal ProfileTarget As Long, ByRef pProfileInfo As LJIF_PROFILE_INFO, ByRef pProfile As Single, ByVal nCount As Long) As Long
条用
rc = LJIF_GetProfileData(LJIF_HEAD_INDEX(GetProfileParam1.ListIndex), ProfileInfo, pBuffer(0), GetProfileParam2)
'Get Profile Data
2.改成DELPHI后,就这个函数提示参数错误
DELPHI
定义
Type
pLJIF_PROFILE_INFO=^LJIF_PROFILE_INFO;
LJIF_PROFILE_INFO=record
fXStart : Single;
fXPitch : Single;
End ;
/Get Profile Data
Function LJIF_GetProfileData ( ProfileTarget:LongInt; var pProfileInfo: LJIF_PROFILE_INFO;var pProfile:array of Single; nCount :LongInt): LongInt;external 'LJIF.dll';
调用:
rc := LJIF_GetProfileData(0, ProfileInfo, pBuffer, GetProfileParam2.Value) ;
始终报参数错误?
求大侠指点!

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答

为你推荐