Archived

This topic is now archived and is closed to further replies.

Vb.Net how to get an handle...

This topic is 5618 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi i''m trying to convert some example (made in vb6) that i found and i have one problem for the moment. This is how the sub look in vb.net Public Sub DrawPrimitiveUP(ByVal PrimitiveType As DxVBLibA.CONST_D3DPRIMITIVETYPE, ByVal PrimitiveCount As Integer, ByVal VertexStreamZeroDataArray As IntPtr, ByVal VertexStreamZeroStride As Integer) I call the sub in vb6 that way and it worked fine: D3DDevice.DrawPrimitiveUP(DxVBLibA.CONST_D3DPRIMITIVETYPE.D3DPT_TRIANGLESTRIP, 2, TriStrip(0), Len(TriStrip(0))) but in VB.Net it doesn''t accept TriStrip(0). It needs a System.IntPtr Anyone knows how i can get the intptr of TriStrip(0) ? Thanks in advance. NTSC

Share this post


Link to post
Share on other sites
I haven''t use VB.NET, but if it has the VarPtr function, then you can use it to get a pointer to a variable (which will be an int)

Trying is the first step towards failure.

Share this post


Link to post
Share on other sites