Skip to content

Commit ce77d06

Browse files
authored
Merge branch 'master' into entrypoint
2 parents 0d548e2 + df55bb7 commit ce77d06

7 files changed

+421
-1
lines changed

COREDLL/COREDLL.vcxproj

+1
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@
240240
</ItemDefinitionGroup>
241241
<ItemGroup>
242242
<ClInclude Include="stdafx.h" />
243+
<ClInclude Include="stdio_wcecl.h" />
243244
<ClInclude Include="targetver.h" />
244245
<ClInclude Include="winuser_wcecl.h" />
245246
</ItemGroup>

COREDLL/COREDLL.vcxproj.filters

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
<ClInclude Include="winuser_wcecl.h">
2525
<Filter>Header Files</Filter>
2626
</ClInclude>
27+
<ClInclude Include="stdio_wcecl.h">
28+
<Filter>Header Files</Filter>
29+
</ClInclude>
2730
</ItemGroup>
2831
<ItemGroup>
2932
<ClCompile Include="dllmain.cpp">

COREDLL/other.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,13 @@ void CeLogSetZones(DWORD dwZoneUser, // User-defined zones
196196

197197
void* _fileno_WCECL(FILE* file)
198198
{
199-
/* https://stackoverflow.com/a/3989842 */
199+
void* result = WceclTryGetOrAllocStdHandle(file);
200+
if (result != NULL)
201+
{
202+
return result;
203+
}
204+
205+
/* https://stackoverflow.com/a/3989842 */
200206
return (void*)_get_osfhandle(_fileno(file));
201207
}
202208

COREDLL/stdafx.h

+2
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,5 @@ BOOL ProgramErrorDialog(LPCWSTR Text, BOOL YesNo);
8585
VOID DisplayAssert32ErrorDialog(LPCWSTR ExpressionText, LPCWSTR Comment, BOOL ShowLastError);
8686
DWORD GetBaseAddress(HANDLE pHandle);
8787
HMODULE GetModule(HANDLE pHandle);
88+
89+
#include "stdio_wcecl.h"

0 commit comments

Comments
 (0)