IDiscRecorder2Ex::GetByteAlignmentMask method (imapi2.h)
Retrieves the byte alignment mask for the device.
Syntax
HRESULT GetByteAlignmentMask(
[out] ULONG *value
);
Parameters
[out] value
Byte alignment mask that you use to determine if the buffer is aligned to the correct byte boundary for the device. The byte alignment value is always a number that is a power of 2.
Return value
S_OK is returned on success, but other success codes may be returned as a result of implementation. The following error codes are commonly returned on operation failure, but do not represent the only possible error values:
Return code | Description |
---|---|
|
Pointer is not valid.
Value: 0x80004003 |
|
Unspecified failure.
Value: 0x80004005 |
Remarks
The data buffer for IDiscRecorder2Ex::SendCommandSendDataToDevice and IDiscRecorder2Ex::SendCommandGetDataFromDevice must aligned to the correct byte boundary. To determine if the buffer is on the correct byte boundary, perform a bitwise logical AND of the bitmask with the address of the data buffer. For example, if the address of the buffer is 0x3840958, you can test for correct alignment using the following statement:
if (0x3840958 & (value - 1) == 0)
{
// The alignment is correct
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista, Windows XP with SP2 [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | imapi2.h |
See also
IDiscRecorder2Ex::SendCommandGetDataFromDevice