is there anything in VC can do the job like Reflection in .NET?

  • Thread starter Thread starter Ryanivanka
  • Start date Start date
R

Ryanivanka

hi,
is there anything in VC can do the job like Reflection in .NET?
i mean by setting some attribute and get runtime information?
 
Ryanivanka said:
hi,
is there anything in VC can do the job like Reflection in .NET?
i mean by setting some attribute and get runtime information?

No. Reflection is a platform capability provided by the CLR and there is
nothing equivalent for native C/C++. The closest you can come with built-in
language features is dynamic_cast - which is to say, not very close.
There's no way to inspect an object and determine it's methods and fields,
for example. Leaving the realm of pure C/C++, COM provides some
reflection-like abilities for COM classes that are described by a type
library, but again, that's a platform feature of COM, not a native C/C++
feature.

-cd
 
Back
Top