Show / Hide Table of Contents

Struct WndCopyData

Send/receive data to/from other process using message WM_COPYDATA.

public struct WndCopyData
Remarks

This struct is COPYDATASTRUCT.

note

By default UAC blocks messages sent from processes of lower integrity level. Call WndCopyData.EnableReceivingWM_COPYDATA if need.


Namespace: Au.More
Assembly: Au.dll

Constructors

Name Description
WndCopyData(nint)

Initializes this variable from lParam of a received WM_COPYDATA message. Then you can call functions of this variable to get data in managed format.

Properties

Name Description
DataId

Data id. It is COPYDATASTRUCT.dwData.

RawData

Unmanaged data pointer. It is COPYDATASTRUCT.lpData.

RawDataSize

Unmanaged data size. It is COPYDATASTRUCT.cbData.

Methods

Name Description
EnableReceivingWM_COPYDATA()

Calls API ChangeWindowMessageFilter(WM_COPYDATA). Then windows of this process can receive this message from lower UAC integrity level processes.

GetBytes()

Gets received data as byte[].

GetString()

Gets received data as string.

Return(void*, int, nint)

Returns data to WndCopyData.SendReceive<TSend, TReceive>.

Return<T>(ReadOnlySpan<T>, nint)

Returns string or other data to WndCopyData.SendReceive<TSend, TReceive>.

SendReceive<TSend>(wnd, int, ReadOnlySpan<TSend>, out byte[])

Calls SendReceive<TSend, TReceive>(wnd, int, ReadOnlySpan<TSend>, ResultReader<TReceive>) and gets the received data as byte[].

SendReceive<TSend>(wnd, int, ReadOnlySpan<TSend>, out string)

Calls SendReceive<TSend, TReceive>(wnd, int, ReadOnlySpan<TSend>, ResultReader<TReceive>) and gets the received string.

SendReceive<TSend, TReceive>(wnd, int, ReadOnlySpan<TSend>, ResultReader<TReceive>)

Sends string or other data to a window of any process. Uses API SendMessageWM_COPYDATA. Receives string or other data returned by that window with WndCopyData.Return.

Send<T>(wnd, int, ReadOnlySpan<T>, nint)

Sends string or other data to a window of any process. Uses API SendMessageWM_COPYDATA.

See Also

System.IO.MemoryMappedFiles.MemoryMappedFile
System.IO.Pipes.NamedPipeServerStream