亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? nerofiddlesdlg.cpp

?? 本源碼是通過調用NeroAPI實現刻錄功能
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
        case NEROAPI_BURN_FUNCTION_NOT_ALLOWED:
          AppendString ("BurnCD() : function not allowed");
          break;
        case NEROAPI_BURN_DRIVE_NOT_ALLOWED:
          AppendString ("BurnCD() : drive not allowed");
          break;
		case NEROAPI_BURN_USER_ABORT:
          AppendString ("BurnCD() : user aborted");
          break;
		case NEROAPI_BURN_BAD_MESSAGE_FILE:
          AppendString ("BurnCD() : bad message file");
          break;
        default:
          AppendString ("BurnCD() : unknown error");
		  break;
      }
    }
  }
}

BOOL NERO_CALLBACK_ATTR CNeroFiddlesDlg::IdleCallback(void *pUserData)
{
  // idle callback is called frequently by NeroAPI

  // make sure that messages from other controls can be handled

  static MSG msg;
  while (!(((CNeroFiddlesDlg*)pUserData)->mbAborted) && ::PeekMessage(&msg,NULL,NULL,NULL,PM_NOREMOVE))
  {
    if (!AfxGetThread()->PumpMessage())
	  {
      break;
	  }
	}

  // aborted-flag serves as function result

  return ((CNeroFiddlesDlg*)pUserData)->mbAborted;
}

void CNeroFiddlesDlg::NeroAPIInit()
{
  // initialization part, provide necessary information and check status

  mbAborted = false;

  // try to open the NeroAPI DLL

  if (!NeroAPIGlueConnect (NULL))
  {
    AppendString("Cannot open NeroAPI.DLL");

    // it makes no sense to continue after loading the DLL failed

    return;
  }

  // the NeroAPI DLL could be openend, get version information

  AppendString("Retrieving version information.");

  WORD majhi, majlo, minhi, minlo;

  NeroGetAPIVersionEx(&majhi, &majlo, &minhi, &minlo, NULL);


  // format and display the version information

  CString strVersion;
  strVersion.Format("NeroAPI version %d.%d.%d.%d",
                    majhi, majlo, minhi, minlo);

  AppendString(strVersion);

  // setup of structures that the NeroAPI needs

  AppendString("Filling NERO_SETTINGS structure");

  // Information for registry access

  strcpy(pcNeroFilesPath, "NeroFiles");
  strcpy(pcVendor, "ahead");
  strcpy(pcSoftware, "Nero - Burning Rom");

  // use the US-English error message file

  strcpy(pcLanguageFile, "Nero.txt");

  nsSettings.nstNeroFilesPath = pcNeroFilesPath;
  nsSettings.nstVendor = pcVendor;

  // set pointers to various callback functions

  nsSettings.nstIdle.ncCallbackFunction = IdleCallback;      

  // this pointer is required to access non-static variables from callback functions

  nsSettings.nstIdle.ncUserData = this;
  nsSettings.nstSoftware = pcSoftware;
  nsSettings.nstUserDialog.ncCallbackFunction = UserDialog; 
  nsSettings.nstUserDialog.ncUserData = this;
  nsSettings.nstLanguageFile =pcLanguageFile;

  // npProgress will be used during the burn process

  npProgress.npAbortedCallback = AbortedCallback;
  npProgress.npAddLogLineCallback = AddLogLine;
  npProgress.npDisableAbortCallback = NULL;
  npProgress.npProgressCallback = ProgressCallback;
  npProgress.npSetPhaseCallback = SetPhaseCallback;
  npProgress.npUserData = this;
  npProgress.npSetMajorPhaseCallback=NULL;	
  npProgress.npSubTaskProgressCallback=NULL;


  // no devices available yet

  pndiDeviceInfos = NULL;

  // initialize the NeroAPI with nsSettings and the 
  // Serial Number that we got from the Registry

  NEROAPI_INIT_ERROR initErr;
  initErr = NeroInit (&nsSettings, NULL);

  // display the result of NeroInit()

  switch (initErr)
  {
    case NEROAPI_INIT_OK:
      AppendString("Initialization of the NeroAPI successful.");
      break;
    case NEROAPI_INIT_INVALID_ARGS:
      AppendString("The arguments are not valid.");
      break;
    case NEROAPI_INIT_INVALID_SERIAL_NUM:
      AppendString("The Serial Number is not valid.");
      break;
    default:
      AppendString("An error occured. The type of error cannot be determined.");
      break;
  }

  // get a list of available drives

  pndiDeviceInfos = NeroGetAvailableDrivesEx (MEDIA_CD, NULL);

  // check whether any devices have been found 

  if (!pndiDeviceInfos)
  {
    // no device found, let the user know

    AppendString("NeroGetAvailableDrivesEx() returned no available devices.");
  }
  else
  {
    // devices found

    // check the number of available devices to be sure

    if (pndiDeviceInfos->nsdisNumDevInfos > 0)
    {
      // we have some devices, now fill the ComboBox

      AppendString("Found the following devices:");
      for (DWORD dDeviceCounter = 0; dDeviceCounter < pndiDeviceInfos->nsdisNumDevInfos; dDeviceCounter++)
      {
        AppendString(pndiDeviceInfos->nsdisDevInfos[dDeviceCounter].nsdiDeviceName);

        // add the device name to the ComboBox and get the index number

        int i = mcbxDevices.AddString(pndiDeviceInfos->nsdisDevInfos[dDeviceCounter].nsdiDeviceName);

        // use the index number to access the corresponding entry
        // connect the entry's ItemData pointer to a NERO_DEVICE_INFO structure

        mcbxDevices.SetItemDataPtr(i, &pndiDeviceInfos->nsdisDevInfos[dDeviceCounter]);
      }

      // select the first ComboBox entry

      mcbxDevices.SelectString(-1, pndiDeviceInfos->nsdisDevInfos[0].nsdiDeviceName);
    }
    else
    {
      AppendString("The number of available devices is 0.");
    }
  }
}

