BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DDE Client without VCL/Forms

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi WinAPI
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Sun Jan 21, 2007 7:05 pm    Post subject: DDE Client without VCL/Forms Reply with quote



Some years ago Peter Below (TeamB) posted a reply on this topic.

http://groups.google.de/group/borland.public.delphi.winapi/browse_frm/thread/b70f60e093fd9da3/e5ed16b34a9fd7c6?lnk=st&q=dde+api+unit&rnum=4#e5ed16b34a9fd7c6

I tried to contact Peter, but his email is not valid. May someone can
tell me how to contact Peter?

Or if Peter is still active here: Can you send me the units too?

regards
Michael
Back to top
Guest






PostPosted: Wed Jan 24, 2007 4:01 am    Post subject: Re: DDE Client without VCL/Forms Reply with quote



I was searching for some more hours.

And now i am glad to report i found what i was searching for so long.

In this thread Peter was posting his units "DDEObjec" and "ErrClass":
http://groups.google.de/group/borland.public.delphi.vcl.components.using/browse_frm/thread/c81ee842ac98864d/7dc648027d4908a1?lnk=st&q=ddeml&rnum=1&hl=de#7dc648027d4908a1

And my problem seams to be solved. The units are working. Scroll down
for my example how to use the units.

Have fun.....


Michael



unit Unit1;

interface


uses
SysUtils, Windows, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, ExtCtrls, DDEObjec, DDEML;

type
TForm1 = class(TForm)
Memo1: TMemo;
edtService: TEdit;
edtTopic: TEdit;
edtMacro: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;


function DdeItemChange(CallType, Fmt: UINT; Conv: HConv; hsz1, hsz2:
HSZ; Data: HDDEData; Data1, Data2: DWORD): HDDEData; stdcall;

var
Form1: TForm1;

implementation

{$R *.DFM}

var
count: Integer = 0;
dde: TDDEMLClass;

function DdeItemChange(CallType, Fmt: UINT; Conv: HConv; hsz1, hsz2:
HSZ; Data: HDDEData; Data1, Data2: DWORD): HDDEData;
var
str:String;
begin
inc(count);
dde.GetDataAsStrObj(data, str);
Form1.Memo1.Lines.Add(IntToStr(count)+': '+str);
//result := data; when i give a result, my server app gets a timeout
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
dde := TDDEMLClass.Create(DDEItemChange, 0);
dde.Connect(PAnsiChar(edtService.Text), PAnsiChar(edtTopic.Text));
dde.Execute(PAnsiChar(edtMacro.Text));
end;

end.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi WinAPI All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.