Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: How to use 'unsigned char' C data type with Win32::API (&255)

by sam_bakki (Pilgrim)
on Mar 13, 2012 at 10:46 UTC ( #959288=note: print w/replies, xml ) Need Help??


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 :(

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://959288]
help
Chatterbox?
Discipulus shall be damned all progs that do not provide different font size!

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2017-09-26 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (293 votes). Check out past polls.

    Notices?