コード例 #1
0
        public void Release()
        {
            uint response = 0;
            // Verify Available Shot
            uint num = 0;

            response = this.m_api.RC_GetNumAvailableShot(this.m_cameraHandle, out num);
            if (!VerifyReponse(response) && num > 0)
            {
                throw new Exception("RC_GetNumAvailableShot");
            }
            // Set Transfer Mode
            ushort value = 0x0002 | 0x0008;

            response = this.m_api.SetDevicePropValue(this.m_cameraHandle, DevicePropCode.prPTP_DEV_PROP_CAPTURE_TRANSFER_MODE, value);
            if (!VerifyReponse(response))
            {
                throw new Exception("SetDevicePropValue");
            }
            // Reister GetFileCallback
            if (this.m_prGetFileCallback == null)
            {
                this.m_prGetFileCallback = new PRApi.prGetFileDataCB(MyGetFileDataCB);
            }
            // Release
            response = this.m_api.RC_Release(this.m_cameraHandle);
            if (!VerifyReponse(response))
            {
                throw new Exception("RC_Release");
            }
            this.GetReleaseData();
        }
コード例 #2
0
 public void Release()
 {
     uint response = 0;
     // Verify Available Shot
     uint num = 0;
     response = this.m_api.RC_GetNumAvailableShot(this.m_cameraHandle, out num);
     if (!VerifyReponse(response) && num > 0)
     {
         throw new Exception("RC_GetNumAvailableShot");
     }
     // Set Transfer Mode
     ushort value = 0x0002 | 0x0008;
     response = this.m_api.SetDevicePropValue(this.m_cameraHandle, DevicePropCode.prPTP_DEV_PROP_CAPTURE_TRANSFER_MODE, value);
     if (!VerifyReponse(response))
     {
         throw new Exception("SetDevicePropValue");
     }
     // Reister GetFileCallback
     if (this.m_prGetFileCallback == null)
     {
         this.m_prGetFileCallback = new PRApi.prGetFileDataCB(MyGetFileDataCB);
     }
     // Release
     response = this.m_api.RC_Release(this.m_cameraHandle);
     if (!VerifyReponse(response))
     {
         throw new Exception("RC_Release");
     }
     this.GetReleaseData();
 }