Question passing a vector pointer in VB.NET to an OCX method

progC

New member
Joined
May 10, 2013
Messages
2
Programming Experience
3-5
Hi,
I'm developing a Visual Basic .NET application. I've integrated an OCX in my application.
One method of my OCX has this prototype
MyMethod (FLOAT * data)
where data is a pointer to a vector.
In my VB application, this method has been imported as
MyMethod (ByRef data As Single)
Do you have some advice on how to pass the vector pointer to "MyMethod"?
I can't change the OCX.
Thanks in advance
 
Hi Herman,
thanks for your reply.
Yes, using ByRef it is possible to write the variable.
My problem is that only the first element of the vector is written correctly by the procedure, as if the variable is scalar, if i pass the procedure
the first element of the vector.
If I pass all the vector to the procedure, I have error during the building of the application.
Have you any suggestion?

Thanks
 
- First element of what?
- What procedure?
- What variable?
- What error?

My only suggestion at this point is that you post some code so we know what you are talking about.
 
Back
Top