1. Stèphan Eizinga
  2. PowerBuilder
  3. Friday, 12 July 2019 12:05 PM UTC

Hello,

I want to send an ‘WM_COPYDATA’ message from an C# application to an PowerBuilder application. I have created an struct with the message and other C# can read the message.

How can I catch the ‘WM_COPYDATA’ message from PowerBuilder? There is no pbm_copydata event ID.

Thanks,

Accepted Answer
Michael Kramer Accepted Answer Pending Moderation
  1. Friday, 12 July 2019 13:13 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Stèphan, You can look for Message.Number = 74 (0x004A = 74) in Other event.

if Message.Number = 74 then
event ue_myCopyData(. . .)
end if

HTH /Michael

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 12 July 2019 20:11 PM UTC
  2. PowerBuilder
  3. # 1

Can you use WM_NOTIFY instead? There is a pbm_notify. I use it with the Scintilla text editor control.

Then you can use this function to copy data into a structure:

Subroutine CopyNotification(Ref scNotification Destination, ulong Source, long Length) Library "kernel32.dll" Alias For "RtlMoveMemory"

scNotification scn

// copy structure to local
CopyNotification(scn, lparam, 96)

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.