Re: Testing type of void*
- From: "Doug Harrison [MVP]" <dsh@xxxxxxxx>
- Date: Wed, 05 Apr 2006 17:57:51 -0500
On Wed, 05 Apr 2006 18:49:04 +0530, Laxman <laxman.auti@xxxxxxxxxxxx>
wrote:
There's no way to recover the type from a void*.
What the reason behind it..???
The void* type can hold a pointer of any data type, and even if the data
contains some sort of self-identifying tag, it could be a spurious
occurrence of that tag. So the only reliable way to tell what a void*
points to is to remember it yourself. Things are much different in .NET
where everything derives from System.Object, and you can recover type
information when you have an Object reference.
--
Doug Harrison
Visual C++ MVP
.
- References:
- Testing type of void*
- From: Notre Poubelle
- Re: Testing type of void*
- From: Doug Harrison [MVP]
- Re: Testing type of void*
- From: Laxman
- Testing type of void*
- Prev by Date: events and delegates accessing from another class
- Next by Date: Re: Bug in precedence for built-in types?
- Previous by thread: Re: Testing type of void*
- Next by thread: Re: Testing type of void*
- Index(es):
Relevant Pages
|