You say "Why? For single instance code?" :confused: :confused:
Please read this

I look now for the best way to send message with command line string from one prog to other one
This mean that single intance Q solved
I look for how to send message with some text example "C:\readme.txt" to another program Huh
Sorry if I write not clear Q
Zebio.
Posted on 2002-06-11 05:16:11 by Zebio
i don't know if this is going to work or not.
i am just thinking in a loud voice.

what about making a function in your exe file that accept what you want to send.

then the other exe file all it has to do is finding the address of this file in memory . and send the data to this function !!

i don't know if it is going to work or not , just thinking in high voice.
Posted on 2002-06-11 05:42:07 by Sa6ry

You say "Why? For single instance code?" :confused: :confused:
Please read this

I look now for the best way to send message with command line string from one prog to other one
This mean that single intance Q solved
I look for how to send message with some text example "C:\readme.txt" to another program Huh
Sorry if I write not clear Q
Zebio.


No need to yall.

Take your Win32.hlp, MSDN or PlatformSDK and look for "ShellExecute", "WinExec" or "CreateProcess".

Or use the nice search feature again and search for "command line".

regards,
bAZiK
Posted on 2002-06-11 06:46:37 by bazik
Zebio,

You could pass the CommandLine from your app to the previous instance using DDE.

A new instance sends the CommandLine to the previous instance and then exits.

Look inter-application communication.

I don't know if there is an easier method but this one works well.

Regards,
pelaillo
Posted on 2002-06-11 08:30:07 by pelaillo
the best approach for multiple-instance detection is, imo, the
shared-section approach. It's simple & elegant, even if it "wastes"
4095 bytes :) (that is, if you only use a single byte in the shared segment).

When you need to pass a commandline or *whatever* to the
already-running instance, I suggest using FindWindow instead of
the shared-section approach - you can then use SendMessage to
send <whatever> to the already running app.
Posted on 2002-06-11 08:35:25 by f0dder