My guess would be a buffer overflow or similar issue, you are passing a string to your DLL that it is suposed to modify, but you are not telling it how long the string is.
Is there any documentation stateing how long the of a string it expects?
Having played around with some Windows system API calls in perl I've found that some will crash if the string passed to them is either too long or too small, you need to find what range you can pass in that is safe. Given that your passing a 1K buffer I'd guess your on the large size. How long is the expected result string? I'd guess that size times about 2 or 3 should be good, but if there is any documentation to lead you in the right direction that that over my wild guess work.
disclaimer: I doubt my advice will cause any problems, but were talking about calles into C, especaly calls modifing stings, any thing can happen, don't hold me responsible if any advice causes your computer to spontaniously explode or other catestrophic results.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.