void CNeroFiddlesDlg::AppendString(CString str)
{
  // a CString for temporary use

  CString   strBuffer;

  // retrieve the content of the EditControl we use for messages

  medtMessages.GetWindowText (strBuffer);

  // add a new line if the EditControl is not empty

  if (!strBuffer.IsEmpty())
  {
     strBuffer += "\r\n";
  }

  // append the string the function got as a parameter

  strBuffer += str;

  // update the EditiControl with the new content

  medtMessages.SetWindowText (strBuffer);

  // Scroll the edit control to the end

  medtMessages.LineScroll (medtMessages.GetLineCount(), 0);
}

NeroUserDlgInOut NERO_CALLBACK_ATTR CNeroFiddlesDlg::UserDialog(void *pUserData, NeroUserDlgInOut type, void *data)
{
  // handling of messages that require the user to perform an action
  // for reasons of brevity we only deal with the messages that 
  // are absolutely mandatory for this application

  switch (type)
  {
    case DLG_AUTO_INSERT:
      return DLG_RETURN_CONTINUE;
      break;
    case DLG_DISCONNECT_RESTART:
      return DLG_RETURN_ON_RESTART;
      break;
    case DLG_DISCONNECT:
      return DLG_RETURN_CONTINUE;
      break;
    case DLG_AUTO_INSERT_RESTART:
      return DLG_RETURN_EXIT;
      break;
    case DLG_RESTART:
      return DLG_RETURN_EXIT;
      break;
    case DLG_SETTINGS_RESTART:
      return DLG_RETURN_CONTINUE;
      break;
    case DLG_OVERBURN:
      return DLG_RETURN_TRUE;
      break;
    case DLG_AUDIO_PROBLEMS:
      return DLG_RETURN_EXIT;
      break;
    case DLG_FILESEL_IMAGE:
      {
        // create filter for image files

        static char BASED_CODE szFilter[] = "Image Files (*.nrg)|*.nrg|All Files (*.*)|*.*||";

        // create a CFileDialog object. 
        // usage : CFileDialog( BOOL bOpenFileDialog, LPCTSTR lpszDefExt = NULL, LPCTSTR lpszFileName = NULL,
        //                      DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, LPCTSTR lpszFilter = NULL,
        //                      CWnd* pParentWnd = NULL );
        //
        // bOpenFileDialog = TRUE, create a File Open dialog 
        // lpszDefExt = NULL, do not automatically append a file extension
        // dwFlags = OFN_OVERWRITEPROMPT, makes no sense during file open,
        //           just in case we decide to use File Save later
        // szFilter = "Image Files (*.nrg)|*.nrg|All Files (*.*)|*.*||"
        // pParentWnd = ((CNeroFiddlesDlg*)pUserData), our current Dialog window is the parent

        CFileDialog dlgOpen(TRUE, NULL, "test.nrg", OFN_OVERWRITEPROMPT, szFilter, ((CNeroFiddlesDlg*)pUserData));

        // check how the dialog was ended

        if (dlgOpen.DoModal() == IDOK)
        {
          // user pressed "OK", copy the file name to the data parameter

          strcpy((char*)data,dlgOpen.GetPathName());

          // proceed with the burn process

          return DLG_RETURN_TRUE; 
        }
        else
        {
          // user canceled, do not proceed with the burn process

          return DLG_BURNIMAGE_CANCEL;
        }
      }
      break;
    case DLG_WAITCD:
    {
      NERO_WAITCD_TYPE waitcdType = (NERO_WAITCD_TYPE) (int)data;
	  char *waitcdString = NeroGetLocalizedWaitCDTexts (waitcdType);
      ((CNeroFiddlesDlg*)pUserData)->AppendString(waitcdString);
	  NeroFreeMem(waitcdString);
      return DLG_RETURN_EXIT;
      break;
    }
    default:
      break;
  }

  // default return value, in case we forgot to handle a request
  
  return DLG_RETURN_EXIT;
}

