has any one figured out how to grab a memory address of a varient stored in memory yet? i cant seem to find anything on any forums
Printable View
has any one figured out how to grab a memory address of a varient stored in memory yet? i cant seem to find anything on any forums
Probably not, VB.NET is a higher level language. Try C# or C++ if you need this.
Maybe through API .
Variant? I thought we'd finally decided they were a bad thing.
Use SystemInterop.Marshal class to read/write memory to/from managed variables.
I don't think Marshalling will do the trick . If I still understand its function , it's for passing variables from managed to unmanaged code with some customization .Quote:
Originally posted by Merrion
Variant? I thought we'd finally decided they were a bad thing.
Use SystemInterop.Marshal class to read/write memory to/from managed variables.
Or
make a function in C/C++ that gets a referenced variable which will be an address store . You can ask in C/C++ forums . Then reference this function as dll in your project .
I think Pirate's on the right track. VB recognizes IntPtr. However, you cannot use it to grab a memory address. For that, you must include a C# project into your solution, and write code to return an IntPtr from an object argument. That may work.
Perhaps VS 2005 will include pointers in VB, but it really moves away from the whole managed structure... so i doubt it.
Can you use AddressOf?
Just a shot in the dark.
You must be kidding !!:D :pQuote:
Originally posted by hellswraith
Can you use AddressOf?
Just a shot in the dark.
:) :D
Here is my question to the thread starter... Why?
Why do you need a memory address?
If you need a memory address, you need to start looking at a different language. Here is my vote -> C++
The samething happened in another thread ;)Quote:
Originally posted by hellswraith
Can you use AddressOf?
Just a shot in the dark.
http://www.vbforums.com/showthread.p...postid=1594944
heres the deal, i hate varients with a passion but i purchased an old LEAD Tools activeX control for viewing Postscript(way cheaper then .net control) , that has 2 real options 1 is load byte array and i can get it to load but not that much faster, so the other is LoadBuffer where i can throw the memory address of a varient in memory, i tried the addressOf operater but didnt load right. I'm gonna go back to messing with the loadbuffer, and post it if i get it