5 WCHAR wbuffer[MAX_PATH];
7 WIN32_FIND_DATAW wdata;
9 if (!MultiByteToWideChar(CP_ACP, 0, path, -1, wbuffer, MAX_PATH)) {
10 return INVALID_HANDLE_VALUE;
13 ret = FindFirstFileW(wbuffer, &wdata);
14 if (ret != INVALID_HANDLE_VALUE) {
15 memcpy(data, &wdata, FIELD_OFFSET(WIN32_FIND_DATAA, cFileName));
16 WideCharToMultiByte(CP_ACP, 0, wdata.cFileName, -1, data->cFileName, MAX_PATH, NULL, NULL);
25 WIN32_FIND_DATAW wdata;
27 ret = FindNextFileW(
handle, &wdata);
29 memcpy(data, &wdata, FIELD_OFFSET(WIN32_FIND_DATAA, cFileName));
30 WideCharToMultiByte(CP_ACP, 0, wdata.cFileName, -1, data->cFileName, MAX_PATH, NULL, NULL);
38 WCHAR wbuffer[MAX_PATH];
40 if (!MultiByteToWideChar(CP_ACP, 0, path, -1, wbuffer, MAX_PATH)) {
44 return LoadLibraryW(wbuffer);
52 if (!MultiByteToWideChar(CP_ACP, 0, lpText, -1, wText, 4096)) {
55 if (!MultiByteToWideChar(CP_ACP, 0, lpCaption, -1, wCaption, 256)) {
59 return MessageBoxW(hWnd, wText, wCaption, uType);
64 WCHAR wbuffer[MAX_PATH];
66 if (!MultiByteToWideChar(CP_ACP, 0, lpPathName, -1, wbuffer, MAX_PATH)) {
70 return CreateDirectoryW(wbuffer, lpSecurityAttributes);
75 WCHAR wbuffer[MAX_PATH];
77 if (!MultiByteToWideChar(CP_ACP, 0, lpFileName, -1, wbuffer, MAX_PATH)) {
81 return GetFileAttributesExW(wbuffer, fInfoLevelId, lpFileInformation);
86 WCHAR wbuffer[MAX_PATH];
89 if (nSize > MAX_PATH) {
93 ret = GetModuleFileNameW(hModule, wbuffer, nSize);
95 if (!WideCharToMultiByte(CP_ACP, 0, wbuffer, ret, lpFileName, ret, NULL, NULL)) {