VB6 declaration for C++ function gives “Bad DLL calling convention”

前端 未结 2 1378
悲&欢浪女
悲&欢浪女 2020-12-22 09:56

What is the correct VB6 declaration for this C++ function?

LPCWSTR* MW_ListReaders(_ULONG Context, int* NumberOfReade         


        
2条回答
  •  醉酒成梦
    2020-12-22 10:27

    In addition to Remy's answer, you have also got the Vb declaration slightly wrong:

    Private Declare Function ListReaders Lib "MyDLL.dll" (ByVal Context As Long, ByRef NumberOfReaders As Long) As Long
    

    "Integer" is a 2 byte integer in vb.

提交回复
热议问题