Download Pelles C here: http://www.smorgasbordet.com/pellesc/
#include <stdio.h>
#include <wchar.h>
int main(void)
{
const char* str = "\x41\x00\xa9\x03\x03\x26\x2d\x4e\x3d\xd8\x02\xde";
printf("wcslen(str) = %zu\n", wcslen((wchar_t*)str));
return 0;
}
wcslen(str) = 15
x64wcslen(str) = 9
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <wchar.h>
#pragma comment(lib, "user32.lib")
int main(void)
{
const char* str = "\x41\x00\xa9\x03\x03\x26\x2d\x4e\x3d\xd8\x02\xde";
printf("wcslen(str) = %zu\n", wcslen((wchar_t*)str));
MessageBoxW(0, (wchar_t*)str, L"test", MB_OK);
return 0;
}
QuoteThe windows header files are derived from Pelles C. Pelles C is derived from LCC.
The licensing for Pelles C is that things derived from Pelles C cannot be used commerically.
LCC also doesn't want things to be used commerically, but it has an additional stipulation
that there has to be acknowledgement of use. These header files remain under the Pelles C
and LCC licenses and are not covered by the GNU license that the rest of the runtime library
abides by.
D:\BCX>DllToInc64.exe
Usage : DllToInc64.exe DllFile.dll [optional -u]
Version 1.0
-u : Create include file for UNICODE API functions.
DllToInc64.exe kernel32.dll
Page created in 1.272 seconds with 15 queries.