示例#1
0
 /**
  * @brief Increase a reference count of the sample.
  */
 public new void AddRef()
 {
     using (PXCMBase bs = this.QueryInstance(PXCMAddRef.CUID))
     {
         if (bs == null)
         {
             return;
         }
         bs.AddRef();
     }
 }
示例#2
0
    /**
     *  @brief Create an instance of the specified module.
     *  @param[in]	desc					The module descriptor.
     *  @param[in]	iuid					Optional module implementation identifier.
     *  @param[in]	cuid					Optional interface identifier.
     *  @param[out]	instance				The created instance, to be returned.
     *  @return PXCM_STATUS_NO_ERROR			Successful execution.
     *  @return PXCM_STATUS_ITEM_UNAVAILABLE	No matched module implementation.
     */
    public pxcmStatus CreateImpl(ImplDesc desc, Int32 iuid, Int32 cuid, out PXCMBase impl)
    {
        IntPtr     impl2;
        pxcmStatus sts = PXCMSession_CreateImpl(instance, desc, iuid, cuid, out impl2);

        impl = null;
        if (sts >= pxcmStatus.PXCM_STATUS_NO_ERROR)
        {
            impl = new PXCMBase(impl2, false).QueryInstance(cuid);
            impl.AddRef();
        }
        return(sts);
    }
示例#3
0
    /**
     *  @brief The function creates an instance of a serializeable interface from the metadata storage.
     *  @param[in] id           The metadata identifier.
     *  @param[in] cuid         The interface identifier.
     *  @param[out] instance    The serializable instance, to be returned.
     *  @return PXCM_STATUS_NO_ERROR         Successful execution.
     */
    public pxcmStatus CreateSerializable(Int32 id, Int32 cuid, out PXCMBase slz)
    {
        IntPtr     slz2;
        pxcmStatus sts = PXCMMetadata_CreateSerializable(instance, id, cuid, out slz2);

        slz = null;
        if (sts >= pxcmStatus.PXCM_STATUS_NO_ERROR)
        {
            slz = new PXCMBase(slz2, false).QueryInstance(cuid);
            slz.AddRef();
        }
        return(sts);
    }