现在手头有一个DLL文件,我在VB中的模块中调用它,现在有一个函数(定时发送函数),要传递一个时间给这个函数,在DLL中,这个函数的时间变量定义为Tsystemtime类型(delphi编的),我在VB中要定义一个什么类型才能与其兼容呀?急救了.

解决方案 »

  1.   

    type
      PSystemTime = ^TSystemTime;
      TSystemTime = record    wYear: Word;
        wMonth: Word;
        wDayOfWeek: Word;
        wDay: Word;
        wHour: Word;
        wMinute: Word;
        wSecond: Word;
        wMilliseconds: Word;  end;
    试试传个自字义类型进去看看?里面的word对应VB的integer型 
    或者试试byte
      

  2.   

    Public Type SYSTEMTIME
            wYear As Integer
            wMonth As Integer
            wDayOfWeek As Integer
            wDay As Integer
            wHour As Integer
            wMinute As Integer
            wSecond As Integer
            wMilliseconds As Integer
    End Type
    这个是从API中COPY出来的.
      

  3.   

    现在是调用DLL文件时,VB直接报错出(提示"发送"与"不发送"错误).怎么样捕获调用DLL文件时的错误呢?
      

  4.   

    调用DLL就出错吗?
    你的DLL怎么调用的
      

  5.   

    感谢:fishmans(金脚指)
    虽然问题没有完全解决,但是他的热心帮助表示感谢。