Fix build on MSVC

develop
Petr Mrázek 2011-02-24 01:32:15 +01:00
parent d26f9ee4a4
commit 79b78673e5
3 changed files with 5 additions and 19 deletions

@ -307,21 +307,8 @@ bool SHMProcess::getThreadIDs(vector<uint32_t> & threads )
//FIXME: use VirtualQuery to probe for memory ranges, cross-reference with base-corrected PE segment entries
void SHMProcess::getMemRanges( vector<t_memrange> & ranges )
{
// code here is taken from hexsearch by Silas Dunmore.
// As this IMHO isn't a 'sunstantial portion' of anything, I'm not including the MIT license here
// I'm faking this, because there's no way I'm using VirtualQuery
t_memrange temp;
uint32_t base = d->memdescriptor->getBase();
temp.start = base + 0x1000; // more fakery.
temp.end = base + Process::readDWord(base+readDWord(base+0x3C)+0x50)-1; // yay for magic.
temp.read = 1;
temp.write = 1;
temp.execute = 0; // fake
temp.valid = true;
strcpy(temp.name,"pants");
ranges.push_back(temp);
// BLAH
ranges.clear();
}
bool SHMProcess::acquireSuspendLock()

@ -22,7 +22,6 @@ must not be misrepresented as being the original software.
distribution.
*/
#include "Internal.h"
#include "WindowsProcess.h"
#include "ProcessFactory.h"
#include "MicrosoftSTL.h"
#include "dfhack/VersionInfo.h"
@ -225,7 +224,6 @@ NormalProcess::~NormalProcess()
}
if(sections != NULL)
free(sections);
delete d;
}
VersionInfo * NormalProcess::getDescriptor()
@ -558,7 +556,7 @@ const string NormalProcess::readSTLString (uint32_t offset)
string NormalProcess::readClassName (uint32_t vptr)
{
stl.readClassName(vptr);
return stl.readClassName(vptr);
}
string NormalProcess::getPath()

@ -26,6 +26,7 @@ distribution.
#define SHM_PROCESS_H_INCLUDED
#include "dfhack/DFProcess.h"
#include "dfhack/DFIntegers.h"
namespace DFHack
{
@ -113,7 +114,7 @@ namespace DFHack
int client_lock;
int suspend_lock;
#else
typedef unit32_t pid_t;
typedef uint32_t pid_t;
uint32_t process_ID;
HANDLE DFSVMutex;
HANDLE DFCLMutex;