Skip to content

Commit

Permalink
Merge branch 'master' into entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNNX authored Apr 14, 2024
2 parents 0d548e2 + df55bb7 commit ce77d06
Show file tree
Hide file tree
Showing 7 changed files with 421 additions and 1 deletion.
1 change: 1 addition & 0 deletions COREDLL/COREDLL.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="stdafx.h" />
<ClInclude Include="stdio_wcecl.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="winuser_wcecl.h" />
</ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions COREDLL/COREDLL.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<ClInclude Include="winuser_wcecl.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="stdio_wcecl.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp">
Expand Down
8 changes: 7 additions & 1 deletion COREDLL/other.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,13 @@ void CeLogSetZones(DWORD dwZoneUser, // User-defined zones

void* _fileno_WCECL(FILE* file)
{
/* https://stackoverflow.com/a/3989842 */
void* result = WceclTryGetOrAllocStdHandle(file);
if (result != NULL)
{
return result;
}

/* https://stackoverflow.com/a/3989842 */
return (void*)_get_osfhandle(_fileno(file));
}

Expand Down
2 changes: 2 additions & 0 deletions COREDLL/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,5 @@ BOOL ProgramErrorDialog(LPCWSTR Text, BOOL YesNo);
VOID DisplayAssert32ErrorDialog(LPCWSTR ExpressionText, LPCWSTR Comment, BOOL ShowLastError);
DWORD GetBaseAddress(HANDLE pHandle);
HMODULE GetModule(HANDLE pHandle);

#include "stdio_wcecl.h"
Loading

0 comments on commit ce77d06

Please sign in to comment.