|
double-post, because I got an error message first
|
|
|
|
|
I need to get some memory information in my program
Amount of memory in computer.
Available memory.
How much memory my program currently occupies.
Anyone know how to do it or where I should look.
|
|
|
|
|
GlobalMemoryStatus is what you are searching for.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks. It solved 2 out of 3 problems..
Still have one problem. How do I find out how much memory my program already has allocated? Like in TaskManager, where I can go and see how much memory a program takes. But I need to do it in code in runtime.
|
|
|
|
|
I'm sorry I can't help you with the third problem
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Problem Solved..
To get CurrentProcess memory usage
<br />
#include "Psapi.h"<br />
<br />
...<br />
...<br />
...<br />
HANDLE hProcess = GetCurrentProcess();<br />
PROCESS_MEMORY_COUNTERS pmc;<br />
GetProcessMemoryInfo( hProcess, &pmc, sizeof(pmc) );<br />
<br />
....<br />
....<br />
and Add 'Psapi.lib' to link settings.
|
|
|
|
|
Read this before you put too much stock in those numbers:
http://flounder.com/howbig.htm
|
|
|
|
|
Hi,
I have a couple of DLL's which have an "unexplained" 8MB overhead in the .data segment (virtual size 0x00800000). The data does NOT appear in the binary (so I suppose it's zero-initialized data)
Any idea how to find out where this comes from?
More Info: I have a dozen COM DLL's, 7 of them implement modules with more or less the same interface, in roughly two groups, one group has the overhead the other has not. Virtual size of .data segments in the "ok" group is around <0x5000, in the "problem" group 0x800000 + sth. <0x5000.
I cannot find anything that looks like the culprit
Map file: the relevant entries are
...
0003:00003d58 008008dcH .bss DATA
...
0003:008043fc ?_Nilrefs@?$_Tree@VCString@WTL@@U?$pair@$$CBVCString@WTL@@M@std@@U_Kfn@?$map@VCString@WTL@@MU?$less@VCString@WTL@@@std@@V?$allocator@M@4@@4@U?$less@VCString@WTL@@@4@V?$allocator@M@4@@std@@1IA 00cd73fc FWorkLib:DlgConflict.obj
0003:00804400 ?_Nil@?$_Tree@VCString@WTL@@U?$pair@$$CBVCString@WTL@@M@std@@U_Kfn@?$map@VCString@WTL@@MU?$less@VCString@WTL@@@std@@V?$allocator@M@4@@4@U?$less@VCString@WTL@@@4@V?$allocator@M@4@@std@@1PAU_Node@12@A 00cd7400 FWorkLib:DlgConflict.obj
i.e. it looks like the _Nilrefs thing claims that much size.
Funnily, even DLL#s that are not affected use FWorkLib:DlgConflict.obj
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
I am using vc++ connect mysql. I connect to mysql and display the date field data in the text box. how i going to get the date value display in the text box so that i can increase the year.??? Or convert string to date type and increase the year
|
|
|
|
|
If the "text box" is a datetime control, you can use the DTM_GETSYSTEMTIME message. With MFC, this is CDateTimeCtrl::GetTime(), and the result can be stored in a CTime or COleDateTime object.
If you just have a plain edit box, use GetWindowText() to get the value, and then parse it accordingly. It'll depend on where the year is within the date.
|
|
|
|
|
My class relationship is:
class CViewBase::CFormView
{......}
class CViewLogon::CViewBase
{......}
CViewLogon::OnInitialUpdate()
{......}
i want do something in func CViewLogon::OnInitialUpdate(),but the program did not execute the func at all.in other word,i can't trace into the func CViewLogon::OnInitialUpdate(). what's up to my program?
gucy
|
|
|
|
|
Where are you trying to invoke OnInitialUpdate? Or are you letting MFC do it. Also, check and make sure your routine declaration matches EXACTLY. If you change and argument or a return type, it won't get executed.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
i did let mfc to do it.and i didn't change the parameter or return type.
i've look up the msdn.it said the function is called when the view is first attached to the document.but my app has no document.it is a extension dll,and the view is just one of the views of the splitterwindow.
Does that do something to my app?
gucy
|
|
|
|
|
Hi Friends,
I need your Help. I want to know How Video Streaming is done. I don't know the MPEG file format.
If any one Knows, Plz tell me
Thanks to all of you.
|
|
|
|
|
|
Thanks DavidCrow,
I studied the website you have given. But my problem is different.
I want to read the MPEG file. I don’t know the Header format of the MPEG file. What it contains exactly.
The MPEG I have is Encrypted by some unwanted data. I want to remove it
|
|
|
|
|
raghute_h wrote:
The MPEG I have is Encrypted by some unwanted data. I want to remove it
Then you'll first need to decrypt the file before you can even attempt to read the MPEG's header.
|
|
|
|
|
But do you Know how the MPEG file is read and play.
Actualy I want the part of MPEG file which can i play, not the hole file
I am new in this Multimedia world
I dont know the API used to play the video file or signal
Plz help me
|
|
|
|
|
Hi Friends,
I need your Help. I want to know How Video Streaming is done. I don't know the MPEG file format.
If any one Knows, Plz tell me
Thanks to all of you.
|
|
|
|
|
What is the easiest way to associate a program app w/an icon? I've seen the MSDN website explaination, but it didn't work and the steps seemed really complicated. Does anyone know of any other methods that work? Thanks.
|
|
|
|
|
If you are using the doc/view architecture, simply call CWinApp::RegisterShellFileTypes in your InitInstance method after you have added your doctemplates.
onwards and upwards...
|
|
|
|
|
Hi,
Does anyone know how i can draw text on the client area of a window with the help of directX8? I know how to do it through the GDI, but i want to do it with directX8.
Greets,
jason
|
|
|
|
|
If you're using Direct3D, you have two choices: the ID3DXFont interface or the CD3DFont class in the SDK framework classes.
ID3DXFont actually uses GDI behind the scenes to allow for Unicode characters, but is quite slow as a result.
CD3DFont prerenders a set of characters to a texture, which is much faster but limits you to the character set.
- Mike
|
|
|
|
|
Hi Mike,
thanx, that was exactly what i was looking for. One last question: Is it possible to define the font type and the font size in the ID3DXFont interface?
greets,
Jason
|
|
|
|
|
There doesn't appear to be a way to modify the font parameters in ID3DXFont ; you need to specify the initial font parameters when you create the font via D3DXCreateFont (when you pass the GDI font handle).
- Mike
|
|
|
|