有个dll中的函数这样定义的
BOOL WINAPI IFInitInterface(DWORD dwCodeProtocol, DWORD dwDriverProtocol, LPCTSTR pDriverParam);vb的话应该怎样写呢?

解决方案 »

  1.   

    http://www.spzone.net/bbs/topic.asp?topic_id=1431&forum_id=7
      

  2.   

    谢谢
    这个帖子对我也有些帮助
    可我不懂c
    想知道vb是怎样写得
      

  3.   

    IFInitInterface ( byval dwCodeProtocol as long, byval dwDriverProtocol as long, byval pDriverParam as string ) as long
      

  4.   

    declare function IFInitInterface lib "xx.dll" (byval dwCodeProtocol as long , byval dwDriverProtocol as long , byval pDriverParam as string) as long
      

  5.   

    declare function IFInitInterface lib "xx.dll" (byval dwCodeProtocol as long , byval dwDriverProtocol as long , byRef pDriverParam as string) as long '注意使用byRef 或者
    declare function IFInitInterface lib "xx.dll" (byval dwCodeProtocol as long , byval dwDriverProtocol as long , ByVal pDriverParam as Long) as long  '使用long
      

  6.   

    to  leolan(史留香) 、supergreenbean(超级绿豆 - 世界上只有一种人不能得罪 —— 女人) 、
        baoaya(点头)     byval pDriverParam as string
        ByVal pDriverParam as Long
    ??怎么你们一个说byval ,一个是byref?
      

  7.   

    如果你c里面是bstr类型的,可以用byref,否则用byval
      

  8.   

    谢谢帮忙。我会再开一个贴,问下面的问题
    我用华为的短信接口smeidll.dll作平台,由于没接触过c,不明白这些函数在vb里面怎么声明,向大家请教BOOL WINAPI IFInitInterface(DWORD dwCodeProtocol, DWORD dwDriverProtocol, LPCTSTR pDriverParam);BOOL WINAPI Login_R(LPCTSTR SystemID,  LPCTSTR Password);int WINAPI SubmitAExEx(unsigned char OrgTON, unsigned char OrgNPI, LPCTSTR OrgAddr,
    unsigned char DestTON, unsigned char DestNPI, LPCTSTR DestAddr, 
    unsigned char PRI, unsigned char RD, unsigned char RP, 
    unsigned char SRR, unsigned char MR, unsigned char DCS, 
    unsigned char PID, LPCTSTR Schedule, LPCTSTR Expire, 
    unsigned long Default_ID, unsigned char UDHI, unsigned long UDLen,
    LPCTSTR UserData, LPCTSTR ServiceSubType, 
    unsigned char* byMsgID, unsigned char byPKTotal, 
    unsigned char byPKNumber, unsigned char byMsglevel, 
            unsigned char byFeeUserType,  LPCTSTR sSPID, LPCTSTR sFeeType, 
            LPCTSTR sFeeAddr, LPCTSTR sFeeCode,unsigned char byUserNum, 
                   LPCTSTR sDestAddrs, unsigned long* SM_ID, unsigned char* FCS)
      

  9.   

    http://community.csdn.net/Expert/topic/3535/3535026.xml?temp=.3535272
    请大家指点