问一个delphi中函数声明转换成C++的写法

mybios 2006-04-11 12:29:40
delphi中有一dll导出函数如下
procedure ImportTransCodeToThis(HotelDate: TDateTime; DeptCode: PChar; DeptDesc:
PChar; ProfitCenter: PChar; ProfitDesc: PChar; Shift: integer; TransCode: PChar;
TransDesc: PChar; Amount: Currency; Comment: PChar; ErrorCode, ErrorMessage:
PChar); stdcall;

我把他在vc中调用,则写成以下c++的声明,但明显第一个日期类型写错了。不知道应该如何写?
typedef void (__stdcall ImportInvtToThis)(float HotelDate, char * DeptCode, char* DeptDesc, char* profitCenter, char* profitDesc, int shift, char* InvtCode, char* InvtDesc, float Amount, char* Comment, char* ErrorCode, char* ErrorMessage);
...全文
182 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
mybios 2006-04-12
  • 打赏
  • 举报
回复
谢谢大家了。我现在都把日期变成字符串传进去了。
thx1180 2006-04-11
  • 打赏
  • 举报
回复
TDateTime = type Double;
todouwang 2006-04-11
  • 打赏
  • 举报
回复
对的,日期型就是double类型的

16,747

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
  • 语言基础/算法/系统设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