100元,请教dll函数接口问题!(100分)

  • 主题发起人 主题发起人 sunshinebbs
  • 开始时间 开始时间
S

sunshinebbs

Unregistered / Unconfirmed
GUEST, unregistred user!
我在delhpi里打开一个dll文件文件得到以下信息。我怎样才能用调delphi调用以下函数呢?<br>[<br>&nbsp; uuid(6A73356D-23CF-489C-A467-25147BF9D465), <br>&nbsp; helpstring("Dispatch interface for IMC Control"), <br>&nbsp; hidden<br>]<br>&nbsp;dispinterface _DIMCv1<br>{<br>&nbsp; properties:<br>&nbsp; methods:<br>&nbsp; [<br>&nbsp; id(0x00000016)<br>&nbsp; ]<br>&nbsp; void Logout( void );<br>&nbsp; [<br>&nbsp; id(0x00000017)<br>&nbsp; ]<br>&nbsp; void ChangeRoomCate(long roomID, short cateno, short sortno );<br>&nbsp; [<br>&nbsp; id(0x0000003B)<br>&nbsp; ]<br>&nbsp; void OPCastText(short cateid, long rid, BSTR castmst );<br>&nbsp; [<br>&nbsp; id(0x00000015)<br>&nbsp; ]<br>&nbsp; void QuitRoom(BSTR msgtext );<br>&nbsp; [<br>&nbsp; id(0x00000018)<br>&nbsp; ]<br>&nbsp; void WantMic( void );<br>&nbsp; [<br>&nbsp; id(0x00000019)<br>&nbsp; ]<br>&nbsp; void DropMic( void );<br>&nbsp; [<br>&nbsp; id(0x0000003A)<br>&nbsp; ]<br>&nbsp; void OPForceVPM(long uid );<br>&nbsp; [<br>&nbsp; id(0x00000036)<br>&nbsp; ]<br>&nbsp; void OPKick(long uid, BSTR msg );<br>&nbsp; [<br>&nbsp; id(0x00000039)<br>&nbsp; ]<br>&nbsp; void OPSetUserPriv(long uid, short vout, short vin, short tout, short tin, short ulevel );<br>&nbsp; [<br>&nbsp; id(0x00000038)<br>&nbsp; ]<br>&nbsp; void OPSetNick(long uid, BSTR nick );<br>&nbsp; [<br>&nbsp; id(0x0000003D)<br>&nbsp; ]<br>&nbsp; void SetUserRela(long uid, short svoc, short rvoc, short stxt, short rtxt );<br>&nbsp; [<br>&nbsp; id(0x0000003C)<br>&nbsp; ]<br>&nbsp; void OPSetRoomParam(short locked, short invisble, short mic_time, short min_ulevel );<br>&nbsp; [<br>&nbsp; id(0x00000037)<br>&nbsp; ]<br>&nbsp; void OPGetMic(long fromuid, long touid );<br>&nbsp; [<br>&nbsp; id(0x00000012)<br>&nbsp; ]<br>&nbsp; void EnterRoom(long roomID, long userlevel, BSTR usernick );<br>&nbsp; [<br>&nbsp; id(0x0000001C)<br>&nbsp; ]<br>&nbsp; void PrivText(long userid, BSTR msgtext );<br>&nbsp; [<br>&nbsp; id(0x0000001F)<br>&nbsp; ]<br>&nbsp; long UserStatus(long uid );<br>&nbsp; [<br>&nbsp; id(0x00000022)<br>&nbsp; ]<br>&nbsp; short EnumCate(short cate );<br>&nbsp; [<br>&nbsp; id(0x0000001D)<br>&nbsp; ]<br>&nbsp; long Idx2id(long idx );<br>&nbsp; [<br>&nbsp; id(0x0000001E)<br>&nbsp; ]<br>&nbsp; BSTR Nickbyid(long uid );<br>&nbsp; [<br>&nbsp; id(0x0000001B)<br>&nbsp; ]<br>&nbsp; void PubText(long userid, BSTR msgtext );<br>&nbsp; [<br>&nbsp; id(0x00000023)<br>&nbsp; ]<br>&nbsp; long EnumRoom(short cate, long rid );<br>&nbsp; [<br>&nbsp; id(0x00000013)<br>&nbsp; ]<br>&nbsp; void Connect( void );<br>&nbsp; [<br>&nbsp; id(0x00000014)<br>&nbsp; ]<br>&nbsp; void AddRoom(BSTR roomname, short permanent, short invisible, short max_user, short mic_count, short mic_time, short vhostmaster, short voperator, short vuser, short vguest );<br>&nbsp; [<br>&nbsp; id(0x00000011)<br>&nbsp; ]<br>&nbsp; void Login(long ugidLo, BSTR logstring );<br>&nbsp; [<br>&nbsp; id(0x00000020)<br>&nbsp; ]<br>&nbsp; long UserDef(long uid );<br>&nbsp; [<br>&nbsp; id(0x00000021)<br>&nbsp; ]<br>&nbsp; void SetUserDef(long udata );<br>&nbsp; [<br>&nbsp; id(0x0000001A)<br>&nbsp; ]<br>&nbsp; void ChangeNick(BSTR usernick );<br>&nbsp; [<br>&nbsp; id(0x00000026)<br>&nbsp; ]<br>&nbsp; long RoomCUser(long rid );<br>&nbsp; [<br>&nbsp; id(0x0000002C)<br>&nbsp; ]<br>&nbsp; long RoomUPriv(long rid );<br>&nbsp; [<br>&nbsp; id(0x00000032)<br>&nbsp; ]<br>&nbsp; void ChangeUserLevel(long ugidLo, short ulevel, short cateid, long rid );<br>&nbsp; [<br>&nbsp; id(0x00000025)<br>&nbsp; ]<br>&nbsp; long RoomProp(long rid );<br>&nbsp; [<br>&nbsp; id(0x00000024)<br>&nbsp; ]<br>&nbsp; BSTR roomname(long rid );<br>&nbsp; [<br>&nbsp; id(0x00000027)<br>&nbsp; ]<br>&nbsp; void RoomList( void );<br>&nbsp; [<br>&nbsp; id(0x00000031)<br>&nbsp; ]<br>&nbsp; void Register(BSTR passwd, BSTR nick, BSTR xmlinfo );<br>&nbsp; [<br>&nbsp; id(0x0000002D)<br>&nbsp; ]<br>&nbsp; void SetSelfPriv(long vocr, long pubtr, long prvtr );<br>&nbsp; [<br>&nbsp; id(0x00000030)<br>&nbsp; ]<br>&nbsp; void VPMLeave( void );<br>&nbsp; [<br>&nbsp; id(0x0000002F)<br>&nbsp; ]<br>&nbsp; void VPMPermit(long uid );<br>&nbsp; [<br>&nbsp; id(0x00000034)<br>&nbsp; ]<br>&nbsp; long userlevel(long uid );<br>&nbsp; [<br>&nbsp; id(0x00000033)<br>&nbsp; ]<br>&nbsp; long ChangePasswd(long ugidLo, BSTR oldpassword, BSTR newpassword, BSTR nick );<br>&nbsp; [<br>&nbsp; id(0x0000002E)<br>&nbsp; ]<br>&nbsp; void VPMRequest(long uid, BSTR msg );<br>&nbsp; [<br>&nbsp; id(0x0000002A)<br>&nbsp; ]<br>&nbsp; short RoomSort(long rid );<br>&nbsp; [<br>&nbsp; id(0x00000046)<br>&nbsp; ]<br>&nbsp; void NewPasswd(long ugidLo, long gpcode );<br>&nbsp; [<br>&nbsp; id(0x00000045)<br>&nbsp; ]<br>&nbsp; void SetTopic(BSTR topic );<br>&nbsp; [<br>&nbsp; id(0x00000040)<br>&nbsp; ]<br>&nbsp; long UserInfo(long uid, long infoidx );<br>&nbsp; [<br>&nbsp; id(0x0000003E)<br>&nbsp; ]<br>&nbsp; void SetParam(long funcnum, long value );<br>&nbsp; [<br>&nbsp; id(0x00000044)<br>&nbsp; ]<br>&nbsp; BSTR RoomTopic(long rid );<br>&nbsp; [<br>&nbsp; id(0x00000043)<br>&nbsp; ]<br>&nbsp; void OPLockRoom(BSTR roomPass );<br>&nbsp; [<br>&nbsp; id(0x0000003F)<br>&nbsp; ]<br>&nbsp; long RoomInfo(long rid, long infoidx );<br>&nbsp; [<br>&nbsp; id(0x00000029)<br>&nbsp; ]<br>&nbsp; short RoomCate(long rid );<br>&nbsp; [<br>&nbsp; id(0x00000028)<br>&nbsp; ]<br>&nbsp; long RoomIdx2id(long ridx );<br>&nbsp; [<br>&nbsp; id(0x0000002B)<br>&nbsp; ]<br>&nbsp; void DelRoom(long rid );<br>&nbsp; [<br>&nbsp; id(0x00000042)<br>&nbsp; ]<br>&nbsp; void QueryUser(long uid, long funcid );<br>&nbsp; [<br>&nbsp; id(0x00000041)<br>&nbsp; ]<br>&nbsp; void OPBanIP(long uid, BSTR msg );<br>&nbsp; [<br>&nbsp; id(0x00000035)<br>&nbsp; ]<br>&nbsp; long SelfInfo(long infoidx );<br>};
 
