If ABC::ptr is a pointer, and is public you can pass it like:
1 2 3 4 5
trans.set_data_ptr((unsignedchar*)(abc.ptr));
// or to make the cast more obvious
trans.set_data_ptr(reinterpret_cast<unsignedchar *> (abc.ptr));
Note that this is probably not "passing by reference".
It is probably passing by value, even if it's a pointer being passed.
I don't see the code for set_data_ptr() to know for sure.