This is a proof-of-concept that demonstrates arbitrary memory read/write that has zero external dependencies.
I had the following goals for the solution:
The solution leverages an apparent limitation in Array Parameter type safety.
It initializes an Array Variable of each intrinsic type.
All Array Variables point to a shared SafeArray Descriptor.
Using SafeArrays for memory access is a well-established technique (thanks Cristian Buse).
The key innovation presented here has to do with the initialization.
https://github.com/WNKLER/RefTypes
---
Primary development was done in 64-bit VBA.
Being a proof-of-concept, this has not been tested this thoroughly.
While, it may be functional, I do not consider this a fully-fledged release. (as of the time of writing)
I had the following goals for the solution:
- no `Declare` statements (not even for initialization)
- no external dependencies (TypeLibs etc.)
- host-independence (in the case of VBA)
The solution leverages an apparent limitation in Array Parameter type safety.
It initializes an Array Variable of each intrinsic type.
All Array Variables point to a shared SafeArray Descriptor.
Using SafeArrays for memory access is a well-established technique (thanks Cristian Buse).
The key innovation presented here has to do with the initialization.
https://github.com/WNKLER/RefTypes
---
Primary development was done in 64-bit VBA.
Being a proof-of-concept, this has not been tested this thoroughly.
While, it may be functional, I do not consider this a fully-fledged release. (as of the time of writing)