converting a C++ interface member to vb.NET

  • Thread starter Thread starter AbdEllah Gogop
  • Start date Start date
A

AbdEllah Gogop

Guest
i want to convert this sample of code from c++ to vb.NET:

the first method (these are an interface methods):


virtual void STDMETHODCALLTYPE RSSetViewports(
/* [annotation] */
_In_range_(0, D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) UINT NumViewports,
/* [annotation] */
_In_reads_opt_(NumViewports) const D3D10_VIEWPORT *pViewports) = 0;

remark : D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE = 16

the second method is:

virtual void STDMETHODCALLTYPE ClearRenderTargetView(
/* [annotation] */
_In_ ID3D10RenderTargetView *pRenderTargetView,
/* [annotation] */
_In_ const FLOAT ColorRGBA[ 4 ]) = 0;

remark: FLOAT is float type


my convertion is:

Sub RSSetViewports(ByRef NumViewports As UInteger,
ByVal pViewports() As IntPtr)

but in run-time, nothing happens!!!


Sub ClearRenderTargetView(ByVal pRenderTargetView As ID3D10RenderTargetView,
ByVal ColorRGBA As D3DXVECTOR4)

Public Structure D3DXVECTOR4

Dim x As Single

Dim y As Single

Dim z As Single

Dim w As Single
Public Sub New(ByVal xp As Single, ByVal yp As Single, ByVal zp As Single, ByVal wp As Single)
x = xp
y = yp
z = zp
w = wp


End Sub
End Structure




i can't to check out the result of these 2 procedures because they are sub and not a functions returning an HRESULT.

Continue reading...
 
Back
Top