BOOL NERO_CALLBACK_ATTR CNeroFiddlesDlg::ProgressCallback(void *pUserData, DWORD dwProgressInPercent)
{
  // the NeroAPI updates the current progress counter

  // set the progress bar to the percentage value that was passed to this function

  ((CNeroFiddlesDlg*)pUserData)->mpgsProgress.SetPos(dwProgressInPercent);

  return true;
}

BOOL NERO_CALLBACK_ATTR CNeroFiddlesDlg::AbortedCallback(void *pUserData)
{
  // do not ask the user if he really wants to abort
  // just return the aborted flag

  return ((CNeroFiddlesDlg*)pUserData)->mbAborted;
}

void NERO_CALLBACK_ATTR CNeroFiddlesDlg::AddLogLine(void *pUserData, NERO_TEXT_TYPE type, const char *text)
{
  // Add the text that was passed to this function to the message log
  CString csTemp(text);
  ((CNeroFiddlesDlg*)pUserData)->AppendString("Log line:" + csTemp);
  return;
}

void NERO_CALLBACK_ATTR CNeroFiddlesDlg::SetPhaseCallback(void *pUserData, const char *text)
{
  // display the current phase the burn process is currently going through
  CString csTemp(text);
  ((CNeroFiddlesDlg*)pUserData)->AppendString("Phase: " + csTemp);
  return;
}

void CNeroFiddlesDlg::NeroAPIFree()
{
  // free the resources that have been used

  // make sure there is something to free so we do not run into an exception
  if (pndiDeviceInfos)
  {
    NeroFreeMem(pndiDeviceInfos);
  }

  // nothing to check before calling these functions

  NeroClearErrors();
  if(NeroDone())
  {
	  AfxMessageBox("Detected memory leaks in NeroFiddles");
  }

  NeroAPIGlueDone();

  return;
}

void CNeroFiddlesDlg::OnOK() 
{
  // TODO: Add extra validation here

  // user decides to quit by pressing "OK"

  NeroAPIFree();
  
  CDialog::OnOK();
}

void CNeroFiddlesDlg::OnCancel() 
{
  // TODO: Add extra cleanup here

  // user decides to quit by pressing "Cancel"
  // we handle this like the "OK" button

  NeroAPIFree();
  
  CDialog::OnCancel();
}

