BBC BASIC for Windows
« WM_COPYDATA »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:13pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: WM_COPYDATA  (Read 2811 times)
Nick
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 33
xx Re: WM_COPYDATA
« Reply #8 on: Sep 8th, 2011, 4:33pm »

on Sep 8th, 2011, 4:07pm, Richard Russell wrote:
Bear in mind that, as a rule, any pointers sent in a message are only valid until the receiving end returns.


Yes, I was going to add that once the IPC bit of it was working properly.

Unfortunately mine still doesn't work. Does the COPYDATA statement at the sending end need similar 'magic'?

At present:

SYS "SendMessage", target_hwnd%, WM_COPYDATA, @hwnd%, COPYDATASTRUCT {}

Thanks Nick


User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: WM_COPYDATA
« Reply #9 on: Sep 8th, 2011, 9:34pm »

on Sep 8th, 2011, 4:33pm, Nick wrote:
At present:
SYS "SendMessage", target_hwnd%, WM_COPYDATA, @hwnd%, COPYDATASTRUCT {}

That looks OK to me (except that there's a space between COPYDATASTRUCT and the opening brace, which isn't allowed). Anyway, you said your receiving application was seeing the message successfully so it must be working.

Incidentally, I presume you realise that COPYDATASTRUCT is the name of the generic structure; typically not of a particular instantiation (of which there could be several in a program). Although there's nothing stopping you calling your structure that, I would normally use a more succinct name such as cds{}.

Richard.
User IP Logged

Nick
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 33
xx Re: WM_COPYDATA
« Reply #10 on: Sep 10th, 2011, 05:30am »

on Sep 8th, 2011, 9:34pm, Richard Russell wrote:
That looks OK to me (except that there's a space between COPYDATASTRUCT and the opening brace, which isn't allowed). Anyway, you said your receiving application was seeing the message successfully so it must be working.


Yes, after some tidying up, it works nicely.

Quote:
Incidentally, I presume you realise that COPYDATASTRUCT is the name of the generic structure; typically not of a particular instantiation


Yes, I did. I have it like this while authoring - it helps me to see more clearly which variable is what.

Thanks again - your help is much appreciated.

Nick
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls