On Dec 18, 2006, at 21:32 UTC, Jim Dossey wrote:

> But what happens when this code is in a subroutine that I need to
call, and
> pass in the integer pointer?  Now that code looks ike this:
> 
> Sub MyFunc (ByRef i As Integer)
> Declare Sub SomeFunc Lib "somelib" (ByRef Data As Integer)
> SomeFunc(i)
> End Sub
> 
> and I call this using
> 
> Dim x As Integer
> MyFunc(x)

This works just fine.

> Now I'm using ByRef twice.  So when I call SomeFunc am I going
> to pass a pointer to a pointer to 'x'?

No.  You're passing the address of i, which happens to be the same as
the address of x in the calling routine.

Best,
- Joe


--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.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>

Reply via email to