The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 DDE help required

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
cosy Posted - 02/23/2004 : 11:42:45 AM
Hi, I am a research student using origin as my graphing software.I use DDE to exchange data between my application and Origin in "real time".My MFC application is the DDE server and the code for intializing it goes like this

void timersettingsDlg::OnViewPlots()
{
DWORD g_idInst;

HSZ hszService;

char ServerBuf[MAX_COMPUTERNAME_LENGTH+8];

wsprintf( ServerBuf,"TRIC_DDE_SERVER");

ShellExecute(NULL, "open","\"E:\\Documents and Settings\\Adminastraitor\\Desktop\\NEW TRIC\\TTRIC\\Origintric.OPJ\"", NULL, NULL, SW_SHOWNORMAL);

// Register the server application.
if( DdeInitialize(
&g_idInst,
(PFNCALLBACK) DdeCallback,
APPCLASS_STANDARD | CBF_FAIL_SELFCONNECTIONS |
CBF_FAIL_REQUESTS | CBF_FAIL_EXECUTES,
0L
) == DMLERR_NO_ERROR )
AfxMessageBox("Hello");

hszService = DdeCreateStringHandle( g_idInst, ServerBuf, 0 );

DdeNameService( g_idInst,hszService,0L,DNS_REGISTER);

}
and the callback function for my MFC server goes like


HDDEDATA CALLBACK DdeCallback( UINT iType, UINT iFmt, HCONV hConv,
HSZ hsz1, HSZ hsz2, HDDEDATA hData, DWORD dwData1, DWORD dwData2 )
{
MessageBeep(MB_ICONHAND);
AfxMessageBox("Hello");
return (HDDEDATA) TRUE;

}
I hope everthing is fine till now.
I tried to connect to this server from a client , Origin in my case and I used Labtalk for the same.
The code goes like
dde -c TRIC_DDE_SERVER|data id;

If my code works properly or if my programing is right ,
I must get a message box with "Hello", which I dont.
I am completely new tothis labtalk script and so can anyone help me out.

Thanks,
Deepak Samuel.




The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000