MmSetAddressProtect?

This commit is contained in:
Aaron Robinson 2003-10-31 04:16:15 +00:00
parent 5fb01818bf
commit a727dc3bf5
3 changed files with 7 additions and 5 deletions

BIN
Cxbx.opt

Binary file not shown.

View File

@ -1,5 +1,5 @@
# Microsoft Developer Studio Project File - Name="CxbxKrnl" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 60000
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 ws2_32.lib dsound.lib winmm.lib ddraw.lib d3d8.lib dinput8.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /map /machine:I386 /out:"Bin/Cxbx.dll" /libpath:"Lib"
# ADD LINK32 ws2_32.lib dsound.lib winmm.lib ddraw.lib d3dx8.lib d3d8.lib dinput8.lib dxguid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /map /machine:I386 /out:"Bin/Cxbx.dll" /libpath:"Lib"
# SUBTRACT LINK32 /profile /pdb:none /debug
!ELSEIF "$(CFG)" == "CxbxKrnl - Win32 Debug"

View File

@ -965,14 +965,16 @@ XBSYSAPI EXPORTNUM(182) VOID NTAPI xboxkrnl::MmSetAddressProtect
"(\n"
" BaseAddress : 0x%.08X\n"
" NumberOfBytes : 0x%.08X\n"
" Persist : 0x%.08X\n"
" NewProtect : 0x%.08X\n"
");\n",
GetCurrentThreadId(), BaseAddress, NumberOfBytes, NewProtect);
}
#endif
// TODO: Actually set protection
EmuWarning("MmSetAddressProtect is being ignored");
DWORD dwOldProtect;
if(!VirtualProtect(BaseAddress, NumberOfBytes, NewProtect & (~PAGE_WRITECOMBINE), &dwOldProtect))
EmuWarning("VirtualProtect Failed!");
EmuSwapFS(); // Xbox FS