这是一个COM接口的DLL,<br>先注册,RegSvr32 xxx.dll<br>从Delphi的Project|Import Type Library导入,或者用Component|Install ActiveX Control安装成控件。<br>通常会生成诸如xxx_tlb.pas的文件;<br>将xxx_tlb.pas在加到工程中,引用xxx_tlb;<br>在xxx_tlb中你能看到 IDIMCv1这类接口,和CoDIMCv1类;<br>CoDIMCv1是创建IDIMCv1的方法,你只通过调用CoDIMCv1中的Create就可完成装载DLL,建立接口等工作,并获取IDIMCv1实例,通过IDIMCv1可以调用DLL完成功能。<br><br>详细的资料可以找一些Delphi关于COM编程方面的看看就明白了。<br>关键还在于你对这个DLL中的接口功能了解多少。<br><br>
 
因该是正确的
 
我已经加入控件了,当控件放在Fomr1上,出现"Err size 100,50"错误,然后弹出"could not obtian OLE control window handle"然后什么都没有,怎么办?能解决的再加100分
 
具体下载这个解开看看http://www.xiliao.com/talk.cab
 
动态方法创建它没问题,我不知道它是干什么用的,如果不显示图像,则可以想办法用。<br>可能是它与Delphi的兼容问题。
 
也不需要显示图像。怎么调用?
 
后退
顶部