Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I didn't look in detail (I suspect the relevant details could be buried quite deep), but it looks likely to be a bug in Win32::API to me.

Even if not a bug in Win32::API, it looks like an uninitialized four-byte value is having only some of its bytes overwritten. So why not just work around it and pull out only the byte you care about?

$ret &= 0xFF;

Though, the return values you show actually show the lowest two bytes being consistently 0x7298, which seems rather unlikely.

printf "%d 0x%x\n", $_, $_ for 53113496, 52195992, 52851352, 52458136, 51540632 53113496 0x32a7298 52195992 0x31c7298 52851352 0x3267298 52458136 0x3207298 51540632 0x3127298

...So it could easily be neither of the things I guessed. Is 0x98 (152) the value you are expecting to get?

- tye        


In reply to Re^3: How to use 'unsigned char' C data type with Win32::API (&255) by tye
in thread Solved: How to use 'unsigned char' C data type with Win32::API by sam_bakki

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-24 22:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found