Directory Opus 9 crashes when I try to use dde

Directory Opus 9 crashes when I try to use dde. Executing the following (and every other dde) script causes DOpus 9 exit, then Vista will pop the "Directory Opus 9 has stopped working" dialog.

ddeexec [play]
ddeapp WINAMP
ddetopic System
"c:\program files\winamp\winamp.exe" /dde

I am using the gen_dde.dll plugin for WinAmp.

This works fine under XP. Anyone else see anything like this?

Are you able to test sending the DDE message to Winamp/gen_dde from another program in Vista? (e.g. Via a filetype and then using Explorer.)

I don't have Winamp installed here but I just verified that DDE does work okay on Vista, at least for the example of Opus telling mIRC to DCC a file using DDE.

Oh, it's worth noting that if ANY application on your computer has stopped responding to window messages (on Vista that's usually indicated by the window ghosting out) then that can cause other, innocent apps to lock up when they try to use DDE. See The Old New Thing for details.

Trying a DDE to another program, or from another program should be a good test of whether that is the problem.

Thanks for the help. I did not test it further as I found a much simpler method of passing commands to WinAmp called CLamp:

membres.lycos.fr/clamp/

It is a tiny command like tool which supports nearly every feature of WinAmp, and responds much quicker than DDE ever did. (For some reason it always lagged a 1/2 to a second)

Here is a script Example:

@runmode hide
c:\Program files\gpsoftware\directory opus\Clamp.exe /play

or

@runmode hide
c:\Program files\gpsoftware\directory opus\Clamp.exe /LOADPLAY {f}

The last one loads files recursivly so you can choose a folder and it will load and play everything under it. I was never able to get that to work using dde...

I am having the exact same problem on Vista. I have "normal" windows explorer set to open all unknown files with dde to xemacs. It works great.

So, I customized the "left double-click" under "unknown file types". here are my settings:

ddeexec [open("%1")]
ddeapp xemacs
ddetopic System
"C:\xemacs\XEmacs-21.4.10\i586-pc-win32\xemacs.exe" /dde

I then double-click an unknown file in opus and boom, opus crashes every time.

Ive played with it a bit and found the crash is caused by the ddeapp name. if i do "ddeapp xemacs.exe" it wont crash, but it wont do dde either (a new instance of xemacs will open, with the clicked file, and a new file named dde!)

Yes, I have also tried the "open unregistered file type in text" preference, but it doesnt work either! If i double-click an unknown file in opus, Windows always says "Windows cannot open this file ..." and wants me to choose a program.

How can I get this to work?

[quote="ryanagler"]I am having the exact same problem on Vista. I have "normal" windows explorer set to open all unknown files with dde to xemacs. It works great.

So, I customized the "left double-click" under "unknown file types". here are my settings:

ddeexec [open("%1")]
ddeapp xemacs
ddetopic System
"C:\xemacs\XEmacs-21.4.10\i586-pc-win32\xemacs.exe" /dde

I then double-click an unknown file in opus and boom, opus crashes every time.

Ive played with it a bit and found the crash is caused by the ddeapp name. if i do "ddeapp xemacs.exe" it wont crash, but it wont do dde either (a new instance of xemacs will open, with the clicked file, and a new file named dde!)

Yes, I have also tried the "open unregistered file type in text" preference, but it doesnt work either! If i double-click an unknown file in opus, Windows always says "Windows cannot open this file ..." and wants me to choose a program.

How can I get this to work?[/quote]

UPDATE:
I'm not sure what happened, but after playing with it/rebooting a few times, it no longer crashes, but it still doesnt work correctly either.

To try something different, I decided to have Opus open unknwon files with PSPad instead of XEmacs. Now what happens is that with PSPad it appears dde is working, but PSPad just creates a new file called "dde", and not the file that was double-clicked. XEmacs also creates a new file called "dde", but doesnt seem to have dde working as it launches a new instance of XEmacs each time. here are the settings I tried:

ddeexec [open("%1")]
ddeapp PSPAD
ddetopic System
"C:\Program Files\PSPad editor\PSPad.exe" /dde

