🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #1147

DDE Server help

#1147
From: JimG
Date: Fri, 19 May 2000 00:00
94 lines
2836 bytes
I am having trouble getting my BCB3 application to be a DDE server.  I am
using Excel to test with and it gives me the #REF! error.  Itried using the
DDESpy and it appears to see conversations but I'm not sure what it's
telling me.  It appears that what I have done is somewhat working because I
get the OnChange event that is supposed to happen before the message is sent
to the client.  Hear is my test code:

#include <vcl.h>
#pragma hdrstop
#include <stdio.h>
#include "DDEserver.h"
file://---------------------------------------------------------------------
-----
-
#pragma package(smart_init)
#pragma resource "*.dfm"
TDMDDE *DMDDE;

// some text to send
const char *msg[] = {
    "zero",
    "one",
    "two",
    "three",
    "four",
    "five",
    "six",
    "seven",
    "eight",
    "nine",
    "ten"};



file://---------------------------------------------------------------------
-----
-
__fastcall TDMDDE::TDMDDE(TComponent* Owner)
    : TDataModule(Owner)
{
}
file://---------------------------------------------------------------------
-----
-
void __fastcall TDMDDE::SensorsOpen(TObject *Sender)
{
    file://ShowMessage("DDE Open");
}
file://---------------------------------------------------------------------
-----
-
void __fastcall TDMDDE::SensorsClose(TObject *Sender)
{
    file://ShowMessage("DDE Close");
}
file://---------------------------------------------------------------------
-----
-
void __fastcall TDMDDE::Timer1Timer(TObject *Sender)
{
    static int i=0;

// change the text to trigger the OnChange event
    Address1->Text = msg[i];
    if(++i > 9)
        i = 0;
}
file://---------------------------------------------------------------------
-----
-
void __fastcall TDMDDE::Address1Change(TObject *Sender)
{
    // just here to see that it happens
    char i;
    i=0;
}
file://---------------------------------------------------------------------
-----
-
void __fastcall TDMDDE::Address1PokeData(TObject *Sender)
{
    ShowMessage("DDE Poke");
}
file://---------------------------------------------------------------------
-----
-

void __fastcall TDMDDE::SensorsExecuteMacro(TObject *Sender, TStrings *Msg)
{
    ShowMessage("DDE Macro");
}
file://---------------------------------------------------------------------
-----
-
Technical Details
Message-ID: <39255ebb@dnews>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,55318d23172dd438,start
X-Google-Attributes: gidfcd2b,public
From: "JimG" <jgunnoe@inetone.net>
Subject: DDE Server help
Date: 2000/05/19
Message-ID: <39255ebb@dnews>
X-Deja-AN: 625447821
X-Trace: 19 May 2000 08:33:15 -0800, 208.245.128.101
X-MSMail-Priority: Normal
X-Priority: 3
Newsgroups: borland.public.cppbuilder.database.multi-tier
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200