No idea's for me? :-( Thank you.


> I was looking for a little clarification on using callbacks, memoryblocks
> and declares. I thought I understood these concepts better  - ugh!. :-)
> 
> This is all placed in a module, assume this structure.
> 
> typedef struct SampleStruct{
> version As Integer
> evaluate As Integer
> }
> 
> The evaluate declaration in this structure is a callback used to evaluate a
> function. I assume this needs to be declared as an integer since we cannot
> declare it in a structure as a MemoryBlock.
> 
> I want to assign to this evaluate property. I have this in a routine,
> 
> Dim aSampleStruct As SampleStruct
> aSampleStruct.version = 2.0
> aSampleStruct.evaluate = AddressOf SampleCallbackRoutine
> 
> Since AddressOf returns a Memoryblock, this last line will not compile. How
> can I get around this?
> 
> I have tried this, but is this correct?
> 
> Dim aSampleStruct As SampleStruct
> aSampleStruct.version = 2.0
> Dim temp As New MemoryBlock(4)
> temp = AddressOf SampleCallbackRoutine
> aSampleStruct.evaluate = temp.Long(0)
> 
> And what role does the MemoryBlock Ptr property  play in this?
> 
> Oh and once this structure is filled, I will be passing it to a declare that
> has this prototype declared as,
> 
> const CGFunctionCallbacks *callbacks
> 
> Thank you for any clarifications! It would be nice to be able to inspect
> these items of the memoryblock class in the debugger.
> 
> --
> Thomas C.

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to