Reputation: 531
I have used pyinstaller to convert a python.py file to executable one. The executable file works in my computer but crashes in other's computer.I got below error message.
Failed to get ANSI buffer size <WideCharToMultiByte: parameter error
Failed to convert progname to wchar_t
What could possibly be the problem?
Upvotes: 2
Views: 813
Reputation: 2744
On msdn of Microsoft you can find
Caution Using the WideCharToMultiByte function incorrectly can compromise the security of your application. Calling this function can easily cause a buffer overrun because the size of the input buffer indicated by lpWideCharStr equals the number of characters in the Unicode string, while the size of the output buffer indicated by lpMultiByteStr equals the number of bytes. To avoid a buffer overrun, your application must specify a buffer size appropriate for the data type the buffer receives. Data converted from UTF-16 to non-Unicode encodings is subject to data loss, because a code page might not be able to represent every character used in the specific Unicode data.
You might make sure that:
Upvotes: 3