🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools.winsock
Article #3

Re: DDE, C++ and ILOG VIEWS

#3
From: Paul Meyer
Date: Tue, 16 Apr 1996 20:34
27 lines
1970 bytes
Buteau wrote:
> Has somebody written some classes that encapsulate the DDE mechanism??
> 
> (I mean a class like DDEclient that you can derive from, and that has
> member functions like send, receive, poke ....)

Errr, yes, but it was in the scope of a previous job and thus not suitable
for publication (and in fact I don't have a copy).

OTOH it only took me about a week to do the whole thing. Then again, I've
been using C++ since cfront 1.2 so I'm a bit familiar with class design.

The real trick is in allowing for the callbacks. DDE is not useful for
nontrivial things unless you use an asynchronous approach. Probably the
easiest design to use is to make the callback function dispatch to several
virtual member functions based on what it gets for parameters. There is
also the problem of deciding which DDE object should get the callback if
you instantiate more than one. I tried using the DDE provision for attaching
a user datum to a conversation, but it turns out that some important callbacks
occur in situations where that datum is not available. I had to fall back
to a runtime lookup table scheme. If you don't need more than one DDE object
in a program, though, this doesn't come up.

--
Paul Meyer        | When the Tremere ask you about your style of
pem@radmedia.com  | magic, just feel really confident and say,
pem@amurgsval.org | "These aren't the Druids you're looking for."
Technical Details
Message-ID: <31740460.44FE@radmedia.com>
Path: arc1-ca.pugleaf.net!clients1.news.internex.net!usenet
References: <4kljqu$ekf@news.cea.fr>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!clients1.news.internex.net!usenet
From: Paul Meyer <pem@radmedia.com>
Newsgroups: comp.os.ms-windows.programmer.tools.winsock,comp.lang.c++,comp.os.ms-windows.programmer.tools.misc
Subject: Re: DDE, C++ and ILOG VIEWS
Date: Tue, 16 Apr 1996 13:34:40 -0700
Organization: RadMedia, Inc.
Message-ID: <31740460.44FE@radmedia.com>
References: <4kljqu$ekf@news.cea.fr>
NNTP-Posting-Host: 205.158.20.71
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.0 (WinNT; I)