dksdk_ffi_c/com.h¶
Functions
-
int dksdk_ffi_c_com_query_com_as_unknown(dksdk_ffi_i_unknown_t *unknown, const dksdk_ffi_uuid *iid, void **ppInterface)¶
Queries a COM object for an interface and, if a matching interface is found, increments the reference count.
The passed in IUnknown object must be a COM object.
- Parameters:
unknown -- [in] The object which must be a COM object.
iid -- [in] The pointer to the identifier for the interface to be queried.
ppInterface -- [out] The address of the pointer to the interface. It is the caller's responsibility to ensure the interface pointer references a structure that matches or exceeds the size of the interface. On success the de-referenced address *ppInterface will contain a pointer to the searched-for interface. On failure the de-referenced address *ppInterface will be NULL.
- Returns:
DKSDK_FFI_OK on success
DKSDK_FFI_ERR_NOT_FOUND when the interface can't be found
DKSDK_FFI_ERR_INVALID_ARGUMENT when ffi, iid or ppInterface is NULL.
-
int dksdk_ffi_c_com_add_ref(dksdk_ffi_i_unknown_t *unknown)¶
Increments the reference count of a COM object.
The passed in IUnknown object must be a COM object.
- Parameters:
unknown -- [in] The object which must be a COM object.
- Returns:
DKSDK_FFI_OK on success
DKSDK_FFI_ERR_INVALID_ARGUMENT when unknown is NULL.
-
int dksdk_ffi_c_com_release(dksdk_ffi_i_unknown_t *unknown)¶
Decrement the reference count of a COM object.
The passed in IUnknown object must be a COM object.
- Parameters:
unknown -- [in] The object which must be a COM object.
- Returns:
DKSDK_FFI_OK on success
DKSDK_FFI_ERR_INVALID_ARGUMENT when unknown is NULL.
-
int dksdk_ffi_c_com_add_ref_noop(dksdk_ffi_i_unknown_t *unknown)¶
Do-nothing add reference implementation intended for singleton objects.
- Parameters:
unknown -- [in] The object
- Returns:
1 (the singleton object count, which never changes)
-
int dksdk_ffi_c_com_release_noop(dksdk_ffi_i_unknown_t *unknown)¶
Do-nothing release implementation intended for singleton objects.
- Parameters:
unknown -- [in] The object
- Returns:
1 (the singleton object count, which never changes)