DDE

DDE

Post by Toylet Duc » Wed, 18 Aug 1999 04:00:00



I have little experiences with DDE.

How could I guarantee that
ddesetservice("haha", "DEFINE")
would return .f. when the service name "haha"
is already definied by another application?
My current solution is use flock() over a dbf
(like a semaphore).

 
 
 

1. Excel VB DDE to VC++ DDE server in NT

I don't know if this is the appropriate group for this question, but I've tried
everything and still can't figure it out:  I am trying to build a DDE connection
between an Excel VBasic client and a server written in VC++ 2.0, on Windows NT 3.5.
The Excel is 16 bit.

I have followed the exact procedure which is almost the same in several books,
I can get the connection up (DDEInitiate), execute stuff (DDEExecute), close
the connection (DDETerminate), but fail the requests (DDERequest).

The statement copied from the online help
        returnList = DDERequest(channelNumber, "mytopic")
seems to run fine on the C++ server, returns the right result, but I get an
"Error 2042" in 'returnList'.

The related C++ code at the DDE server site (in the DDE callback function, for the
XTYP_REQUEST message) is:
        HDDEDATA resultData = DdeCreateDataHandle(idInst, (LPBYTE)(LPCTSTR)result,
                result.GetLenth()+1, 0, hszAppName, CF_TEXT, 0);
        return resultData;

The only reasons I could see for this not to work are: mixing 32 bit DDE server with
the 16 bit version of Excel; the data type (I used CF_TEXT hoping that's the easiest
thing to do, since all I'm passing around is text).

Could anybody help?

Thanks,
Silviu

=========================================================================
Silviu Marghescu                 Phone: (202)458-8017
E9-008, PBD/PS                   Fax:   (202)522-3377


2. Temporary Tables in SQL 6.5 & IIS 4.0

3. Help for dde winword / demande d'aide sur dde winword

4. Sqlplus Question After New Install

5. PDOX 5 for Windows as DDE server, WordPerfect 6.x for Windows as DDE client?

6. Pivot Table Question

7. DDE Between Access ADP and B-Coder Pro not working in win2k

8. UTL_SMTP : 421 Service not available ?

9. Is possible import excel file with DTS, which includes DDE link

10. DDE timeout from MSQuery ODBC call to MSWord

11. odbc/dde problem

12. DDE Dilemma

13. Sending DDE