【问题标题】:How do I call ICDBurn::GetRecorderDriveLetter() in VS2008 C++? (Solving XP CD write to root)如何在 VS2008 C++ 中调用 ICDBurn::GetRecorderDriveLetter()? (解决XP CD写入root)
【发布时间】:2011-04-28 22:53:06
【问题描述】:

我正在尝试实施中给出的解决方案

GetSaveFileName() not returning path of CD burning staging area on XP

我正在尝试在 VS2008 C++ 中实现这一点。 ICDBurn::GetRecorderDriveLetter() 方法不是静态的,因此在上述答案中不能称为书面 (ICDBurn::GetRecorderDriveLetter)。 ICDBurn 不能被实例化,因为它是一个抽象类。如何从 C++ 调用 ICDBurn::GetRecorderDriveLetter()

【问题讨论】:

    标签: winapi visual-c++ windows-xp cd-burning cd-rom


    【解决方案1】:

    您需要先创建 COM 对象。

    ICDBurn* pICDBurn;
    HRESULT hr = CoCreateInstance(CLSID_CDBurn, NULL,CLSCTX_INPROC_SERVER,IID_ICDBurn,(LPVOID*)&pICDBurn);
    if (SUCCEEDED(hr))
    {
    
    // do something ...
    pICDBurn->Release();
    
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-06-23
      • 1970-01-01
      • 2010-09-06
      • 1970-01-01
      • 2020-03-29
      • 2019-08-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多