Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

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

Wow..! That's quite a bit of research :). Those are exactly my reference documents.

Yes, I am setting the value of the KSENT_TXInit as per the document (and getting an "all OK" return from the call) before calling the KSENT_TX function

I wasn't so sure of the description in the document regarding the length of the information to be sent and hence contacted the developer of the DLL who replied saying that "the *data is a pointer to an array of unsigned chars were each char is a SENT nibble"

So i tried quite a few possibilities in addition to the one mentioned in the original query

passing only the 3 nibbles as 3 unsigned chars  my $data_ref = pack ('U0C*', 0x01,0x05,0x05);

and passing the 3 nibbles in 2 octets

 my $data_ref = pack ('U0C*', 0x01,0x55);

and passing all the 8 nibbles as 8 unsigned chars

my $data_ref = pack ('U0C*', 0x08,0x01,0x05,0x05,0x00,0x00,0x0E,0x00);

All of it still crashes with the same error. On hindsight, I think the correct windows error would be "Perl interpreter encountered an issue". I will try dumping the details of the failure if it helps further.


In reply to Re^6: How to pass a pointer to an array of 'unsigned char' C data type with Win32::API (debug) by apeks_okad
in thread How to pass a pointer to an array of 'unsigned char' C data type with Win32::API by apeks_okad

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 about the Monastery: (1)
As of 2024-04-24 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found