I'm relatively new to VB and am doing some class programming.

I have a filerepresentation class and a bytechunk class.

A method of the filerepresentation class returns a bytechunk class. The declaration in the function prototype allows this however, the upon making the function name = returned object of class bytechunk, it crashes with an unkown error:
-2,147,211,505 (8004 270f)

Is there a problem with returning objects from another object or some other reasoable explanation ?