ddeexec [open("%1")]
ddeapp xmacs
ddetopic System
"C:\xemacs\XEmacs-21.4.10\i586-pc-win32\xemacs.exe" /dde

Can anyone confirm that custom 'Unknown File Types' dde settings actually work in Vista?

If they are both creating files called DDE then it suggests that DDE launches of the programs are triggered in some other way, not by passing "/dde" on the commandline. (Since the programs seem to think you want to open a file/path called "/dde" they are treating it as a filename, not as a special commandline switch.)

Good thought -- I was just going by the examples I found while researching previous posts.

I did get it to work with PSPad using the following:

ddeexec
ddeapp PSPAD
ddetopic System
"C:\Program Files\PSPad editor\PSPad.exe" "%1"

Why are you actually trying to use DDE at all?
It sounds like you don't actually know that the programs in question support DDE - it's quite possible they don't.

[quote="jon"]Why are you actually trying to use DDE at all?
It sounds like you don't actually know that the programs in question support DDE - it's quite possible they don't.[/quote]

Correct me if i'm wrong, but the reason for using dde is so that if an application such as XEmacs or PSPad is already running, that if you double click a file that the file opens as an additional tab in the existing application, rather than launching an entirely new application instance? Or can that be done without DDE?

It really depends on the program in question. Yes, that can be true - one of the features of DDE is that a program is already running, a message can be sent to the existing instance instead of starting a new program. But it's up to the target application to determine the behavior when that occurs. There's no guarantee that's how the app will behave (even though that is probably most commonly what happens.)

Conversely, there's no reason an application can't detect whether it is already running and send itself a message in the same way. Lots of software behaves like this - MS Word for example. Also Opus behaves like this - if you try to start Opus twice, all that happens is the first instance will open an additional Lister.

So basically:

a) you can't just assume that a program supports DDE, you need to check the instructions for that program to find out if it does and how it is initiated

b) the use of DDE doesn't "guarantee" that two copies of an application won't be opened, this is just the "usual" way it works

c) not using DDE doesn't guarantee that two copies of an application WILL be opened

Note that I'm not saying either of the two programs you are using don't support DDE, I'm saying it seems like you are assuming they do and also assuming that the DDE mode is invoked in the same way as some other program does it when there's no guarantee that either of these are true.

In short : RTFM :slight_smile:

[quote="jon"]
Note that I'm not saying either of the two programs you are using don't support DDE, I'm saying it seems like you are assuming they do and also assuming that the DDE mode is invoked in the same way as some other program does it when there's no guarantee that either of these are true.

In short : RTFM :slight_smile:[/quote]

True in the case of PSPad, I "assumed" it did support dde but I had bever tried it before.

However, for years I have had Windows Explorer open files via dde to XEmacs -- so when it wasnt working in Opus I knew it had to be something Opus-specific in the way i was configuring it. Normally I just make the shell=open type registry entries for unknown filetypes to go to XEmacs, and it worked great.

The way I was trying it was actually specifically modelled to the way it is presented in the Opus manual:

ddeexec [open(“%1”)]
ddeapp ACDSee
ddetopic System
“C:\Program Files\ACD Systems\ACDSee\ACDSee.exe” /dde

Yes but that is specific for ACDSee - there's no reason Emacs would use the same commands.

Are you sure Explorer was calling XEmacs via DDE? You seem to be guessing about the commands used to launch XEmacs via DDE so it sounds like you're also guessing that DDE was being used in Explorer. Maybe Explorer was launching XEmacs via the command-line? Or maybe it really was using DDE but using different commands / command-lines to those used in the manual's ACDSee example. DDE commands are application-specific and not all applications support DDE.

DDE is also something to be avoided, if possible. If a program lets you pass a file to an existing instance of itself via a normal command-line then it is preferable to use instead of DDE. DDE is a Windows 3.11-style legacy thing and has several problems (like if an unrelated application on your system has stopped responding it can lock up any program which attempts to use DDE to launch another):

blogs.msdn.com/oldnewthing/archi ... 63683.aspx