|
Does it fail even if the EXE is executed by double clicking from user mode?
If so try attaching a debugger to the process.
You could try running the EXE in debug mode, but without attaching the debugger (Ctrl + F5).
|
|
|
|
|
Hi everybody,
I like to find out where a function or maybe an entire library allocates a huge amount of memory.
In the task-manager I see that the application really uses 25MB of the memory and allocates a total of 166MB.
I tested already GlowCode, but it displays only the memory which is really in use.
Is there another tool or programming technique to find the call of the function?
Big thanks for any help
|
|
|
|
|
baerten wrote: Is there another tool or programming technique to find the call of the function?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I think he meant which code calls the heap allocator?
Try IBM Rational Purify. They have 30-day license I believe. It should keep track of allocations and deallocations, leaks, etc, complete with the stack of the callers.
|
|
|
|
|
i'm so foolish, who can help me?
i got one message identification, for example, it's 0x10b3, how can i get the described information about it?
as above is just one instance, if many message identification arise, i'll jump into whirlpool
|
|
|
|
|
|
sunen wrote: ...how can i get the described information about it?
Given that you've simply shown a base-16 number, how are we to know?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
A fool is someone who fails to learn.
So, asking this question once is not foolish. Asking the same question again, will be.
So, to your actual question. Read the following blog article. I'll wait.
The Old New Thing: Which message numbers belong to whom?[^]
.
.
.
.
Back already? Wow!
So, 0x10b3 lies solidly in the class defined message category. So, without knowing what kind of window you have (or more importantly: what kind of window other code thinks you have), it's impossible at answer your question.
Without knowing a lot more, we can't help, sorry.
I wish you luck, and cleverness,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
you're a good man, thank you very much
|
|
|
|
|
Hi,
I tried to use "GlobalLock" to get HBITMAP data. But it returns NULL.
void myfunc(HBITMAP hMen)
{
....
lpVoid = (UCHAR *)GlobalLock(hMem);
....
}
lpVoid is NULL
What else function I can use to get Bitmap data from HBITMAP?
Thanks,
|
|
|
|
|
transoft wrote: Why GlobalLock failed?
I found this little detail in the documentation[^] page:
If the function fails, the return value is NULL. To get extended error information, call GetLastError()[^].
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
transoft wrote: What else function I can use to get Bitmap data from HBITMAP?
GetDIBits
an HBITMAP is not an HGLOBAL.
|
|
|
|
|
Hello,
when i came with the debugger to a function like this my
debugger will step into an little part of assembler.
i think it is the constructor.
how can i deactivate this sh*t!
i use MFC 2003 Version 7.1
void test(CString compress)
{
}
test("HALLO");
Thanks
|
|
|
|
|
Hwewet wrote: how can i deactivate this sh*t!
This type of language should be reserved for the back room.
However if you do not want to see the assembler then use "Step Over" rather than "Step Into".
|
|
|
|
|
I'm not sure that I understand your query right, but you're probably pressing F11 instead of F10?
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
What i mean is when the CString is part of an function call.
When i try to step into the function first all of the Cstring constructors
comes with assembler code.
void function(CString xy,CString xy,CString xy)
{
}
F11
first CString assembler, sec. CString assembler,..., enter function...
|
|
|
|
|
you could press ctrl + tab and it'll restore the nature view
|
|
|
|
|
Hi,
This is not the proper forum for my question.But i dont know where to post it.sorry.
Iam planning to use WPF controls in my MFC application.Either directly or by creating DLL in C#.
But i dont know anything about that.Is there any book to buy about WPF and VC++.
Pls provide me any information on that.
Just i want is..the look of WPF like buttons,colored Listbox,colored Dialog.But functionality of all buttons should come in MFC applcaition only.
Anu
|
|
|
|
|
|
Hi,
After some struggle, and some good help from this forum, I find that I am now more or less managing to be able to manage my owner draw list box, except for 1 issue.
The strings I want to use contain tabs.
When I set my CreateStruct up in my PreCreateWindow, I have to disable LBS_MULTICOLUMN or my custom DrawItem function does not get called.
The downside of disabling the LBS_MULTICOLUMN is that the tabs in the string are discarded and my formatting goes to pot, even when configuring LBS_USETABSTOPS.
Any Suggestions?
TIA
Tony
|
|
|
|
|
maycockt wrote: ...even when configuring LBS_USETABSTOPS.
Did you send the control a LB_SETTABSTOPS message?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
I hadn't sent a LB_SETTABSTOPS message, but I had used SetTabStops funtion, which had no effect.
In my OnInitDialog I have tried the following......
<per>
m_plbMyControl = new CCustomListBox();
if(NULL != m_plbMyControl )
{
CRect rList(10, 10, 580, 285);
DWORD dwStyle = LBS_NOTIFY | LBS_OWNERDRAWVARIABLE | LBS_NOINTEGRALHEIGHT | LBS_HASSTRINGS | LBS_USETABSTOPS | WS_BORDER | WS_HSCROLL;
if(TRUE == m_plbMyControl->Create(dwStyle, rList, this, IDC_LIST_CONTROL))
{
//m_plbMyControl->SetTabStops(16);
::SendMessage(m_plbMyControl->m_hWnd, LB_SETTABSTOPS, (WPARAM)1, (LPARAM)16);
}
}
Whereas the SetTabStops call had no effect, the ::SendMessage just gets an unhandled exception.
I am sure the SetTabStops or LB_SETTABSTOPS is the right way to go, I just cant seem to work out how to use it properly!!!
Any further help would be much appreciated.
TIA
Tony
|
|
|
|
|
maycockt wrote: //m_plbMyControl->SetTabStops(16);
::SendMessage(m_plbMyControl->m_hWnd, LB_SETTABSTOPS, (WPARAM)1, (LPARAM)16);
Just to see if the tabstops are even being used, have you played around with other values besides 16? Four character units does not seem large enough to separate anything but very small (1-2 characters) words.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
I've tried 0, 1, 4, 8, 16........
Each time using ::SendMessage it crashes with an Unhandled Exception.
TIA
Tony
modified on Thursday, December 3, 2009 10:06 AM
|
|
|
|
|
maycockt wrote: I've tried 0, 1, 4, 8, 16........
(I think) You need to use larger values, not smaller.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|