in reply to Re^3: How to use 'unsigned char' C data type with Win32::API (&255)
in thread Solved: How to use 'unsigned char' C data type with Win32::API
Hi tye
I suppose to get like below C code's API call.
# C Code # printf ("\n \n DEV: %d , %c , %x ", i2cGetDeviceAddress(),i2cGetDevi +ceAddress(),i2cGetDeviceAddress()); # # Output: DEV: 70 , F , 46
I used following code get rid of un initialized bytes
$ret = unpack ('C',pack ('i*',$ret)); #This gives 152 but this is not +i want :(
|
---|
In Section
Seekers of Perl Wisdom