分享

vc vb dll 参数传递

 quasiceo 2013-12-05
vb默认 byref   vc 默认 byval
stdcall方式不能传递浮点,变通方法传递浮点变量的指针.
byte       unsigned char
integer  short
bool       short
long       int
single    float
double  double


 //vc char *vb byval variable as String
  //vc指针的指针  vb any

LPSTR *      byref  variable as String

  //Private Declare Function wpfnDllTest Lib "dllTest.dll" (w ) As Integer  等价于 byval w as Variant
//Private Declare Function wpfnDllTest Lib "dllTest.dll" (w As Any) As Integer  Any w是什么就传递什么,无类型匹配检查
 


    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多