mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
lets say i send a call for a function in my dll, and the function in the dll writes some data to the 'data' folder in the scriptdir of the mirc (where the /dll command was called from)

how could i make the dll get that folder name?

or is it easier to send a call for the function with a parameter as a path to the folder to write to?

e.g.

$scriptdir $+ Data

Last edited by pouncer; 28/01/06 01:09 AM.
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
If you want to do it in the DLL, you can evaluate mIRC identifers by sending WM_MEVALUATE messages (should be defined as WM_USER + 201) to the mIRC application. I'm sure there is also some Win32 API call...

Code:
  // C/C++ Code
  // mData is global and returned from MapViewOfFile()
  // hApp is the window handle of the mIRC window
  // $script(nopath.mrc) with return the full path of a script
  strcpy(mData, "$script(nopath.mrc)");
  SendMessage(hApp, WM_USER + 201,0,0);

  // $dll(nopath.dll) with return the full path of dll in memory
  strcpy(mData, "$dll(nopath.dll)");
  SendMessage(hApp, WM_USER + 201,0,0);


Or as you said before, you could also send the $scriptdir path as a dll function parameter.


NaquadaBomb
www.mirc-dll.com

Link Copied to Clipboard