Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WM_COPYDATA example (access application outside application)
#2
Look in MSDN.
wParam must be sender window handle or 0.
lParam must be &cds.
cds.cbData must be specified. It is length of string, probably +1.

Macro Macro2104
Code:
Copy      Help
int hwnd=win("XYplorer")
if(!hwnd)    
,ret

str s="/script=''f:\__windows_folders\_user\desk\test.xys''"

COPYDATASTRUCT cds
cds.dwData=4194305
cds.lpData=s
cds.cbData=s.len+1

SendMessage(hwnd WM_COPYDATA 0 &cds)

Maybe the string must be Unicode UTF-16.
Macro Macro2104
Code:
Copy      Help
int hwnd=win("XYplorer")
if(!hwnd)    
,ret

BSTR b="/script=''f:\__windows_folders\_user\desk\test.xys''"

COPYDATASTRUCT cds
cds.dwData=4194305
cds.lpData=b.pstr
cds.cbData=b.len*2+2

SendMessage(hwnd WM_COPYDATA 0 &cds)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)