Looking For Suggestions

Ken Ray kray at sonsothunder.com
Thu Sep 19 02:06:01 EDT 2002


Well, what you do is attach Tuviah's EXT.DLL external to your stack. In my
case, I am not planning on sending messages to other programs, but only to
react to messages sent *from* other programs. Regardless, when one program
sends messages to another, they program needs to "register" a name with the
OS. The EXT.DLL automatically registers the program "EXT" to the OS...
Monte's comments below allow you to change that by manipulating the registry
(something I didn't know about until now - thanks, Monte!).

To respond to DDE events, the EXT DLL sends the 'extDDEexecuteMsg' message
to the current card (I trap it in the stack script, though) with two
parameters, a "topic" and a "command". These are both strings, and so you
can use them any way you like. In my case, I have a handler that looks like
this:

on extDDEexecuteMsg pCommand,pParam
    -- I use the "topic" as the command, and the "command" as a supplemental
param
    switch pTopic
        case "open file"
            open stack pParam
            break
        case "quit"
            quit
            break
    end switch
end extDDEexecuteMsg

Then, say, from VB, I can write a button that when clicked will send the
"open file" message to my program, along with the "param" of the path name,
like this:

Private Sub CommandButton1_Click()

    Dim tCmd As Long

    tCmd = Application.DDEInitiate("EXT", "open file")

    Application.DDEExecute tCmd, "c:\myapp\mystack.rev"

End Sub

With Monte's manipulations, you can have multiple applications, with only
one of them registering as "EXT" at any given time. It would be great if we
could have individual registries for multiple apps, so we could have more
than one DDE-enabled application going at the same time...

Anyway, hope this helps,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "Chipp Walters" <chipp at chipp.com>
To: <metacard at lists.runrev.com>
Sent: Thursday, September 19, 2002 12:12 AM
Subject: RE: Looking For Suggestions


> Monte and/or Ken..
> I know DDE allows for intra communication between apps. But, how do you do
> it? And can you give an example of why you'd do it?
>
> thanks!
>
> -Chipp
>
> > -----Original Message-----
> > From: metacard-admin at lists.runrev.com
> > [mailto:metacard-admin at lists.runrev.com]On Behalf Of Monte Goulding
> > Sent: Wednesday, September 18, 2002 9:58 PM
> > To: metacard at lists.runrev.com
> > Subject: RE: Looking For Suggestions
> >
> >
> > Yes the name is hard coded to EXT. From what I can tell that
> > seems to be the
> > problem with having more than one app use the DDE.
> >
> > I do this at startup:
> >
> > get setRegistry("HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\",
> > "[fileOpen(%1)]")
> >     get
> > setRegistry("HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\app
> > lication\"
> > , "EXT")
> >     get
> > setRegistry("HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\topic\",
> > "System")
> >
> >
> > and this at shutdown:
> >
> > get setRegistry("HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\",
"")
> >   get
> > setRegistry("HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\app
> > lication\"
> > , "")
> >   get
> > setRegistry("HKEY_CLASSES_ROOT\iCoachRowing\shell\open\ddeexec\top
> > ic\", "")
> >
> > Please excuse the wrapping.
> >
> > PS: change "iCoachRowing" with your app name.
> >
> > Cheers
> >
> > Monte
> >
> > > -----Original Message-----
> > > From: metacard-admin at lists.runrev.com
> > > [mailto:metacard-admin at lists.runrev.com]On Behalf Of Ken Ray
> > > Sent: Wednesday, 18 September 2002 4:49 PM
> > > To: metacard at lists.runrev.com
> > > Subject: Re: Looking For Suggestions
> > >
> > >
> > > Monte,
> > >
> > > How do you 'set the DDE registry entries on startup'? I'm using
> > DDE also,
> > > but had the problem with the name being hard-coded as "EXT", so I'm
very
> > > interested...
> > >
> > > Ken Ray
> > > Sons of Thunder Software
> > > Email: kray at sonsothunder.com
> > > Web Site: http://www.sonsothunder.com/
> > >
> > > ----- Original Message -----
> > > From: "Monte Goulding" <monte.goulding at senet.com.au>
> > > To: <metacard at lists.runrev.com>
> > > Sent: Wednesday, September 18, 2002 1:57 AM
> > > Subject: RE: Looking For Suggestions
> > >
> > >
> > > > Just for iterest:
> > > >
> > > > What is it about EXT.dll that makes you app unstable? I use it all
the
> > > time
> > > > for just this purpose (along with opening custom file types
> > in currently
> > > > running apps). I found that it works very well. The only problem
I've
> > > found
> > > > is that it doesn't work if you have two apps registered to
> > use it on the
> > > > same system. All I do to workaround this problem is set the
> > DDE registry
> > > > entries on startup and delete them on shutdown.
> > > >
> > > > Anyway, I'm interested in any problems you have found.
> > > >
> > > > PS: It'd be nice if Scott added DDE to the engine because it's
> > > is now the
> > > > only thing I use EXT.dll for!
> > > >
> > > > Cheers
> > > >
> > > > Monte
> > > >
> > > > _______________________________________________
> > > > metacard mailing list
> > > > metacard at lists.runrev.com
> > > > http://lists.runrev.com/mailman/listinfo/metacard
> > > >
> > >
> > > _______________________________________________
> > > metacard mailing list
> > > metacard at lists.runrev.com
> > > http://lists.runrev.com/mailman/listinfo/metacard
> >
> > _______________________________________________
> > metacard mailing list
> > metacard at lists.runrev.com
> > http://lists.runrev.com/mailman/listinfo/metacard
>
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>




More information about the metacard mailing list