SAFEARRAY on linux
问题 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