org.eclipse.actf.util.win32

## Class COPYDATASTRUCT

- java.lang.Object
- - org.eclipse.actf.util.win32.COPYDATASTRUCT

    public class COPYDATASTRUCT
    extends Object

Utility class to send/receive messages with other window

### Field Summary

Fields
`int` `cbData`
`byte[]` `data`
`int` `dwData`
`int` `lpData`
`static int` `sizeof`
`static int` `WM_COPYDATA`

### Constructor Summary

Constructors
Constructor and Description
`COPYDATASTRUCT(int lParam)` Create a COPYDATASTRUCT object using lParam
`COPYDATASTRUCT(int dwData, byte[] data)` Create a COPYDATASTRUCT object using binary data
`COPYDATASTRUCT(int dwData, String strData)` Create a COPYDATASTRUCT object using String data

### Method Summary

Methods
`String` `getStringData()` Retrieve a String data
`int` `sendMessage(int hwndTo, int hwndFrom)` Send a COPYDATASTRUCT object to another window using WM_COPYDATA
`String` `toString()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### WM_COPYDATA

    public static final int WM_COPYDATA

See Also:
  Constant Field Values

#### sizeof

    public static final int sizeof

See Also:
  Constant Field Values

#### dwData

    public int dwData

#### cbData

    public int cbData

#### lpData

    public int lpData

#### data

    public byte[] data

### Constructor Detail

#### COPYDATASTRUCT

    public COPYDATASTRUCT(int dwData,
                  String strData)

Create a COPYDATASTRUCT object using String data

Parameters:
  `dwData` -
  `strData` -

#### COPYDATASTRUCT

    public COPYDATASTRUCT(int dwData,
                  byte[] data)

Create a COPYDATASTRUCT object using binary data

Parameters:
  `dwData` -
  `data` -

#### COPYDATASTRUCT

    public COPYDATASTRUCT(int lParam)

Create a COPYDATASTRUCT object using lParam

Parameters:
  `lParam` -

### Method Detail

#### sendMessage

    public int sendMessage(int hwndTo,
                  int hwndFrom)

Send a COPYDATASTRUCT object to another window using WM_COPYDATA

Parameters:
  `hwndTo` - target window to send data
  `hwndFrom` - send data from this window
Returns:
  result code

#### getStringData

    public String getStringData()

Retrieve a String data

Returns:
  data as new String

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`