I'm using a proprietary library on linux that uses SAFEARRAY type in a callback function:
HRESULT Write(SAFEARRAY *Data)
SAFEARRAY is defined in a header file as typedef void SAFEARRAY.
I must define a callback function that will get the data (eg. as *unsigned char) and it's length (eg. as int or size_t) and write the data somewhere.
Something like:
HRESULT MyWrite(SAFEARRAY *Data) {
  unsigned char *data = SafeArrayGetData(Data);
  size_t length = SafeArrayGetLength(Data);
  write_data_somewhere(data, length);
}
And then use it with the library:
ProprietaryLib::ExportThing(thing, MyWrite);
So my question is: How to get the data and it's length on linux, where I have no oaidl.h or oleauto.h header file.