IntPtr is a structure that is basically a strongly-typed Integer.
Its meant for storing things like window handles and procedure
addresses. It does not actually create a pointer that you can
play around with. If you need to pass a pointer of a variable to
a function, pass it regularly, but declare the parameter as ByRef
in the methods signature.
You could pass the integer by reference to a sub or function
Code:
private sub DoThing(ByRef i as integer)
end sub
elsewhere you could use
dim Test as integer
DoThings(Test) This would pass a reference to Test to the sub.
it may be easier if you give a better idea of what you are trying to do and why you feel you need pointers.
[/code]
well actually im trying to do a vertexbuffer rendering on CsGL. I need to pass in a IntPtr for my image buffer. Im kindda stuck there so i thought its better to understand IntPtr 1st.
I would also appreciate if u know about vertexbuffer couze i know near nothing about how to implement it.
thanks a lot.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.