|
36 | 36 |
|
37 | 37 | #include <windef.h> |
38 | 38 | #include <winbase.h> |
| 39 | +#include <wincon.h> // Console APIs (only if kernel32 support included) |
39 | 40 | #include <winnls.h> |
40 | | -#include <winuser.h> // MAKEINTRESOURCEW, RT_STRING |
41 | | -#include <wincon.h> // Console APIs (only if kernel32 support included) |
42 | 41 | #include <strsafe.h> |
43 | 42 |
|
44 | 43 | /* PSEH for SEH Support */ |
@@ -176,7 +175,7 @@ ConWrite( |
176 | 175 | } |
177 | 176 |
|
178 | 177 | /* Write everything up to \n */ |
179 | | - dwNumBytes = ((PCWCH)p - (PCWCH)szStr) * sizeof(WCHAR); |
| 178 | + dwNumBytes = (DWORD)(((PCWCH)p - (PCWCH)szStr) * sizeof(WCHAR)); |
180 | 179 | WriteFile(Stream->hHandle, szStr, dwNumBytes, &dwNumBytes, NULL); |
181 | 180 |
|
182 | 181 | /* |
@@ -260,7 +259,7 @@ ConWrite( |
260 | 259 | } |
261 | 260 |
|
262 | 261 | /* Write everything up to \n */ |
263 | | - dwNumBytes = ((PCCH)p - (PCCH)szStr) * sizeof(CHAR); |
| 262 | + dwNumBytes = (DWORD)(((PCCH)p - (PCCH)szStr) * sizeof(CHAR)); |
264 | 263 | WriteFile(Stream->hHandle, szStr, dwNumBytes, &dwNumBytes, NULL); |
265 | 264 |
|
266 | 265 | /* |
@@ -430,8 +429,8 @@ ConPuts( |
430 | 429 | { |
431 | 430 | INT Len; |
432 | 431 |
|
433 | | - Len = wcslen(szStr); |
434 | | - CON_STREAM_WRITE2(Stream, szStr, Len, Len); |
| 432 | + Len = (INT)wcslen(szStr); |
| 433 | + CON_STREAM_WRITE2(Stream, szStr, (DWORD)Len, Len); |
435 | 434 |
|
436 | 435 | /* Fixup returned length in case of errors */ |
437 | 436 | if (Len < 0) |
@@ -611,8 +610,8 @@ ConResPuts( |
611 | 610 | IN PCON_STREAM Stream, |
612 | 611 | IN UINT uID) |
613 | 612 | { |
614 | | - return ConResPutsEx(Stream, NULL /*GetModuleHandleW(NULL)*/, |
615 | | - uID, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)); |
| 613 | + return ConResPutsEx(Stream, NULL, uID, |
| 614 | + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)); |
616 | 615 | } |
617 | 616 |
|
618 | 617 | /** |
@@ -697,9 +696,8 @@ ConResPrintfV( |
697 | 696 | IN UINT uID, |
698 | 697 | IN va_list args) |
699 | 698 | { |
700 | | - return ConResPrintfExV(Stream, NULL /*GetModuleHandleW(NULL)*/, |
701 | | - uID, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), |
702 | | - args); |
| 699 | + return ConResPrintfExV(Stream, NULL, uID, |
| 700 | + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), args); |
703 | 701 | } |
704 | 702 |
|
705 | 703 | /** |
@@ -1332,8 +1330,7 @@ ConResMsgPrintfV( |
1332 | 1330 | IN UINT uID, |
1333 | 1331 | IN va_list *Arguments OPTIONAL) |
1334 | 1332 | { |
1335 | | - return ConResMsgPrintfExV(Stream, NULL /*GetModuleHandleW(NULL)*/, |
1336 | | - dwFlags, uID, |
| 1333 | + return ConResMsgPrintfExV(Stream, NULL, dwFlags, uID, |
1337 | 1334 | MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), |
1338 | 1335 | Arguments); |
1339 | 1336 | } |
|
0 commit comments