I need to build a control which has a function that returns a binary data array. The function will be called in VB. What data type should I use in VC++?

Note, the binary data array size is dynamic. If I dynamically allocates memory, where should I delete the memory?

Any smaple codes are greatly appreciated.

Thanks.