Recent

Author Topic: Re: Porting WM_COPYDATA  (Read 7563 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: Porting WM_COPYDATA
« on: August 02, 2010, 10:13:02 pm »
Anyone could help me rewrite this for linux? I can't find platform independent unit which have WM_COPYDATA message :/ .

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2574
Re: Porting WM_COPYDATA
« Reply #1 on: August 04, 2010, 12:12:26 am »
Anyone could help me rewrite this for linux? I can't find platform independent unit which have WM_COPYDATA message :/ .

this is because WM_COPYDATA (and messages in general) are windows only. So you won't find a 1:1 translation for it. But iirc WM_COPYDATA is used for widgets to copy their contents to clipboard, so why not use TClipboard (clipbrd unit)

PS, use a new topic for new questions. This makes searching for other users easier
« Last Edit: August 04, 2010, 12:15:41 am by Marc »
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Dibo

  • Hero Member
  • *****
  • Posts: 1048
Re: Porting WM_COPYDATA
« Reply #2 on: August 04, 2010, 01:22:04 am »
I'm trying to understand this "message handling" things on different operating systems. My question is related to this topic:
http://www.lazarus.freepascal.org/index.php/topic,9950.0.html
On the official website of Skype is an example of how to write a plug but only on Windows. I'm trying to convert this example to Linux

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2574
Re: Porting WM_COPYDATA
« Reply #3 on: August 04, 2010, 11:51:39 pm »
Skype should provide a way how to code this on linux. On linux you don't have messages, so the way you interface with windows, won't work on linux.
Lazarus provides a message emulation for the most common messages used by the VCL, for easier porting of Delphi apps. But those messages are LCL only and cannot be used for inter process communication.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Porting WM_COPYDATA
« Reply #4 on: August 05, 2010, 08:11:04 am »
I'm trying to understand this "message handling" things on different operating systems. My question is related to this topic:
http://www.lazarus.freepascal.org/index.php/topic,9950.0.html
On the official website of Skype is an example of how to write a plug but only on Windows. I'm trying to convert this example to Linux

The Skype interface is completely differente in each operating system. Don't try to port the Delphi Windows code to Linux. Get the Skype C Linux example and then port it to Pascal. If you want your program to work with skype across multiple platforms you will need to use IFDEFs

 

TinyPortal © 2005-2018