W
wenmang
Hi,
I have a third party function that has a following signature:
function(char * memoryBuffer, long bufferSize);
I want to following Base64::decode() from Apache's XML C++ APIs:
XMLByte* Base64::decode ( const XMLByte *const inputData,
unsigned int * outputLength,
MemoryManager *const memMgr = 0
)
The problem is that the decode() returns a diff type XMLByte* defined
as unsinged char and an unsigned int for outputLength in decode()
above, those two values that I like to past them to the the third
party function, but cannot pass C++ compiler due to the mismatched
data types if I use static_cast.
I hate to directly cast them to char* from XMLByte and unsigned int to
long using C type casting, what is the best portable way to resolve
this?
Thanks.
I have a third party function that has a following signature:
function(char * memoryBuffer, long bufferSize);
I want to following Base64::decode() from Apache's XML C++ APIs:
XMLByte* Base64::decode ( const XMLByte *const inputData,
unsigned int * outputLength,
MemoryManager *const memMgr = 0
)
The problem is that the decode() returns a diff type XMLByte* defined
as unsinged char and an unsigned int for outputLength in decode()
above, those two values that I like to past them to the the third
party function, but cannot pass C++ compiler due to the mismatched
data types if I use static_cast.
I hate to directly cast them to char* from XMLByte and unsigned int to
long using C type casting, what is the best portable way to resolve
this?
Thanks.