473,394 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

accessing the vtable

Hello, I was wondering if it were possible to access the vtable directly.
Are there any resources that detail the inner workings of the vtable?
Jul 22 '05 #1
6 2481
2004-7-20 14:25:59

Nolan Martin <mo**********@hotmail.com> wrote in message

<XV2Lc.60214$Mr4.56908@pd7tw1no>
Hello, I was wondering if it were possible to access the vtable directly.
Are there any resources that detail the inner workings of the

vtable?

I think even if you find the virtual table through the "hiden" member
variebles,you can do nothing to the content of the table,since that
you don't know exactly the order of the pointer to the virtual
methods,don't you?
--
Composed with Newz Crawler 1.7 http://www.newzcrawler.com/
Jul 22 '05 #2
* Nolan Martin:

Hello, I was wondering if it were possible to access the vtable directly.
A C++ implementation need not be based on using vtables.

Windows C++ compilers are as a rule vtable-based with access to the
vtable for simple objects (in order to support Windows COM technology).

However, since you're asking about this it is 100% sure that you _don't_
need such access -- try instead to explain what you're trying to
achieve, and if you succeed in explaining that (some code that compiles
is recommended) you will get answers that will help you do whatever.

Are there any resources that detail the inner workings of the vtable?


Yes. ;-)

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jul 22 '05 #3
> > Hello, I was wondering if it were possible to access the vtable
directly.
Are there any resources that detail the inner workings of the

vtable?

I think even if you find the virtual table through the "hiden" member
variebles,you can do nothing to the content of the table,since that
you don't know exactly the order of the pointer to the virtual
methods,don't you?


I dont want to modify the data, just read it.
Jul 22 '05 #4
2004-7-20 14:50:41

"Alf P. Steinbach" <al***@start.no> wrote in message

<40****************@news.individual.net>
* Nolan Martin:
Hello, I was wondering if it were possible to access the vtable directly.
A C++ implementation need not be based on using vtables. Windows C++ compilers are as a rule vtable-based with access to the vtable for simple objects (in order to support Windows COM technology).
However, since you're asking about this it is 100% sure that you _don't_
need such access -- try instead to explain what you're trying to achieve, and if you succeed in explaining that (some code that compiles
is recommended) you will get answers that will help you do whatever.
Are there any resources that detail the inner workings of the

vtable?
Yes. ;-) -- A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?


What resouce? Can you show me how to get it?

many thanks!
--
Composed with Newz Crawler 1.7 http://www.newzcrawler.com/
Jul 22 '05 #5
Stone Lan wrote:
What resouce? Can you show me how to get it?


The book /Inside the C++ Object Model/ by Lippman, IIRC.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces
Jul 22 '05 #6
On Tue, 20 Jul 2004 15:05:55 +0800, Stone Lan <st*********@hotmail.com>
wrote:
> Are there any resources that detail the inner workings of the

vtable?

Yes. ;-)



What resouce? Can you show me how to get it?

many thanks!


Here is one example

http://www.codesourcery.com/cxx-abi/abi.html#vtable

john
Jul 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Quansheng Liang | last post by:
Hello, I struggled with the problem of "undefined reference to `vtable ...`" while migrating a project from windows to linux. After searching the google I removed all the inline functions and now...
7
by: Karl Ebener | last post by:
Hi! I have created a program using several classes with inheritage. When I compile and link, I get the following error: :$ g++ service2.cpp Service.cpp Application.cpp Message.cpp...
4
by: Clint Ruen | last post by:
Hello all, I have written out a data structure using the binary flag on an ofstream. The struct/class is something like this class SomeData { public: int data1;
4
by: rahul8143 | last post by:
hello, what happens to VTABLE when base class has virtual function and derived class does not override it? Does derived class also builds VTABLE if it has no functions? eg. if code is like...
9
by: kish_nand | last post by:
Could someone please explain me the concept behind virtual functions and vtables. I am little confused about this. Please refer to the following code and tell me how many virtual tables would be...
8
by: schoenfeld1 | last post by:
I'm trying to workaround a microsoft bug by overring one of their methods without subclassing. I need to basically change a Control's vtable entry for the method PaintBackground method and point...
17
by: ypjofficial | last post by:
Hello All, I have read in many c++ literature that vtable is nothing but an array of pointer to virtual functions inside a class.And the class where the virtual function/s are declared stores the...
2
by: Jessica | last post by:
I have a base class and a derived class, but I am getting errors when I try to access functions of the derived class. Simplified version of my code is as follows: //////////////// // test2.hh...
10
by: Ole Nielsby | last post by:
James Kanze <james.kanze@gmail.comwrote: COM does rely on vtable layout. COM interfaces are declared as pure virtual classes, all methods using stdcall convention, and this works because most...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.