API函数为BOOL WINAPI tm2kp_GetCaptureParam(DWORD dwCardID,MPEGPARAM * pMpegParam)
其中MPEGARAM为一自定义类型, “MPEGPARAM * pMpegParam”部分在VB中应如何声明,*是否为指针的意思?
谢谢,在线等。

解决方案 »

  1.   

    对,是指针的意思。你调用的时候直接用传值(Byval)的办法就可以了。
      

  2.   

    我就是用ByVal pMpegParm as MPEGPARAM 调的,但是不行
      

  3.   

    你声明为pMpegParam as long试试,传入varptr(mpegparam)
      

  4.   

    声明为pMpegParam as MPEGPARAM
    然后
    type MPEGPARAM
    ....
    end typedim mp as MPEGPARAM
    传入 mp
      

  5.   

    Public Declare Function tm2kp_GetCaptureParam Lib "..." (byval dwCardID as long,pMpegParam as MPEGPARAM) As Booleanpublic type MPEGPARAM
    ....
    end typepublic mp as MPEGPARAMif tm2kp_GetCaptureParam(dwCardID,mp) then ...
      

  6.   

    用王鹏的方法返回值为"True",说明有门,但其后便出现“未处理的“System.NullReferenceException”类型的异常出现在 system.windows.forms.dll 中其他信息:未将对象引用设置到对象的实例。”错误信息。
    是否因为VarPtr函数不能用于自定义类型?