|
|
thanks for the reply, will glowcode help me track down "HANDLE" leaks?
Ask not what the application can do for you, ask what you can do for your application
|
|
|
|
|
Yaron Nir wrote:
thanks for the reply, will glowcode help me track down "HANDLE" leaks?
From memory yes it will. There is a free trial, so you can quickly try it for yourself.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
First of all what tools are you using? Sysinternals's process viewer(free)? Rational developer? Bounds checker?
Handles
threads, processes, files, registry keys, system objects (event, mutex, critical section etc.), windows, GDI objects etc (Some of them covered in MSDN under "WaitForSingleObject" and "CloseHandle").
What kind of information are you looking for? Did you check "User objects" column in Task manager?
|
|
|
|
|
thanks for the reply,
I am not using either soft u've mentined....
i only used task manager and GDIObj.exe viewer.....
i need to track down "HANDLE" leaks because my application increasing the opertating system handle counter and at somepoint it exceeds the maximum handles number.....
i can not find in my code where it happens, i need an out-side monitor....what can u recoomend?
Ask not what the application can do for you, ask what you can do for your application
|
|
|
|
|
I am taking a guess here - MFC|MDI with a lot of FormViews. If yes look through ypur dialog templates for unused controls (staics, group boxes etc.)
|
|
|
|
|
To track problem like this I would use Bounds Checker. But it is expensive and difficult to use.
www.sysinternals.com has free download Processviewer - an excellent tool to see what kind of objects are created in your app besides windows. Specifically for windows use Spy+(comes with VC)
|
|
|
|
|
thanks for reply,
i will try out the www.sysinternals.com ... and see if it helps me....
Ask not what the application can do for you, ask what you can do for your application
|
|
|
|
|
Can anyone explain to me how to insert a new row into and existing excel sheet? I am using the following code to try to do this but when ran, the program fails with "Insert method of range class failed" on the range.Insert statement.
char locn[10];
IndexToString(nRow, nCol, locn); //convert row/col to excel notation
lpDisp = objSheet.GetRange(COleVariant(locn), COleVariant(locn));
objRange.AttachDispatch(lpDisp);
range.Insert(COleVariant("xlShiftDown"));
|
|
|
|
|
Hi,
Can u help in any way for following query ????????
How can I redirect user I/O to a temporary ‘buffer’ space.
So that all changes are written to the buffer space
When the computer is rebooted, the I/O reads are redirected back to the original file location and all changes made in the previous session are discarded.
and how to create this buffer space.
---------
eg. After this program runs what ever changes u make (example change some text file , create file) it should redirect all I/O to buffer and after restarting this buffer should be deleted
Hoping for a positive response
|
|
|
|
|
See MSDN for "SetStdHandle" and related sample "Creating a Child Process with Redirected Input and Output"
|
|
|
|
|
Hi,
Thanks This was very useful.Will contact you soon.
Regards
|
|
|
|
|
Hello,
In the samples given on microsoft support (Q178749: HOWTO Create automation project using MFC and a type library) we have to select Microsoft Excel 8.0 Object Library if we use excel automation. But what could i do if i have office XP on my workstation?
thanks in advance
gerald
|
|
|
|
|
I assume you are using VC7
to import library (Excel in your case)
#import "libid:\<<excel8libid\>>"
if you want to be more specific with the version
#import "libid:\<<excel8libid\>>" version("x.x")
From what I saw MSOffice libraries are backward compatible so it should work, even though by rules of COM major version change should be treated as separate library.
|
|
|
|
|
|
then use
#import "excel8.olb"
And you will have to carry excel8.olb as a part of your build. I am not sure if it is legal though, you might have to have Excel8 on your build machine, check the user agreement.
|
|
|
|
|
If you target the Excel 8.0 library and build your exe, it will still work on different machines with Office 2000 and Office XP, though it does not seem to work in reverse. i.e. build for the 10.0 library and run it on a machine with Excel 97.
|
|
|
|
|
Hi,
I get a notification when a user is changing a tab in my CTabCtrl
How can I see what tab he is changing to?
ON_NOTIFY(TCN_SELCHANGING, IDC_SELECT_TAB, OnChangingTab)
...
void
MyMfcView::
OnSelchangingProjectSelectTab(NMHDR* pNMHDR, LRESULT* pResult)
{
// I get the currently selected tab
int selectedTab = TabCtrl_GetCurSel(pNMHDR->hwndFrom);
// But what's the index of the next tab???
int nextTab = ???
*pResult = IsOk(selectedTab, nextTab) ? 0 : 1;
}
Any ideas?
|
|
|
|
|
That information would not be available at that time.
The TCN_SELCHANGING message occurs when the tab is about to change.
Override the TCN_SELCHANGE notification message and
call GetCurSel to get the tab that you have selected.
|
|
|
|
|
But at this time, you can not stop the change-process any more.
You can switch back to the page just left, though.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
Any API is there to find wheather the system is locked.
|
|
|
|
|
define "system is locked"
|
|
|
|
|
In my definition, this is a locked system:
SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
int x = 0;
while (true)
x++;
I see dumb people
|
|
|
|
|
yes it is..
|
|
|
|
|
Hi everyone,
I have a weird problem. I have a function definition like
void SetUp(double **)
Now I have an array:
static double ERBbCoeff_22050[6][7] = {.... values...};
Now when I try to call the function SetUp(ERBbCoeff_22050), it throws the error...cannot convert parameter from double[6][7]to double**. However, I thought a 2D array could be represented as pointer to a pointer.
Obviously, I am missing something here. Anyone know what is going on? I would appreciate any help.
Thanks again,
Pankaj
Without struggle, there is no progress
|
|
|
|