As mentioned in another thread, I'm trying to translate a Declare
statement from Visual Basic to REALbasic. One of the parameters of the
declare in VB is the address of a chunk of memory as a long. The VB
program uses all kinds of Windows API calls to free / unlock / allocate
/ lock a chunk of memory, and the address of that chunk of memory winds
up in a Long, which is passed to the declare. In REALbasic, I'm just
creating a NewMemoryBlock at the appropriate size, then passing that
MemoryBlock to the declare, where I've changed the parameter to read
"chunkOMemory As Ptr"... which seems to be the recommended way.
My question: What is the end result of this technique (create
memoryblock, pass to declare, declare parameter as ptr)? By which I
mean, what ACTUALLY gets passed to the declare? Is it an integer
defining the address of the memory location (as required by this dll),
or something else? Is there any way to intercept this value to see
what it contains before the declare is called? Is there any way to
grab the address of my memoryblock, stuff it into an integer variable,
and pass THAT to the declare (this would certainly be preferable in my
mind)?
I've also seen reference in some postings (and in RBTFG) to
de-referencing pointers, e.g. creating a second memoryblock, then
grabbing the .ptr(0) of the first memoryblock, and placing it in the
second... I don't understand this. When would you need to do that?
Lots of questions... thanks in advance.
Jason P Toews ~ Production Systems Analyst
Trader Publishing Company
907 IS-Seattle
Office: 425-487-2237 x3066
Cell: 425-891-3051
_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|