VB   发布时间:2022-04-03  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了An application sends the WM_COPYDATA message to pass data to another application大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

对于只是在有VB,VC开发两个应用程序中传递数组如此简单的数据,没必要用什么DLL,内存映射之类的大刀吧

WM_COPYDATA message

--------------------------------------------------------------------------------

An application sends the WM_COPYDATA message to pass data to another application.

Syntax


To send this message,call the Sendmessage function as follows.
lResult = Sendmessage( // returns LRESULT in lResult (HWND) hWndControl,// handle to desTination control (Uint) WM_COPYDATA,// message ID (WPARAM) wParam,// = (WPARAM) () wParam; (LPARAM) lParam // = (LPARAM) () lParam; );
Parameters

wParam
Handle to the window passing the data.
lParam
Pointer to a COPYDATASTRUCT structure that contains the data to be passed.
Return Value

If the receiving application processes this message,it should return TRUE; otherwise,it should return falSE.


The COPYDATASTRUCT structure contains data to be passed to another application by the WM_COPYDATA message.

Syntax

typedef struct tagCOPYDATASTRUCT {
ULONG_PTR dwData;
DWORD cbData;
PVOID lPDAta;
} COPYDATASTRUCT,*PCOPYDATASTRUCT; @H_908_1@members

dwData
Specifies data to be passed to the receiving application.
cbData
Specifies the size,in bytes,of the data pointed to by the lPDAta member.
lPDAta
Pointer to data to be passed to the receiving application. This member can be NULl.

转来的,还没经过测试呢,如果有问题概不负责!!!

大佬总结

以上是大佬教程为你收集整理的An application sends the WM_COPYDATA message to pass data to another application全部内容,希望文章能够帮你解决An application sends the WM_COPYDATA message to pass data to another application所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。