Click here to Skip to main content
15,896,269 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: encrypt and decrypt Pin
CPallini19-Nov-12 11:36
mveCPallini19-Nov-12 11:36 
Questionaccess excel data using c++ Pin
lakshmamma19-Nov-12 2:05
lakshmamma19-Nov-12 2:05 
AnswerRe: access excel data using c++ Pin
_Flaviu19-Nov-12 2:14
_Flaviu19-Nov-12 2:14 
AnswerRe: access excel data using c++ Pin
CPallini19-Nov-12 2:17
mveCPallini19-Nov-12 2:17 
AnswerRe: access excel data using c++ Pin
Jochen Arndt19-Nov-12 2:26
professionalJochen Arndt19-Nov-12 2:26 
QuestionScroll window after zoom Pin
_Flaviu18-Nov-12 22:11
_Flaviu18-Nov-12 22:11 
AnswerMessage Closed Pin
18-Nov-12 22:18
_Flaviu18-Nov-12 22:18 
QuestionPre commit hooks for svn Pin
Mukul_P18-Nov-12 17:41
Mukul_P18-Nov-12 17:41 
AnswerRe: Pre commit hooks for svn Pin
Richard MacCutchan18-Nov-12 21:42
mveRichard MacCutchan18-Nov-12 21:42 
AnswerRe: Pre commit hooks for svn Pin
April Fans22-Dec-12 21:07
April Fans22-Dec-12 21:07 
QuestionC++, RealTime Scheduler in Operating System Pin
Kevin Stlip17-Nov-12 16:10
Kevin Stlip17-Nov-12 16:10 
AnswerRe: C++, RealTime Scheduler in Operating System Pin
Richard MacCutchan17-Nov-12 21:46
mveRichard MacCutchan17-Nov-12 21:46 
Questionporting my device driver 32 bit to windows 7 64 bit Pin
navn199116-Nov-12 22:03
navn199116-Nov-12 22:03 
AnswerRe: porting my device driver 32 bit to windows 7 64 bit Pin
jschell17-Nov-12 5:52
jschell17-Nov-12 5:52 
GeneralRe: porting my device driver 32 bit to windows 7 64 bit Pin
WebMaster23-Nov-12 4:50
WebMaster23-Nov-12 4:50 
AnswerRe: porting my device driver 32 bit to windows 7 64 bit Pin
Software_Developer17-Nov-12 5:52
Software_Developer17-Nov-12 5:52 
GeneralRe: porting my device driver 32 bit to windows 7 64 bit Pin
navn199118-Nov-12 21:54
navn199118-Nov-12 21:54 
GeneralRe: porting my device driver 32 bit to windows 7 64 bit Pin
Software_Developer19-Nov-12 0:15
Software_Developer19-Nov-12 0:15 
GeneralRe: porting my device driver 32 bit to windows 7 64 bit Pin
navn199121-Nov-12 2:40
navn199121-Nov-12 2:40 
GeneralRe: porting my device driver 32 bit to windows 7 64 bit Pin
WebMaster23-Nov-12 4:51
WebMaster23-Nov-12 4:51 
AnswerRe: porting my device driver 32 bit to windows 7 64 bit Pin
WebMaster23-Nov-12 4:50
WebMaster23-Nov-12 4:50 
QuestionMemory usage Pin
john563215-Nov-12 21:48
john563215-Nov-12 21:48 
AnswerRe: Memory usage Pin
Orjan Westin15-Nov-12 23:23
professionalOrjan Westin15-Nov-12 23:23 
AnswerRe: Memory usage Pin
David Crow16-Nov-12 2:27
David Crow16-Nov-12 2:27 
AnswerRe: Memory usage Pin
Rolf Kristensen16-Nov-12 3:30
Rolf Kristensen16-Nov-12 3:30 
C++
CString csMsg;
PROCESS_MEMORY_COUNTERS_EX procMemInfo = {0};
procMemInfo.cb = sizeof(procMemInfo);
if (GetProcessMemoryInfo(GetCurrentProcess(), (PROCESS_MEMORY_COUNTERS*)&procMemInfo, sizeof(procMemInfo)))
{
	// Log how much physical and total memory we are using
	// - Win7 (and newer) reports commit-size in this member
	if (procMemInfo.PagefileUsage==0)
		procMemInfo.PagefileUsage = procMemInfo.PrivateUsage;
	ULONG ulWorkingSetSize = (ULONG)(procMemInfo.WorkingSetSize / 1024 / 1024);
	ULONG ulPagefileUsage = (ULONG)(procMemInfo.PagefileUsage / 1024 / 1024);
	CString csProcessMemInfo;
	csProcessMemInfo.Format(_T("WorkingSetSize=%lu MBytes, CommitChargeSize=%lu MBytes"), ulWorkingSetSize, ulPagefileUsage);
	csMsg += csProcessMemInfo;
}
MEMORYSTATUSEX memStatus = {0};
memStatus.dwLength = sizeof(memStatus);
if (GlobalMemoryStatusEx(&memStatus))
{
	// Log how much address space we are using (detect memory fragmentation)
	ULONG ulUsedVirtual = (ULONG)((memStatus.ullTotalVirtual-memStatus.ullAvailVirtual) / 1024 / 1024);
	ULONG ulAvailVirtual = (ULONG)(memStatus.ullAvailVirtual / 1024 / 1024);
	CString csMemStatus;
	csMemStatus.Format(_T("UsedVirtual=%lu MBytes, AvailableVirtual=%lu MBytes"), ulUsedVirtual, ulAvailVirtual);
	csMsg += csMemStatus;
}

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.