Solved

DDE problem

Posted on 1999-01-04
8
463 Views
Last Modified: 2012-06-27
hi

i have created 2 delphi programs, one with a DDEClientConv and the other with a DDEServerConv component.

I have managed to establish a link between those 2 applications. however, once the link is establiahed, if i close down the server, it comes up with an Access Violation error which i can't debug!! but if i close the connection from the client application (or terminate the client application first), the the server closes properly...

is this a bug with the component? how do i solve this?

Regards
Keith
0
Comment
Question by:keithcsl
  • 5
  • 3
8 Comments
 
LVL 3

Expert Comment

by:williams2
ID: 1354412
Try my example at

http://www.experts-exchange.com/topics/comp/lang/delphi/Q.10105839

It works fine

regards,
Williams
0
 
LVL 1

Author Comment

by:keithcsl
ID: 1354413
williams2

i have tired your code but still experienced the same thing. i ran the client and it established the link with the server. all the sending and receiving of data works fine. now, if i close the server while the client is still running, it comes up with an Access Violation at so and so address. Could it be the version of delphi i am using? it's 3.01

Keith
0
 
LVL 3

Expert Comment

by:williams2
ID: 1354414
I guess there is ways to do this right. Normally you don't close the server until the client has finished it's business. You should test whether the connection is still up and wait until the client has finished before exiting.

I'm sorry I cannot provide you a better answer to this.

Regards,
Williams
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 3

Expert Comment

by:williams2
ID: 1354415
(You should know, that I'm NOT getting any access violations, but just a faulty connection)
0
 
LVL 1

Author Comment

by:keithcsl
ID: 1354416
williams2

thanks for that. i am writing a commercial s/w, so i just thought the user might close down the server unintentionally. could u post ur comment as an aswer? i am happy to accept it...

regards
Keith
0
 
LVL 3

Accepted Solution

by:
williams2 earned 30 total points
ID: 1354417
I am happy that I can be any help to you dear Keith

If there's anyone who cares to comment on DDE, please do so.

Regards,
Williams
0
 
LVL 1

Author Comment

by:keithcsl
ID: 1354418
williams2

i just have a thought and need ur opinion... is it possible to convert the server into and activeX contorl, ie create an activeX form and paste the server components on it? u see, i have create the client end on my software and want to distribute the server end to other developers so that they can communicate with my program...

i have tried this and when i pasted the activex server on a new delphi project, the client managed to connect to it. the only problem is that it can't poke data or request data... somehow it seems like the serveritem cannot be found...

can u assist me in anyway? all i am trying to do is to create and communication link between my program and another external program...

Regards
Keith
0
 
LVL 3

Expert Comment

by:williams2
ID: 1354419
yes, you cannot make the server into a ActiveX control I'm afraid, because the DDE system won't you to execute an .ocx file. ocx's are like libraries, they need another program to run. Therefore the DDEServerItem should be named as the executable, os the system will be able to find it.

You can try it like above, but I'm not sure if it works :-(

Cheers,
Williams
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question