I have a C DLL I wrote to create rasterized graphics which I want to use in VB.NET. At one point it uses an array of pointers to doubles double **ibuffer as a parameter for a function.
So how do I pass this to a C DLL from Visual Basic? Preferably, I would create the array in VB, but I wouldn’t need to manipulate or use the values in VB. So basically, all VB needs to do is allocate the memory for the array of pointers. C would do all the other stuff. How can this be accomplished?
I assume that you are using pInvoke to call C method in VB.NET
First of all, there is no default marshalling available for Jagged arrays which means that you will have to do your own custom marshalling which is a little complicated but not very difficult. Here is the code to do such a thing in C#. I am not that good with VB.NET Syntax so I am sure you would be able to convert this to VB.NET
Taken from : http://social.msdn.microsoft.com/Forums/is/csharplanguage/thread/dd729947-f634-44f4-8d91-11fcef97cabe