realbasic-nug
[Top] [All Lists]

Re: How to compute the address of an object?

To: <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: How to compute the address of an object?
From: "Daniel L. Taylor" <dtaylor at taylor-design dot com>
Date: Sat, 30 Dec 2006 14:38:40 -0800
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20061230180036 dot 70345179A1C7 at lists dot realsoftware dot com>
Thank for the hint. I even have class framework, which serialises any
- even cyclic - object networks to a flat file.

I just wanted to use a quick solution. Well...

Happy Nw Year!

Sorry I didn't catch this message earlier....

My toolkit PreemptiveThreadTD, available on my site, includes a function in the plugin, GetObjectMemoryAddressTD, which will return the address of the object you pass in.

MonkeyBread's excellent plugin suite has the same function, titled GetObjectMemoryAddressMBS. I didn't want my toolkit to have to require a separate one, so I rolled my own into PreemptiveThreadTD's plugin. But if you already have MBS, it's there.

I don't know any way to do this other than to call an external function, through a plugin or shared library, which returns the pointer as an integer. What's funny is that this is just a way to make RB "see" the same exact 4 bytes as something else. It's one line of code externally.

Daniel L. Taylor
Taylor Design
Computer Consulting & Software Development
dtaylor at taylor-design dot com
www.taylor-design.com



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>