Class ComWrapper
Static type to simplify the creation of ComWrapper{T} instances.
Assembly: CAMAPI.DotnetHelper.dll
Syntax
public static class ComWrapper
Methods
Create<T>(T?)
Simply creates a new instance of a wrapping object for a T type object.
Declaration
public static ComWrapper<T> Create<T>(T? wrappingInterface) where T : class
Parameters
| Type |
Name |
Description |
| T |
wrappingInterface |
|
Returns
Type Parameters
GetInstancePtrFromObject(object)
Public helper method to instance pointer for COM-object depending on platform
Declaration
public static nint GetInstancePtrFromObject(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
GetObjectFromInstancePtr<T>(nint)
Public helper method to get object from instance pointer depending on platform
Declaration
public static T? GetObjectFromInstancePtr<T>(nint instancePtr)
Parameters
| Type |
Name |
Description |
| IntPtr |
instancePtr |
|
Returns
Type Parameters
GetUniqueObjectFromInstancePtr<T>(nint)
Public helper method to get Unique COM-object on Windows only
Declaration
public static T? GetUniqueObjectFromInstancePtr<T>(nint objPointer)
Parameters
| Type |
Name |
Description |
| IntPtr |
objPointer |
|
Returns
Type Parameters