Solved

Returning an array from a function

Posted on 2004-10-07
2
171 Views
Last Modified: 2010-05-02
i have made a function that reads a *.dc6 file, palettizes it, renders in a picturebox and stores it in an array of IPictureDisp's. now theres 2 changes that needs to be made:
1: the array must be a Type ive made myself
2: the array must be returned from the function, like Split(). so i can say MyPics() = DC6Handler.LoadDC6("c:\myimage.dc6", "c:\mypalette.dat")

is this possible somehow? as in, DC6Handler (my functions + all thats needed) is a usercontrol that allows the user to Import, and soon also Export DC6 files. the import shall return an array while the Export shall take the same type of array as a parameter
0
Comment
Question by:Tai-San
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 12247840
Dim YourArray(10) As Byte

' Pass by reference.
Function ModifyBytes(ByRef YourArray() As Byte)

' Modify data in array here

'To return one value, add 'as bytes' after function header

' Add 'ModifyBytes = YourArray(2) inside your function
End Function

I hope this can help you. ^^
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 125 total points
ID: 12247853
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question