如何在VS2008 C ++中调用ICDBurn :: GetRecorderDriveLetter()? (解决XP CD写入根目录) [英] How do I call ICDBurn::GetRecorderDriveLetter() in VS2008 C++? (Solving XP CD write to root)

查看:174
本文介绍了如何在VS2008 C ++中调用ICDBurn :: GetRecorderDriveLetter()? (解决XP CD写入根目录)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实施

GetSaveFileName()不返回路径XP上的CD刻录暂存区

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

I'm trying to implement this in VS2008 C++. The ICDBurn::GetRecorderDriveLetter() method is not static and thus cannot be called as written (ICDBurn::GetRecorderDriveLetter) in the above answer. ICDBurn can't be instantiated because it's an abstract class. How do I call ICDBurn::GetRecorderDriveLetter() from C++?

推荐答案

您需要先创建COM对象.

You need to create the COM object first.

ICDBurn* pICDBurn;
HRESULT hr = CoCreateInstance(CLSID_CDBurn, NULL,CLSCTX_INPROC_SERVER,IID_ICDBurn,(LPVOID*)&pICDBurn);
if (SUCCEEDED(hr))
{

// do something ...
pICDBurn->Release();

}

这篇关于如何在VS2008 C ++中调用ICDBurn :: GetRecorderDriveLetter()? (解决XP CD写入根目录)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