In .Net you can use reflection to get access to an enumeration of all properties of a class. Can this be done too with a VB6 class module?
相关问题
- C# how to invoke a field initializer using reflect
- Convert VB's Val to Java?
- Invalid Picture In Visual basic 6
- Get all classes of a package
- Java-Reflection - find the Arguments and the annot
相关文章
- Are GetCallingAssembly() and GetExecutingAssembly(
- Why doesn't reflections.getSubTypesOf(Object.c
- Load a .NET assembly from the application's re
- Get list of classes in namespace in C# [duplicate]
- Reading (with Filesystem.FileGet) VB6 record file
- How to get struct field names in Rust? [duplicate]
- Issue creating ImmutableMap with Class<?> as
- TYPE_USE annotations get lost when type is nested,
Found it!
You need to set a reference to the TypeLib library (tlbinf32.dll) and then you can use code like (this is class module):
EDIT: Unfortunately, while the code below works as expected when run in debug mode inside the VB6 IDE, it fails when compiled. After compiling any attempt to read the .Members propery causes an 'Object doesn't support this action' error (445). I have given up on it, unless someone can make the code below work both in and outside of the IDE.
I am heavily endebted to this post.