|
There are articles at codeproject on how to detect memory leaks.
You could also download a trail copy of "BoundsChecker" or some other testing software.
INTP
|
|
|
|
|
Try Numega BoundsChecker.
Or using MFC CMemoryState to see the memory usage at each stage but I think this way is kinda troublesome. I would prefer Boundschecker with nice UI.
|
|
|
|
|
Hi all,
I didn't find anything about changing the priority of windows processes.
eg : I would like to have an hidden process which would set a low priority to processes like eMule, Crazy Browser, Internet Explorer, Visual Age, ...
I have to do it whith the task manager, I have many processes to modify, it's not that exciting !
I don't know if it possible, please if you have any clue, help.
Thanks all.
Nd
.
|
|
|
|
|
Find the handle of the process and use the Windows API function(s) SetPriorityClass and SetThreadPriority .
BOOL SetPriorityClass(
HANDLE hProcess,
DWORD dwPriorityClass
);
BOOL SetThreadPriority(
HANDLE hThread,
int nPriority
); For the parameters, see MSDN.
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
I'll try it, but it doesn't seem as hard as I thought.
I hope administrator rights are not needed.
Thanks for your help.
Nd
.
|
|
|
|
|
nitropit wrote:
I hope administrator rights are not needed.
As documented, you need PROCESS_SET_INFORMATION access right. Thankfully no one but Administrators have this right by default - though one could consider it a flaw in the Win32 API to not let a process lower its own priority without it.
|
|
|
|
|
Is there any way that the main window of SDI is always maximised?
Currently, I have to click the maximize button to make it full size.
|
|
|
|
|
When you create it,
Use WS_MAXIMIZE on the flags
|
|
|
|
|
can u provide me with exact syntax?
I tried to create it but it didn't work
|
|
|
|
|
Go to the OnCreate function of your main window, and at the end of the function add this line:
code>ShowWindow (SW_MAXIMIZE);<
|
|
|
|
|
Sans the HTML tags, of course!
|
|
|
|
|
doooooooooouuuuuuuhhhhhhhh !!!!!
But you got the main point
|
|
|
|
|
What's the use of typedefing basic types ?
I'm reviewing some old C code, and there's a lot of typedef like
typedef float *FloatPtr;<br />
typedef float **FloatPtr2D;<br />
typedef float ***FloatPtr3D;<br />
typedef float ****FloatPtr4D;<br />
<br />
typedef unsigned int UInt;<br />
typedef unsigned int *UIntPtr;<br />
<br />
typedef int *IntPtr;<br />
typedef int **IntPtr2D;<br />
typedef int ***IntPtr3D;
and some other variants of the same things; and it's all mixed up in the code, sometimes, declaration use a typedef, but the definition use the full type.
If I need to typedef some basic types to be used all around the application to follow a code guideline, is there a standard way of doing this, in C++ preferable ?
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." (from /.)
|
|
|
|
|
Maximilien wrote:
typedef unsigned int UInt;
typedef unsigned int *UIntPtr;
Now you can write UIntPtr instead of unsigned int* .
Typedefing like this saves a few keystrokes.
Even Microsoft does it: you van write UINT for 'unsigned int ' or BOOL for int .
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Hi.
I've set a low level mouse and keyboard hooks in my DLL , but for some reason
it slowers my mouse movement ( almost impossible to move ).
Does anyone knows what the problem might be?
Thanks.
|
|
|
|
|
You're not trying to do anything with the mouse (like move it or click it) in the processing of the hook event, are you? ... in fact, could you post what you are trying to do in the hook code?
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Hi.
No, I'm not trying to move it or anything else.
I just set the hook , and that's it.
Any ideas?
Thanks.
|
|
|
|
|
This is a documented side-effect of installing system-wide hooks. It's both expected and unavoidable.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi.
Can you tell me where is it documented please?
Thanks.
|
|
|
|
|
MSDN: "Hook Procedures"
You should use global hooks only for debugging purposes; otherwise, you should avoid them. Global hooks hurt system performance and cause conflicts with other applications that implement the same type of global hook.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
How could i make an app start up before windows so it can access the partition tables, execute formats, repartition etc?? I mean something like Partitionmagic for example, you choose to delete a partition, like for example your C partition then it does something, u have to reboot and it does the job before windows is fully started (otherwise it cant access it because its protected?). Allthough in Windows 2000 and XP it seems sort of encapsulated, like windows starts but during startup it does the tasks, like where scandisk runs too.
Anyone know how to do this from an application?
Kuniva
--------------------------------------------
|
|
|
|
|
|
is there a way to pack or zap a recordset?
or do i have to create an outside program?
|
|
|
|
|
What do you mean by recordset?
Do you mean database recordset?
Best regards,
Alexandru Savescu
P.S. Interested in art? Visit this!
|
|
|
|
|
yes, i am sorry i am most likely using the wrong wording for vc++. pack and zap are database terms. pack will permently delete all records marked for deletion. zap removes all records from the table.
are there any mfc functions that do the same.
|
|
|
|