Jump to content

DllCall?


 Share

Recommended Posts

Autoit will ignore all characters after the null-terminator, so your second null won't get thru.

Just use two two characters bigger dllstruct and fill it with the original string. Have in mind that binary code will receive passive buffer and not actual CString, so for anything done on it you have to use copy constructor to create real CString that you can work on.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

Have in mind that binary code will receive passive buffer and not actual CString, so for anything done on it you have to use copy constructor to create real CString that you can work on.

I'll have to confess to not knowing what exactly this means.

I'm I to assume that with a struct say "wstr[256]" that the whole thing will get through filled with just 128 char string?

It's quite odd really because I wrapped the function in C/++ myself in a dll, and called it without a problem, but calling directly from AutoIt fails.

So I must assume there is problem with my struct or other code, which I'll post up if I cannot figure out this morning.

Thanks for help folks.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

There is no such thing as wstr[] in AutoIt, probably you meant wchar[].

If you want to pass string in len of 5 characters and want it to be double-null-termninated then create struct in size of 7 characters and fill it with the string. Last two characters will be null-s, because AutoIt zero-out allocated space anyway.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...