typedef struct _OLETARGETDEVICE { /* otd */
UINT otdDeviceNameOffset;
UINT otdDriverNameOffset;
UINT otdPortNameOffset;
UINT otdExtDevmodeOffset;
UINT otdExtDevmodeSize;
UINT otdEnvironmentOffset;
UINT otdEnvironmentSize;
BYTE otdData[1];
} OLETARGETDEVICE;
The OLETARGETDEVICE structure contains information about the target device that a client application is using. Server applications can use the information in this structure to change the rendering of an object, if necessary. A client application provides a handle to this structure in a call to the OleSetTargetDevice function.
otdDeviceNameOffset
Specifies the offset from the beginning of the array to the name of the device.
otdDriverNameOffset
Specifies the offset from the beginning of the array to the name of the device driver.
otdPortNameOffset
Specifies the offset from the beginning of the array to the name of the port.
otdExtDevmodeOffset
Specifies the offset from the beginning of the array to a DEVMODE structure retrieved by the ExtDeviceMode function.
otdExtDevmodeSize
Specifies the size of the DEVMODE structure whose offset is specified by the otdExtDevmodeOffset member.
otdEnvironmentOffset
Specifies the offset from the beginning of the array to the device environment.
otdEnvironmentSize
Specifies the size of the environment whose offset is specified by the otdEnvironmentOffset member.
otdData
Specifies an array of bytes containing data for the target device.
The otdDeviceNameOffset, otdDriverNameOffset, and otdPortNameOffset members should be NULL-terminated.
In Win32, the ability to connect multiple printers to one port has made the environment obsolete. The environment information retrieved by the GetEnvironment function can occasionally be incorrect. To ensure that the OLETARGETDEVICE structure is initialized correctly, the application should copy information from the DEVMODE structure retrieved by a call to the ExtDeviceMode function to the environment position of the OLETARGETDEVICE structure.
OleSetTargetDevice