libraw_set_exifparser_handler - what is the void *datap parameter

Hi

I'm trying to call libraw_set_exifparser_handler(...) after calling libraw_init()...

However, I can't see what I should pass as the void *datap parameter...

I can't see the answer in the Documentation. It mentions the LibRaw_abstract_datastream in the C++ API but how do I get this in the C API?

BTW, I'm using CodeGear C++ Builder 2007 and can use the basic C API but my attempts to use its LibRaw class always result in a linker error...

Any advice would be appreciated.

Andy

Forums: 

datap is pointer to your

datap is pointer to your datablock (context), for example data table to be filled w/ exif callback.
It is passed to callback as 1st parameter (void *, you'll need to explicitly convert type before use).

Input datastream is passed as last parameter to callback as (void*). You'll need it (so, your callback should be C++ function in that case) if you plan to read tag values. If you want to only collect tags/tag types, you may ignore this last parameter.

Know nothing about CodeGear C++, so could not help with it.

-- Alex Tutubalin @LibRaw LLC

Thanks Alex

Thanks Alex

Unfortunately C++ Builder's C++ name mangling is not compatible with MSVC's. There are nasty ways to get an MSVC class in a DLL to be accessible, but I took the simple way out and extended the LibRaw C API to include the LibRaw_abstract_datastream gets() function, which seems to be all I need.

Andy

Andy

Wouldn't it be easier to

Wouldn't it be easier to recompile LibRaw using your compiler?

-- Alex Tutubalin @LibRaw LLC

Yes - except that there are

Yes - except that there are significant differences between it and MSVC that would probably lead to a lot of pain trying to even get it compile... I did try, but concluded the work involved would be too great, especially if I want to keep it up to date...

For example, its library does not have the _BitScanReverse function and there's nothing I can find on Google that shows someone has implemented it... I could have a go, but there will be other functions as well...

Andy