void CNeroFiddlesDlg::OnAbort() 
{
  // TODO: Add your control notification handler code here

  // nothing more required but setting the aborted flag

  mbAborted = true;
}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩高清一区二区| 一区二区三区日韩欧美精品 | www..com久久爱| 韩国欧美国产一区| 狠狠色综合日日| 国产资源在线一区| 国产一区中文字幕| 丁香网亚洲国际| 成人小视频免费在线观看| 国产999精品久久久久久| 欧美老人xxxx18| 91丨porny丨蝌蚪视频| 99视频精品在线| 色综合色综合色综合色综合色综合| 国产精品一区免费在线观看| 日韩国产高清在线| 麻豆精品在线视频| 经典一区二区三区| 成人av网站在线观看| av影院午夜一区| 在线国产亚洲欧美| 制服丝袜亚洲精品中文字幕| 欧美大尺度电影在线| 欧美激情一区二区| 亚洲乱码国产乱码精品精98午夜| 亚洲永久免费av| 日韩和欧美一区二区| 国产在线不卡视频| 不卡影院免费观看| 欧美日韩在线播放三区| 精品久久久影院| 欧美激情一二三区| 亚洲永久精品大片| 韩国理伦片一区二区三区在线播放| 成人app软件下载大全免费| 在线欧美日韩精品| 精品国产一区二区三区忘忧草| 日韩精品一区二| 中文字幕亚洲在| 天天做天天摸天天爽国产一区| 国产剧情在线观看一区二区| 91视频.com| 日韩午夜三级在线| 自拍偷在线精品自拍偷无码专区| 日韩在线a电影| 99久久久国产精品免费蜜臀| 欧美麻豆精品久久久久久| 国产成人在线视频网站| www.爱久久.com| 51精品久久久久久久蜜臀| 亚洲视频免费在线观看| 日本欧美一区二区在线观看| 国产精品99久久久久久有的能看 | 99精品偷自拍| 欧美午夜影院一区| 9191久久久久久久久久久| 中文字幕中文乱码欧美一区二区| 亚洲精品视频在线看| 精品一区二区免费看| 一本色道久久综合亚洲aⅴ蜜桃 | 在线观看日韩毛片| 久久天天做天天爱综合色| 亚洲超碰精品一区二区| 成人在线综合网| 日韩亚洲欧美中文三级| 亚洲综合一二区| 粉嫩av一区二区三区| 日韩欧美国产综合| 亚洲国产一区视频| aaa亚洲精品一二三区| 精品乱码亚洲一区二区不卡| 亚洲一区成人在线| 99视频一区二区三区| 久久久91精品国产一区二区精品| 日本中文字幕一区| 欧美日韩中字一区| 综合久久综合久久| 成人av网站在线观看免费| 久久综合久色欧美综合狠狠| 日本系列欧美系列| 欧美性xxxxxx少妇| 亚洲欧美日韩一区二区| 国产91高潮流白浆在线麻豆| ww亚洲ww在线观看国产| 日韩不卡在线观看日韩不卡视频| 精品视频1区2区| 亚洲精品乱码久久久久久日本蜜臀| 国产成人aaaa| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 在线亚洲高清视频| 成人欧美一区二区三区小说 | 精品久久久久久久久久久院品网| 午夜精品在线看| 欧美精品日韩综合在线| 一区二区三区蜜桃| 欧美视频日韩视频| 亚洲影院理伦片| 欧美色涩在线第一页| 一个色妞综合视频在线观看| 色成人在线视频| 亚洲综合色婷婷| 欧洲精品中文字幕| 亚洲国产精品一区二区久久| 欧美午夜寂寞影院| 亚洲成人一区二区| 欧美一区二区免费| 九九精品视频在线看| 欧美精品一区二区三区四区| 欧美一区二区日韩一区二区| 日韩av中文字幕一区二区| 日韩欧美资源站| 国产精品影视天天线| 国产精品人成在线观看免费| 美洲天堂一区二卡三卡四卡视频| 欧美日韩中文字幕精品| 国产亚洲欧美激情| www一区二区| 欧洲国内综合视频| 91色在线porny| 一区二区三区在线高清| 9191成人精品久久| 欧美性做爰猛烈叫床潮| 国产盗摄精品一区二区三区在线 | 国产视频在线观看一区二区三区 | 美女视频黄 久久| 日韩精品一区二区三区中文不卡| 久99久精品视频免费观看| 久久久99免费| 99久久精品免费看| 亚洲一区二区三区国产| 欧美一区二区三区在线观看| 国产一区二区0| 亚洲欧美电影院| 欧美高清一级片在线| 国产一区二区0| 一区二区三区四区五区视频在线观看 | 色8久久精品久久久久久蜜| 日韩—二三区免费观看av| 久久久精品tv| 91福利在线导航| 久久99精品久久久久久国产越南 | 成人国产一区二区三区精品| 亚洲影视资源网| 精品国产一区二区三区av性色| 成人午夜短视频| 香港成人在线视频| 国产欧美精品一区二区三区四区 | 欧洲av一区二区嗯嗯嗯啊| 麻豆精品一区二区综合av| 中文字幕在线视频一区| 欧美在线一区二区| 韩国视频一区二区| 亚洲男人的天堂网| 日韩天堂在线观看| 91亚洲永久精品| 久久精品999| 亚洲精品成人少妇| 久久精品视频一区二区| 欧美日韩一区二区电影| 成人午夜在线视频| 久久99久久精品| 亚洲国产美国国产综合一区二区| 欧美激情在线看| 欧美一卡二卡三卡四卡| 国产精品色在线观看| 欧美精品日韩一区| 91丝袜美女网| 国产成人av电影在线| 男男视频亚洲欧美| 综合久久久久综合| 国产午夜精品一区二区 | 亚洲电影在线免费观看| 日韩一区欧美小说| 国产日韩综合av| 精品日韩一区二区三区| 欧美挠脚心视频网站| 99在线精品免费| 成人综合婷婷国产精品久久 | 日韩免费福利电影在线观看| 欧美日韩精品欧美日韩精品一| www.亚洲免费av| 国产91露脸合集magnet| 国产乱码精品一区二区三| 蜜臀久久99精品久久久久宅男| 亚洲福利一区二区三区| 亚洲蜜臀av乱码久久精品蜜桃| 日本一区二区三区四区在线视频| 日韩欧美国产电影| 91精品综合久久久久久| 欧美自拍偷拍一区| 色综合久久综合| 91丨九色丨黑人外教| 99视频在线精品| 99久久99精品久久久久久| 国产成人久久精品77777最新版本| 国产一区二三区好的| 精品一区二区三区香蕉蜜桃| 美女性感视频久久| 久久99久久精品| 国模一区二区三区白浆|