What does HRESULT 0x00040002 (OLE_S_MAC_CLIPFORMAT) mean?

 
Previous Next
OLE_S_STATIC DRAGDROP_S_DROP

OLE_S_MAC_CLIPFORMAT

Legacy Macintosh clipboard format recognized

OLE_S_MAC_CLIPFORMAT is HRESULT 262146 (0x00040002) from winerror.h. The documented description is “Macintosh clipboard format.” The high-order severity bit is clear, so this is a success result, but it carries more information than plain S_OK.

The OLE data-transfer operation succeeded while identifying the data as a Macintosh clipboard format that may require legacy format mapping.

State to verify

The central question is whether the declared clipboard format, byte order, encoding, and storage medium match the converter that will consume the data.

Where the result is encountered

  • This result can appear in cross-platform document import; record the producing interface and method.
  • It can appear in OLE clipboard conversion code; record the producing interface and method.
  • It can appear in archival applications that encounter old Macintosh-originated embedded data; record the producing interface and method.

Evidence to preserve

  • Preserve clipboard format identifier.
  • Preserve FORMATETC fields and tymed value.
  • Preserve source application and platform metadata.
  • Preserve raw data length and a hash before conversion.
  • Preserve the selected conversion routine and resulting format.

Diagnostic sequence

  • Capture the raw HRESULT 0x00040002 immediately after the returning method and record whether the caller used SUCCEEDED, FAILED, equality testing, or exception translation.
  • Verify the method-specific state: the declared clipboard format, byte order, encoding, and storage medium match the converter that will consume the data.

Correct handling, retry, and recovery

Preserve the original bytes and perform format-specific conversion. Do not reinterpret the data as an ordinary Windows clipboard format solely because the HRESULT indicates success.

Practical validation scenario

An import utility reads an old compound document and encounters a Macintosh clipboard presentation. It records the original format, converts into a supported Windows representation, and compares the rendered result with the source preview.

Difference from nearby HRESULT values

OLE_S_STATIC concerns object activity; it concerns the representation and origin of transferred clipboard data.

Developer and administrator guidance

Code handling it should test the exact documented value before a generic SUCCEEDED(hr) branch when outputs or control flow differ. Operational remediation should target the owning COM, media, Tablet PC, or OLE DB component instead of resetting unrelated services.

References


Looking for a different code? Search another status or error code.