Article View: borland.public.cppbuilder.nativeapi
Article #11537Re: fetch commando argument - multiple files
From: nik
Date: Tue, 03 Feb 2004 20:27
Date: Tue, 03 Feb 2004 20:27
31 lines
1970 bytes
1970 bytes
> > * my problem is, how can I send a string to my app?
>
> Send a WM_COPYDATA message from the second instance to the first one.
I tried using WM_COPYDATA and it works good, but the hole procedure is very
slow.
I am using following code to prevent multiple instances of my app.
HANDLE hInstanceMutex = ::CreateMutex(NULL,TRUE, "SINGLEl.MUTEX");
if(GetLastError() == ERROR_ALREADY_EXISTS)
{
Application->Title = "";
HWND hPrevApp = ::FindWindow(NULL, "MyAppTitle");
if(hPrevApp)
// Send Data to first Application (OwnFileName);
}
If I mark 100 files in the explorer, every single file tries to call my app,
passing its own filename as an argument, right?
this takes up to 12 sec. for speed comparison I added these files to a zip
file using the context menu of the explorer which takes less than 1sec.
So, is there are more sophisticated and faster way to get the filenames of
SEVERAL files that are marked in the explorer?
thanks again
nik
Technical Details
Message-ID:
<40200434$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<401dd9bc@newsgroups.borland.com> <401deae8@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,5c52809e13a7bad5 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-03 12:40:16 PST From: "nik" <neusser@okstate.edu> Newsgroups: borland.public.cppbuilder.nativeapi References: <401dd9bc@newsgroups.borland.com> <401deae8@newsgroups.borland.com> Subject: Re: fetch commando argument - multiple files Date: Tue, 3 Feb 2004 14:27:27 -0600 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 139.78.50.206 Message-ID: <40200434$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1075840052 139.78.50.206 (3 Feb 2004 12:27:32 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail