Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8807773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:27:03+00:00 2026-06-14T02:27:03+00:00

I am desperately trying to automate BSPlayer from my script. I was successful in

  • 0

I am desperately trying to automate BSPlayer from my script.
I was successful in sending simple command ids to the BSPlayer window(volume up/down, play/pause, etc.), however I am not able to get the file name back.

Here is the BSPlayer API.
I was able to emulate in python the first parts, however the WM_COPYDATA doesn’t work.

Here is my Python code:

copyDataCmd = COPYDATASTRUCT()
copyDataCmd.dwData = self.BSP_GetFileName
copyDataCmd.lpData = ""
copyDataCmd.cbData = 4                
win32gui.SendMessage(self.playerWindowHandler, win32con.WM_COPYDATA, 
                     ownHandler, copyDataCmd);

Obviously .lpData returns “” …

What I am trying to emulate:

cds:TCOPYDATASTRUCT; 
buf:array[0..MAX_PATH-1] of char; 
adr:pointer; // 
adr:=@buf; 
cds.dwData:=BSP_GetFileName; 
cds.lpData:=@adr; 
cds.cbData:=4; 
SendMessage(bsp_hand,WM_COPYDATA,appHWND,lParam(@cds)); 
// available in BSPlayer version 0.84.484+ // 
// appHWND is calling application window handle 
// File name will be copied to buf // 
// Get open file name 
BSP_GetFileName = $1010B;

To be more verbose, I am trying to get the filename from a BSPlayer window. For this I am trying to emulate the code above. I expect a buffer of some sort to be filled with my desired string, but it comes up empty.
So, again, I want the Python equivalent of the code just above.

For example this code was emulated succesfully:

status := SendMessage(bsp_hand,WM_BSP_CMD,BSP_GetStatus,0); 
// available in BSPlayer version 0.84.484+ // 
// Return player status // 0 - STOP // 1 - PAUSE 
// 2 - PLAY // 4 - No movie   open        
BSP_GetStatus = $10102; 

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:27:05+00:00Added an answer on June 14, 2026 at 2:27 am

    You cannot replicate that WM_COPYDATA in your Python code. It can only be used in-proc, for example for plugins.

    The example Delphi code is written under the assumption that the call to WM_COPYDATA is made from the same process as the window which receives the message. That’s because the WM_COPYDATA is used to copy a pointer, and pointers are only valid inside the process which allocated the memory. You cannot send a pointer across a process boundary.

    In my opinion, the designers of the interface are abusing WM_COPYDATA. It is meant to be used to solve the exact problem of transferring data between processes. It is the simplest most lightweight inter-process communication available. To then use it to transfer a pointer rather defeats the process.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying emacs coming from vim. There is only one thing I desperately
currently I'm desperately trying to write german umlauts, read from the console, into a
I am desperately trying to move a document in a document library from one
I'm desperately trying to copy a file to the sdcard from my raw folder,
Desperately trying to enable a widget from functions.php file... When I use it as
I'm (desperately) trying to create a link from one of my controllers. It should
I am desperately trying to make a very simple C# program utilizing clutter (In
I've been trying desperately to kill a child process from the parent. I've tried:
I am desperately trying and failing to hook CallWndProc using EasyHook. Intptr addr =
What I am desperately trying to achieve is to launch my app when the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.