Results 1 to 2 of 2

Thread: array pointer

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    110

    array pointer

    Hy guys

    here is the problem........
    I have an array of type byte. Using varptrarray function i got a pointer to that array. I have another function say writefile with parametes as imagepointer as long. I am passing this pointer to this function writefile.

    In the function writefile using this pointer i have to access the values of the byte array. I tried using rtlmovememory and all. Nothing worked or may be i am using it in a wrong way. Can somebody help me in solving this problem?

    thanking you
    Last edited by anis_b; Mar 19th, 2004 at 07:18 AM.
    Anis Bombaywala

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    Is there a reason you arent just passing the array?

    You can just do it like this:
    VB Code:
    1. Function MyTest (param1 As Integer, theArray as Variant)
    2.  
    3. 'code to work with "theArray" here
    4.  
    5. End Function
    6.  
    7.  
    8. 'setup & fill "MyArray" here
    9. MyArray = Array (1,1,3,2,6,3)  
    10.  
    11. Call MyTest (1, MyArray)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width