L
lfpsoft
Unregistered / Unconfirmed
GUEST, unregistred user!
函数原型为:<br>int __stdcall Cmpp2Start(LPCTSTR pchSmgIp, int nMtPort, int nMoPort,LPCTSTR pchUserName, LPCTSTR pchUserPwd, unsigned char uchVersion,void (__stdcall *OnSmgMsg)(CMPP_SMGTOSP* css), int nConnType, void (__stdcall *OnLogFile)(LPCTSTR str))<br>CMPP_SMGTOSP 是个结构。<br>我的定义是这样的:<br> TOnSmgMsg = procedure(css:TCMPP_SMGTOSP) of object;<br> TOnLogFile = procedure(strAnsiChar) of object;<br> TCmpp2Start = function (pchSmgIpChar;<br> nMtPort:Integer;<br> nMoPort:Integer;<br> pchUserNameChar;<br> pchUserPwdChar;<br> uchVersion:Byte;<br> OnSmgMsg:TOnSmgMsg;<br> nConnType:Integer;<br> OnLogFile:TOnLogFile):Integer;stdcall;<br>procedure OnSmgMsg(css:TCMPP_SMGTOSP);<br>begin<br> //<br><br>end;<br>procedure OnLogFile(strChar);<br>begin<br> //<br>end;<br><br>但调用的时候却出错了,报E2010 Incompatible types: 'TOnSmgMsg' and 'Pointer'