WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> Plugins >> loading my own "resolveExample.dll" PopUp problem!
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1333919792

Message started by Palle500 on Apr 8th, 2012 at 11:16pm

Title: loading my own "resolveExample.dll" PopUp problem!
Post by Palle500 on Apr 8th, 2012 at 11:16pm
Hi,
I have made my own "resolveExample.dll" it works fine. I have some popup messages if error occure inside that DLL that I don't like to show up then editing the WD task.

it looks like this: code{WdFileID.dll, {drive}:\{originalfull}, {runnumber}, {eventnumber]

I plan to use the {runnumber} and {eventnumber} to prevent the DLL from do any popup then I editing the WD task,
by checking if the {runnumber} = 721 and {eventnumber} = 12413. Who are the default values in edit mode.

Could you garantie that this values won't change? Or where could I found this values (config file)?

//Palle500

Title: Re: loading my own "resolveExample.dll" PopUp prob
Post by Gert on Apr 8th, 2012 at 11:39pm
Hej Palle,

No, we can not guarantee that ;-)

Here is a better way:
Call GetModuleFileName ( http://msdn.microsoft.com/en-us/library/windows/desktop/ms683197%28v=vs.85%29.aspx ) from the DLL and pass NULL for the HMODULE so you will receive the complete path of the calling exe.

If it ends with wdrun.exe you are called when the task is running. If it ends with wdcc.exe your dll is called while configuring the task. I think you need to ignore CaSe for the exe names.
Gert

Title: Re: loading my own "resolveExample.dll" PopUp prob
Post by Palle500 on Apr 8th, 2012 at 11:43pm
Hi Gert,
Thanks I know how to do that. I worked a lot of this then I struggled to find the DLL process handle and not the loading program!

Great Thanks for you quick reply.

//Palle

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.