CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: No IID_

  1. #1
    Join Date
    Jul 2010
    Posts
    31

    Question No IID_

    Quote Originally Posted by ahmd View Post
    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

  2. #2
    Join Date
    Jul 2010
    Posts
    31

    Re: No IID_

    as It is not listed in msdn, I mean it also doesn't appear in any header file

  3. #3
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    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
  •  





Click Here to Expand Forum to Full Width

Featured