Send URL to Mass from other program

Author Message
Jen 07/12/2004 12:10 am
I`m making a program in C++, but I need add URL`s to list to Mass Downloader with some API (some function in some dll? ?)

Or something as the WM_COPYDATA message ?

Thanks.
Alexander 07/12/2004 05:26 am
Dear Jen,

Thank you for writing us.
You can read description of WM_COPYDATA command in the text file, included to:
http://www.metaproducts.com/download/helper.zip
Please feel free to contact us if you have any further questions.

Best regards,
Alexander Bednyakov
MP Staff

Jen 07/13/2004 03:04 pm
AnsiString cad =
"Url=http://www.metaproducts.com/download/desetup.exe\r\n"
"Comment=None\r\n"
"Referer=http://www.metaproducts.com/de.html\r\n"
"Threads=1\r\n"
"Priority=4\r\n"
"Path=c:\\download\\test.exe\r\n"
"Mode=start\r\n"
"Category=0\r\n"
"ExitWhenDone=true\r\n"
"DoNotRename=true\r\n"
"DeleteWhenDone=true\r\n"
"NoDescription=true\r\n";

// Find Window
HWND hWnd = FindWindow("TApplication", "Mass Downloader"); // I have also proven with: class: "TMainForm", title: NULL

if (!hWnd) return;

// Send data
PCOPYDATASTRUCT cp;
cp = new COPYDATASTRUCT;
cp->dwData = 0;
cp-
Jen 07/13/2004 03:06 pm
Continue...

cp->dwData = 0;
cp->cbData = cad.Length();
cp->lpData = cad.c_str();
SendMessage(hWnd, WM_COPYDATA, (WPARAM)0, (LPARAM)cp);
if (cp) delete cp;

_____________________

Why doesn`t it work?

SendMessage returns FALSE (not processed message)

P.D.: helper.exe doesn`t neither work.

Thanks.
Alexander 07/14/2004 06:47 am
Jen,

Please use the TMainForm class name. Please read MD window title from the
"HKEY_CURRENT_USER\SOFTWARE\MetaProducts\Mass Downloader" Registry key, "MDCaption" LPTSTR value.

Best regards,
Alexander Bednyakov
MP Staff