Solved

DDE problem

Posted on 1999-01-04
8
458 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
 
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now