开发者

How do I call ICDBurn::GetRecorderDriveLetter() in VS2008 C++? (Solving XP CD write to root)

开发者 https://www.devze.com 2023-03-02 00:12 出处:网络
I am trying to implement the solution given in开发者_运维技巧 GetSaveFileName() not returning path of CD burning staging area on XP

I am trying to implement the solution given in开发者_运维技巧

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

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++?


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();

}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号