¡@

Home 

c++ Programming Glossary: getcurrentprocess

Programmatically compute the start time of a process on Windows

http://stackoverflow.com/questions/1180984/programmatically-compute-the-start-time-of-a-process-on-windows

you're interested in is the current process you can use GetCurrentProcess to get the process handle that you'll need to call GetProcessTimes..

Is there any way to force the WorkingSet of a process to be 1GB in C++?

http://stackoverflow.com/questions/12228321/is-there-any-way-to-force-the-workingset-of-a-process-to-be-1gb-in-c

100 int errorCode SetProcessWorkingSetSizeEx GetCurrentProcess workingSetSizeMB 1 1024 1024 dwMinimumWorkingSetSize workingSetSizeMB..

How to get list of GDI handles

http://stackoverflow.com/questions/13905661/how-to-get-list-of-gdi-handles

this process is running on WOW64 BOOL wow IsWow64Process GetCurrentProcess wow read basic info to get PEB address we only need the beginning..

Making a HANDLE RAII-compliant using shared_ptr with a custom deleter

http://stackoverflow.com/questions/1562421/making-a-handle-raii-compliant-using-shared-ptr-with-a-custom-deleter

is a PHANDLE . medium ugly with the cast. OpenProcessToken GetCurrentProcess TOKEN_ADJUST_PRIVILEGES TOKEN_QUERY PHANDLE h Example 3 Process32First..

How can I measure CPU time and wall clock time on both Linux/Windows?

http://stackoverflow.com/questions/17432502/how-can-i-measure-cpu-time-and-wall-clock-time-on-both-linux-windows

double get_cpu_time FILETIME a b c d if GetProcessTimes GetCurrentProcess a b c d 0 Returns total user time. Can be tweaked to include..

Correct way to check if Windows is 64 bit or not, on runtime? (C++)

http://stackoverflow.com/questions/2140619/correct-way-to-check-if-windows-is-64-bit-or-not-on-runtime-c

Windows so must sniff BOOL f64 FALSE return IsWow64Process GetCurrentProcess f64 f64 #else return FALSE Win64 does not support Win16 #endif..

How to get memory usage under Windows in C++

http://stackoverflow.com/questions/282194/how-to-get-memory-usage-under-windows-in-c

memory info about the specified process. You can pass GetCurrentProcess as the process handle in order to get information about the..

Windows Vista/Win7 Privilege Problem: SeDebugPrivilege & OpenProcess

http://stackoverflow.com/questions/2932461/windows-vista-win7-privilege-problem-sedebugprivilege-openprocess

tokenPriv LUID luidDebug if OpenProcessToken GetCurrentProcess TOKEN_ADJUST_PRIVILEGES hToken FALSE if LookupPrivilegeValue..

Sharing memory between modules

http://stackoverflow.com/questions/4616148/sharing-memory-between-modules

GetProcAddress HeapAlloc and HeapFree GetProcessHeap and GetCurrentProcess . Everything considered I think I would stick to putting the..

C++ — how to write a sample code that will crash and produce dump file?

http://stackoverflow.com/questions/5028781/c-how-to-write-a-sample-code-that-will-crash-and-produce-dump-file

FALSE auto dumped pMiniDumpWriteDump GetCurrentProcess GetCurrentProcessId hFile MINIDUMP_TYPE MiniDumpWithIndirectlyReferencedMemory.. FALSE auto dumped pMiniDumpWriteDump GetCurrentProcess GetCurrentProcessId hFile MINIDUMP_TYPE MiniDumpWithIndirectlyReferencedMemory..

How to determine a process “virtual size” (WinXP)?

http://stackoverflow.com/questions/548819/how-to-determine-a-process-virtual-size-winxp

pmcx pmcx.cb sizeof pmcx GetProcessMemoryInfo GetCurrentProcess reinterpret_cast PROCESS_MEMORY_COUNTERS pmcx pmcx.cb Now pmcx.PrivateUsage..

How to Log Stack Frames with Windows x64

http://stackoverflow.com/questions/590160/how-to-log-stack-frames-with-windows-x64

IMAGE_FILE_MACHINE_AMD64 __in DWORD MachineType GetCurrentProcess __in HANDLE hProcess GetCurrentThread __in HANDLE hThread .. IMAGE_FILE_MACHINE_AMD64 __in DWORD MachineType GetCurrentProcess __in HANDLE hProcess GetCurrentThread __in HANDLE hThread..

Prevent user process from being killed with “End Process” from Process Explorer

http://stackoverflow.com/questions/6185975/prevent-user-process-from-being-killed-with-end-process-from-process-explorer

in code static const bool ProtectProcess HANDLE hProcess GetCurrentProcess EXPLICIT_ACCESS denyAccess 0 DWORD dwAccessPermissions GENERIC_WRITE..

How to determine CPU and memory consumption from inside a process?

http://stackoverflow.com/questions/63166/how-to-determine-cpu-and-memory-consumption-from-inside-a-process

PROCESS_MEMORY_COUNTERS_EX pmc GetProcessMemoryInfo GetCurrentProcess &pmc sizeof pmc SIZE_T virtualMemUsedByMe pmc.PrivateUsage Total.. &ftime memcpy &lastCPU &ftime sizeof FILETIME self GetCurrentProcess GetProcessTimes self &ftime &ftime &fsys &fuser memcpy &lastSysCPU..

How can I get a process handle by its name in C++?

http://stackoverflow.com/questions/865152/how-can-i-get-a-process-handle-by-its-name-in-c

hToken LUID luid TOKEN_PRIVILEGES tkp OpenProcessToken GetCurrentProcess TOKEN_ADJUST_PRIVILEGES TOKEN_QUERY hToken LookupPrivilegeValue..

How can I hook Windows functions in C/C++?

http://stackoverflow.com/questions/873658/how-can-i-hook-windows-functions-in-c-c

hToken LUID luid TOKEN_PRIVILEGES tkp OpenProcessToken GetCurrentProcess TOKEN_ADJUST_PRIVILEGES TOKEN_QUERY hToken LookupPrivilegeValue..

Delphi problems converting VirtualProtect EAT hook routines from C to Delphi

http://stackoverflow.com/questions/9484319/delphi-problems-converting-virtualprotect-eat-hook-routines-from-c-to-delphi

HMODULE hModule DWORD sizeNeeded if 0 EnumProcessModules GetCurrentProcess hModule sizeof hModule sizeNeeded MessageBox 0 EnumProcessModules..