DDE and the likes 
Author Message
 DDE and the likes

Hello,

I have a little problem: I would like to make my app be used to open a
specific file format without restarting the application (single
instance).

I know it has something to do with DDE, but I don't know what must be
done on the app side and what on the association side.

Thanx in advance for any help!

--
Cellphone: 0038631752815

Don't feel bad about asking/telling me anything, I will always gladly
reply.

Digging for info? Try AI Meta Search:
http://www.*-*-*.com/

MesonAI -- If nobody else wants to do it, why shouldn't we?(TM)
http://www.*-*-*.com/



Sat, 10 Jul 2004 16:35:09 GMT  
 DDE and the likes
You mean ShellExecute "OPEN" a file by association? You can't control this,
as the "number of instances" is controlled by the program associated with
the file. (If it's your program which is the associated program, you can
detect this easily enough and act accordingly).

Or do you mean your program needs to open a file created by another program?
In this case, surf on over to http://www.wotsit.org  look up the file
format, open the file using BINARY or other suitable access and read the
data.

I have no clue why you would think DDE is involved. I have posted on the
powerbasic site some PB/CC code to read/change Excel(r) spreadsheet files
(*.xls) using Excel's DDE interface, but that's just the easy way to access
Excel files from other than Excel. Go to
www.powerbasic.com/support/forums/ultimate.cgi, search, source code forum,
"DDE" in message subject and you'll find it.

That detection thing from your own program? Use a mutex. Search in the same
place looking for 'mutex' in the subject and you'll find some more code I've
posted.

--
Michael Mattias
Tal Systems, Inc.
Racine WI



Quote:
> Hello,

> I have a little problem: I would like to make my app be used to open a
> specific file format without restarting the application (single
> instance).

> I know it has something to do with DDE, but I don't know what must be
> done on the app side and what on the association side.



Sat, 10 Jul 2004 21:30:34 GMT  
 DDE and the likes


Quote:
> Hello,

> I have a little problem: I would like to make my app be used to open
a
> specific file format without restarting the application (single
> instance).

> I know it has something to do with DDE, but I don't know what must
be
> done on the app side and what on the association side.

Forget DDE.  DDE was 1991 technology.  What you are wanting to do is
create an Activex Document Server.  These are programs like Microsoft
Excel or Word, which can be run and controlled programmatically from
any language that supports Activex (OLE) technology.  Any version of
Borland or Visual C++ from 5.0 on, or Visual Basic 5.0 on can be used
to create such an application.

Be advised, though.  It is not a beginner's best choice.  You really
need to study up on how Activex/Object Linking and Embedding
technology works before you attempt it.

john thrum



Sun, 11 Jul 2004 09:14:51 GMT  
 DDE and the likes

Quote:
> Hello,

> I have a little problem: I would like to make my app be used to open a
> specific file format without restarting the application (single
> instance).

> I know it has something to do with DDE, but I don't know what must be
> done on the app side and what on the association side.

If I read your question correctly you want the shell to open files
with a running instance of your applictaion. If that is right, DDE is
what you must use because that is how the shell does it. Your app
needs to be a DDE server. The web site below has lots of info on DDE
and the registry entries which the shell uses.

Roger Abbott,
RHA (Minisystems) Ltd.
http://www.rhaminisys.com
DDE and WM_COPYDATA Interprocess Communication ActiveX controls and
FAQ
Other Freeware and Shareware



Sun, 11 Jul 2004 17:42:52 GMT  
 DDE and the likes

Quote:

> You mean ShellExecute "OPEN" a file by association? You can't control this,
> as the "number of instances" is controlled by the program associated with
> the file. (If it's your program which is the associated program, you can
> detect this easily enough and act accordingly).

Yes? Well to tell the truth, that kind of answer does not say much as to
how I can do it. Roger Abbott might have already provided enough help,
but any more is appreciated.

Quote:
> Or do you mean your program needs to open a file created by another program?
> In this case, surf on over to http://www.wotsit.org  look up the file
> format, open the file using BINARY or other suitable access and read the
> data.

Erm (sigh), no that is not the problem and... there are various methods
on how to "open a file created by another program", tho I must admit I
would not want to discuss that as I will never be able to make use of
it.

All my files are of course in quite readable text format, to make it
easier to debug.

Quote:
> I have no clue why you would think DDE is involved. I have posted on the
> PowerBASIC site some PB/CC code to read/change Excel(r) spreadsheet files
> (*.xls) using Excel's DDE interface, but that's just the easy way to access
> Excel files from other than Excel. Go to
> www.powerbasic.com/support/forums/ultimate.cgi, search, source code forum,
> "DDE" in message subject and you'll find it.

> That detection thing from your own program? Use a mutex. Search in the same
> place looking for 'mutex' in the subject and you'll find some more code I've
> posted.

I don't know if it's the same DDE we're talking about here. I noticed
that most programs that keep a single instance do not recieve filenames
by command line, but by this DDE thing, where the "DDE message" in the
associations part is set to something like "[open("%1")]". If it's not
clear enough, this is what I would want to use to keep my app
single-instanced.

But thanks for the help anyway. C'ya!

--
Cellphone: 0038631752815

Don't feel bad about asking/telling me anything, I will always gladly
reply.

Digging for info? Try AI Meta Search:
Http://WWW.AIMetaSearch.Com

MesonAI -- If nobody else wants to do it, why shouldn't we?(TM)
Http://WWW.MesonAI.Com



Mon, 12 Jul 2004 04:06:12 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Copy read-only liked tables

2. Visual Liking in .Net using TREE VIEW control

3. Likes CAT and Sport Query

4. Noone likes newbies??

5. TOOLBAR LIKES IE3.0

6. Outlook liked form design

7. Outlook liked form design

8. Outlook liked form design

9. Outlook liked form design

10. no one likes the DATA CONTROL

11. Outlook liked form design

12. Who Likes Money?

 

 
Powered by phpBB® Forum Software