_title = stringBuffer.getString(0, true);
}
if (userParams.Environment != null)
{
// get size of environment strings
MEMORY_BASIC_INFORMATION memInfo = new MEMORY_BASIC_INFORMATION();
int memInfoSize = memInfo.size(); //x64 = 48, x32 = 28
int bytesRead = MyKernel32.INSTANCE.VirtualQueryEx(hProcess.getPointer(), userParams.Environment, memInfo.getPointer(),
memInfoSize);
memInfo.read();
if (bytesRead == 0)
{
_logger.warning("error getting environment in VirtualQueryEx " + Native.getLastError());
}
else if (MyKernel32.PAGE_NOACCESS == memInfo.Protect || MyKernel32.PAGE_EXECUTE == memInfo.Protect)