mirror of https://github.com/x64dbg/TitanEngine
compile on vs2010 + remove over-allocation
This commit is contained in:
parent
0f5566b1db
commit
5d1e43bb69
|
|
@ -217,7 +217,7 @@ __declspec(dllexport) void* TITCALL InitNativeDebugW(wchar_t* szFileName, wchar_
|
|||
// Convert command line and directory to UNICODE_STRING if present
|
||||
SIZE_T ArgumentsLength = szCommandLine != NULL ? lstrlenW(szCommandLine) : 0;
|
||||
SIZE_T BufferSize = ImagePath.Length + ((ArgumentsLength + 4) * sizeof(wchar_t));
|
||||
CommandLine.Buffer = (PWSTR)RtlAllocateHeap(RtlProcessHeap(), HEAP_ZERO_MEMORY, BufferSize * 10);
|
||||
CommandLine.Buffer = (PWSTR)RtlAllocateHeap(RtlProcessHeap(), HEAP_ZERO_MEMORY, BufferSize);
|
||||
CommandLine.MaximumLength = (USHORT)BufferSize;
|
||||
RtlAppendUnicodeToString(&CommandLine, L"\"");
|
||||
RtlAppendUnicodeStringToString(&CommandLine, &ImagePath);
|
||||
|
|
|
|||
|
|
@ -33,6 +33,22 @@
|
|||
#include <time.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef _Out_writes_opt_
|
||||
#define _Out_writes_opt_(x)
|
||||
#endif
|
||||
|
||||
#ifndef _In_reads_
|
||||
#define _In_reads_(x)
|
||||
#endif
|
||||
|
||||
#ifndef _Inout_updates_bytes_
|
||||
#define _Inout_updates_bytes_(x)
|
||||
#endif
|
||||
|
||||
#ifndef _Out_writes_bytes_opt_
|
||||
#define _Out_writes_bytes_opt_(X)
|
||||
#endif
|
||||
|
||||
//#include <winternl.h>
|
||||
#include "ntdll.h"
|
||||
#include "aplib.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue