home *** CD-ROM | disk | FTP | other *** search
- From: peterj@PROBLEM_WITH_INEWS_GATEWAY_FILE (Peter Westley)
- Date: Tue, 26 Jan 1993 01:47:57 GMT
- Subject: BC++3.0/OWL DDEACK structure from WM_DDE_EXECUTE
- Message-ID: <1993Jan26.014757.12410@hparc0.aus.hp.com>
- Organization: HP Australasian Response Centre (Melbourne)
- Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!hpscit.sc.hp.com!hplextra!hpcc05!hparc0.aus.hp.com!peterj
- Newsgroups: comp.os.msdos.programmer
- Sender: news@hparc0.aus.hp.com (News Adminstrator)
- X-Newsreader: TIN [version 1.1 PL8.5]
- Lines: 79
-
- [ Article crossposted from comp.os.ms-windows.programmer.misc ]
- [ Author was Peter Westley ]
- [ Posted on Tue, 26 Jan 1993 01:33:13 GMT ]
-
- Is the DDEACK structure which comes pointed to in LOWORD of lParam when
- WM_DDE_ACK is in response to a WM_DDE_EXECUTE message, valid?
-
- Let me explain:
-
- I have a method called when I receive a WM_DDE_ACK message:
- (Using OWL dynamic dispatching it's easy) It get's called after sending a
- WM_DDE_XXX message to the DDE serveer, when the server replies with an
- WM_DDE_ACK message.
-
- class DDEClass
- {
- //...
- WMDDEAck(TMessage & Msg)
- =[WM_FIRST + WM_DDE_ACK];
- WORD PendingMessage;
- }
-
- void DDEClass::WMDDEAck(TMessage& Msg)
- {
- switch (PendingMessage)//pending message is the message which was just sent
- //to the DDE server - i.e. it's what this WM_DDE_ACK
- //is in reply to.
- {
- case WM_DDE_INITIATE:
- //stuff
- break;
- case WM_DDE_REQUEST:
- //I put this and the next case in blocks so that the DdeAck is only
- //created if it's needed (i.e. a local copy only)
- { //Get the pointer to the DDEACK
- DDEACK *DdeAck = (DDEACK *)Msg.LP.Lo;
- if(DdeAck->fAck) //\
- //stuff if ack is valid; // \
- else // |- these are different to the
- //other stuff if it isn't; // / DDE_EXECUTE commands
- } ///
- break;
- case WM_DDE_EXECUTE:
- { //Get the pointer to the DDEACK
- DDEACK *DdeAck = (DDEACK *)Msg.LP.Lo;
- if(DdeAck->fAck)
- //stuff if ack is valid;
- else
- //other stuff if it isn't;
- }
- break;
- }
- }
-
- The problem is that when I get the response from the WM_DDE_REQUEST message,
- everything is fine (same for the WM_DDE_INITIATE but I don't use the DDEACK
- structure there) When it enters the case WM_DDE_EXECUTE case section,
- I get a GP fault on access to the DdeAck->fAck location. The code generated
- by the compiler is the same for both parts of the case statements (though
- I haven't been able to check the code which sets up the DDEACK struct).
-
- SO, does anyone know if there is a problem in the windows code (3.1) which
- might be broken here such that it doesn't allocate the DDEACK structure
- properly? Is the DDEACK struct supposed to be valid when it's in response
- to a WM_DDE_EXECUTE message?
-
- Please help!
-
- Thank in anticipation,
-
- Peter Westley .-_!\ Hewlett Packard
- Phone: +61 3 (T)272 2440 / \ Australian Support Centre
- Fax: +61 3 890 0326 \_.-.b/<--------31-41 Joseph St.
- E-mail: peterj@hparc0.aus.hp.com v Blackburn, Victoria 3130
- //
- // The views, opinions, information or other data here is solely from the
- // mind of myself. It is not the official word from my employer. While I
- // endeavour to provide accurate information, no responsibility is taken
- // for errors or omissions.
-