|
as subject.
how does a class allocated in memory image?
i.e.
class A{
public:
A(void);
virtual ~A(void);
public:
virtual void someMethod(void);
virtual void someMethod2(void);
public:
void someMethod3(void);
void someMethod4(void);
private:
int m_nMenber;
};
A a;
how does these virtual functions and normal functions and member data allocate in memory as part of a.
more complicate:
class B : public A{
public:
B(void);
~B(void);
public:
virtual void someMethod(void);
virtual void someMethod2(void);
public:
void subClassMethod(void);
};
B b;
how does new inherited functions and new created functions allocate in memory as part of b,which is inherited from A?
any professional help would be appreciated!
|
|
|
|
|
|
thanks so much, and you are pretty!
|
|
|
|
|
Hello
Can any body tell in detail what is relative virtual addressing and all its basics?
Why virtual addressing is needed? How RVA invlolves in execution of PE files(EXEs,DLLs and so on..)
Regards
Muhammad Usman Khalil
|
|
|
|
|
When the loader loads a DLL or EXE the address it loads it at (the base address) plus the RVA of something of interest in the image will give you its address in memory. Put another way, it's the location of something in memory relative to the base address of the containing module. Remember that DLLs can be relocated if need be so the base address need not always be the same.
Steve
|
|
|
|
|
thnx ..
A way to go 4 me...
|
|
|
|
|
See, for instance: "An In-Depth Look into the Win32 Portable Executable File Format" (have a look at "Relative Virtual Addresses" section).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All,
I am beginner to MFC programming. I created one CLR Console Applications project, here in this project I want to use MFC classes like CString,CArray,CFile....etc.
In project settings I used "Use MFC in a shared DLL"
And in project stdafx.h file I am adding
#include<afx.h>
I also used few classes from MFC in the application and complied, I am not getting any errors.
But while running the application, I am facing crash in the application. and the error message is as follows
An unhandled exception of type 'System.AccessViolationException' occurred in Unknown Module.
Additional information:Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Please provide some solution for this.
Thanks in advance.
Regards,
Kumar
|
|
|
|
|
You shouldn't need to use the MFC classes in the application.
CLR provides several classes for the same like String , Array , File etc.
|
|
|
|
|
Thanks for your reply Superman
still is there any way to use MFC in CLR Console Application?
Thanks in advance.
Regards,
Kumar
|
|
|
|
|
HI,
Along with strings and arrays i want to use CDilogs also, please provide the solution for adding the MFC stuff to CLR Console Application.
Regards,
Kumar
|
|
|
|
|
In my application i am creating an excel file through Excel Automation. Now i am writing some values in the excel and then i am using Save() and Close() functions.
Now i want to open the same file and then write and append it. how can i do that?
i have already written in the first 2 columns. Then i am closing it. Later i want to write into the third column by opening it. give me some leads.
|
|
|
|
|
try to find find number of rows in used.Then start write into file.
It may be help you
long row;
VARIANT varc=pRange->GetValue();
if(varc.vt==VT_EMPTY)
{
}
else
{
COleSafeArray sarect(pRange->GetValue());
sarect.GetUBound(1,&row);
}
|
|
|
|
|
Chandru080 wrote: i have already written in the first 2 columns....Later i want to write into the third column...give me some leads.
How are you writing to the first 2 columns?
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I am using Excel Automation for that.. but i am trying to close the excel file and then open it again in a different function and then i am trying to append it again. that is not happening. I am using PutElement function to write the values into the excel file. but i am getting an exception there.
|
|
|
|
|
Hi,
I am developing a application in pure win32. I want to set font for Static control. How can I do this?
|
|
|
|
|
I think you can use SetFont() function in MFC and use WM_SETFONT message for pure Win32.
|
|
|
|
|
Just to expand on Rajeesh's answer, read up on CreateFont , CreateFontIndirect , as well as WM_SETFONT .
Don't forget to keep the HFONT somewhere to tidy up after the static control is gone.
To get the font, I'd recommend SystemParametersInfo[^], as that filld in a structure with various fonts the system uses. That way you can keep the look and feel consistent.
Iain.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
Iain Clarke, Warrior Programmer wrote: Don't forget to keep the HFONT somewhere to tidy up after the static control is gone.
I guess he may use the WM_GETFONT message for the purpose...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: I guess he may use the WM_GETFONT message for the purpose...
Not if the static window has gone *poof* he can't...
I'm always happy for people to ignore my advice though - as long as they've thought about it before rejecting it. After all, it does not always apply! (see your sig for more details)
Iain.
I have now moved to Sweden for love (awwww).
|
|
|
|
|
Send the WM_SETFONT [^] message.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All,
I have created a Splitter Window in which the Right view of the splitter is further split into two parts.How to resize the views during run time i.e. I want to double the size of top view at run time and hide the bottom one.Can anybody please help me out.
Thanks.
|
|
|
|
|
hi all, how do i add or modify the jpg image's exif info ? Is there some class for modify ? thx!
|
|
|
|
|
try GDI+ Bitmap class
Bitmap::SetPropertyItem()
|
|
|
|
|
Issue is resolved!!
Thank you very much!!!
|
|
|
|