mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2004
Posts: 2,019
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
The following code illustrates that a variable declared when declaring the type by reference, for some reason the reference is lost when doing another $com call.

As you will more than likely see, it first echoes the url just fine (which was set earlier in the last line of the code with "bstr* bug", but after calling $com again, the reference is gone.

Code:
alias comrefbug {
  if ($com($1)) {
    echo -a > $com($1,bug)
   !.echo -q $com($1,url,2)
    echo -a > $com($1,bug)
    .comclose $1
    echo -a done
    return
  }
  var %main = $+(rssnews,$ticks), %t
  .comopen %main Msxml.DOMDocument
  if ($comerr) return
  %t = $com(%main,validateonparse,4,bool,false)
  %t = $com(%main,async,4,bool,false) 
  %t = $comcall(%main,comrefbug,load,1,bstr* bug,http://www.iht.com/rss/frontpage.xml)
}


mIRC 6.16, Windows XP+SP2


Gone.
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I came across this bug yesterday but assumed you couldn't use $comcall with dispatch pointers. Now I see I was wrong smile


Link Copied to Clipboard