On Aug 15, 2006, at 1:02 PM, Daniel Stenning wrote:
On 15/8/06 18:48, "Jonathan Johnson" <[EMAIL PROTECTED]> wrote:


On Aug 15, 2006, at 12:46 PM, Mars Saxman wrote:


On Aug 15, 2006, at 10:33 AM, Daniel Stenning wrote:

But I specifically need to pass the pointer of my structure to an
external
DLL  function which takes a pointer to a structure. Is there no way
to do
this?

Yes: declare the parameter ByRef.

So I can do this ?:

 Declare Sub myDLLcall Lib "mylibrarypath"  (pStruct as Ptr)

 or maybe:

Declare Sub myDLLcall Lib "mylibrarypath" ( ByRef pStruct as myStructure)

This one is the way to do it.

And then can I do this ??

Sub myRBmethod( ByRef rStruct as myStructure )
    call myDLLcall( rStruct )
End Sub

Yes, you could, but you could just "call myDLLcall" from the other method rather than creating this barren stub method.

-Jon


--
Jonathan Johnson
[EMAIL PROTECTED]
REAL Software, Inc.


_______________________________________________
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>

Reply via email to