nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Drawing.DirectX / ComBase

ComBase

Full name Microsoft.VisualBasic.Drawing.DirectX.ComBase Assembly Microsoft.VisualBasic.Drawing.DirectX Members 12

The common helper api for the directx com interop layer

00 Remarks

All of the native resource wrapper in this project is pure managed code: the directx api is imported via DllImportAttribute and the com interface is declared via ComImportAttribute, there is no any unmanaged code or c++/cli bridge required.

01 Syntax

Microsoft.VisualBasic.Drawing.DirectX.ComBase

02 Methods

NameOverloadsSummary
IsDeviceLost 1 does the hresult mean that the rendering device or the render target is not usable any more?
ThrowIfFailed 1 check the HRESULT value of a directx api call
SafeRelease 1 release a com runtime callable wrapper object in a safe manner
ComQuery 1 QueryInterface on a com object, the returned raw interface pointer holds one reference which is owned by the caller.
ComObject 1 Wrap a raw com interface pointer as a strongly typed runtime callable wrapper object.
Pack64 2 pack a D2D1_POINT_2F structure into one 64 bit argument slot
Multiply 1 a * b, the result is applied on the render target after the a matrix
RotationMatrix 1 make a rotation transform matrix around the given center point

03 Fields

NameOverloadsSummary
DXGI_ERROR_DEVICE_REMOVED 1 the gpu device has been removed, the whole device has to be recreated
DXGI_ERROR_DEVICE_RESET 1 the gpu device has been reset
DXGI_ERROR_WAS_STILL_DRAWING 1 the gpu is still busy with the previous frame

04 Members

method IsDeviceLost #
IsDeviceLost(Int32)

does the hresult mean that the rendering device or the render target is not usable any more?

Remarks

when this is the case, the swap chain and the direct2d render target must be recreated before the next drawing command is submitted.

method ThrowIfFailed #
ThrowIfFailed(Int32, String)

check the HRESULT value of a directx api call

method SafeRelease #
SafeRelease(Object)

release a com runtime callable wrapper object in a safe manner

method ComQuery #
ComQuery(Object, Guid, String)

QueryInterface on a com object, the returned raw interface pointer holds one reference which is owned by the caller.

method ComObject #
ComObject``1(IntPtr)

Wrap a raw com interface pointer as a strongly typed runtime callable wrapper object.

Remarks

A com object that is created through the out parameter of another com method is wrapped by the clr as an untyped System.__ComObject, and such an object can not be dispatched through the interface method stub (QueryInterface on an untyped rcw always fails). creating the runtime callable wrapper explicitly with the target interface type here makes the interface pointer cacheable so that the interface method can be dispatched correctly.

method Pack64 overload 2 #
Pack64(Int32, Int32)

pack two 32 bit values into one 64 bit argument slot

Remarks

A com interface method that takes a small struct (8 bytes or less) by value can not be declared correctly in the vb.net interop layer, such a parameter is declared as a 64 bit integer here and the two structure members are packed into it.

method Pack64 #
Pack64(D2D1_POINT_2F)

pack a D2D1_POINT_2F structure into one 64 bit argument slot

method Multiply #

a b, the result is applied on the render target after the a* matrix

method RotationMatrix #
RotationMatrix(Single, Single, Single)

make a rotation transform matrix around the given center point

field DXGI_ERROR_DEVICE_REMOVED #
DXGI_ERROR_DEVICE_REMOVED

the gpu device has been removed, the whole device has to be recreated

field DXGI_ERROR_DEVICE_RESET #
DXGI_ERROR_DEVICE_RESET

the gpu device has been reset

field DXGI_ERROR_WAS_STILL_DRAWING #
DXGI_ERROR_WAS_STILL_DRAWING

the gpu is still busy with the previous frame