-
September 1st, 2010, 01:08 PM
#1
No IID_
Originally Posted by ahmd
Code:
SHGetSpecialFolderLocation(hWnd, CSIDL_DESKTOPDIRECTORY, &pidl);
SHGetPathFromIDList(pidl, path);
CString pPathLinkTo;
pPathLinkTo = path + LinkName;
//Use 'path' to create a shortcut
IShellLink* psl;
CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink,
reinterpret_cast<void**>(&psl));
psl->SetPath(pPathLinkTo);
IPersistFile* ppf;
psl->QueryInterface(IID_IPersistFile, reinterpret_cast<void**>(&ppf));
ppf->Save(pSaveLinkTo, TRUE);
ppf->Release();
psl->Release();
I borrow ahmd's code to make a question about CLSID_ShellLink
The steps I started to learn about COM are done as above
COInittialise->CoCreate->QueryInterface etc
There are interfaces that have CLSID_ as CLSID_ShellLink above
but there are classes not having such CLSID_ specified in msdn, what should I do to complete the steps to call methods from the interfaces I'd like to use ?
Thank you
-
September 1st, 2010, 01:21 PM
#2
Re: No IID_
as It is not listed in msdn, I mean it also doesn't appear in any header file
-
September 1st, 2010, 03:07 PM
#3
Re: No IID_
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|