mIRC Home    About    Download    Register    News    Help

Print Thread
#61527 23/11/03 06:17 AM
Joined: Dec 2002
Posts: 1,922
O
Online Offline OP
Hoopy frood
OP Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
In continuation of this thread, if would be nice if $dllcall will pass the returned value to the specified alias.

Currently, this is how $dll and $dllcall work:
  • //echo $dll(mdx.dll,DLLInfo,)
    mIRC Dialog eXtension DLL
    //echo $dllcall(mdx.dll,echo myparam,DLLInfo,)
    myparam C:\MIRC\MDX.DLL
What I'm suggesting is that the returned value will be passed too, resulting in:
  • //echo $dllcall(mdx.dll,echo myparam,DLLInfo,)
    myparam C:\MIRC\MDX.DLL mIRC Dialog eXtension DLL
Otherwise, there will be no way to determine what the function returned.

#61528 23/11/03 07:22 AM
Joined: Jun 2003
Posts: 195
N
Vogon poet
Offline
Vogon poet
N
Joined: Jun 2003
Posts: 195
this cant be done. the purpose of the alias is to notify you when the function has finished and returned. $dllcall cannot return the value returned by the dll function because the function is executed in another thread. this means that when $dllcall returns the dll function could still be executing and hasnt returned yet. cant return a value if you dont have one.

the 2 calls are used to compliment each other. when you need to write a long dll function its best to used $dllcall so that mIRC isnt frozen. If you MUST have the return value use $dll. In contrast however you can of course make use of the mapped file and call whatever alias you like with whatever parameters you like (but $dllcall will never return what the function returned).

i posted before i read the previous thread but now i think i knwo what you want. the simple solution would be to specify a bogus name for the alias in $dllcall. this means nothing happens (on mIRC's part) when the function returns. you can then use the mapped file to call another alias passing in the value returned from the function.

I agree the alias should be called with the return value included as this is entirely possible but until then try using the mapped file. sorry for the confusion its late and im tired smile

Last edited by Narusegawa_Naru; 23/11/03 07:28 AM.

Have Fun smile

Link Copied to Clipboard