Just a guess: the difference in length is probably from VB forcing it to Unicode; so it's adding buffer space in case there are double-byte characters in the text.
As for getting > 64k from WM_GETTEXT, I don't think it's possible. Isn't wparam defined as a uint (the actual API, I mean; not whatever it is in your declaration...)? 65535 should be the highest value you can give it. MSDN mentions getting > 64k back from Rich Edit Control using the EM_STREAMOUT message, but I don't think there's anything you can do for a TextBox.
|