用创建桌面快捷方式的的方法可以实现功能 
但是和标准的网页快捷方式不一样 如何能创建标准的网页快捷方式比如
IE7 
文件 -> 发送 ->  桌面快捷方式 生成的这种

解决方案 »

  1.   

    创建网页快捷方式的扩展名为url
    如www.wantsoft.com.url
    -----------------------------
    http://www.wantsoft.com 
    qq群:3730223
    隐形者软件代码交流博客 
    -----------------------------
      

  2.   

    创建网页快捷方式的扩展名为url
    如www.wantsoft.com.url
    -----------------------------
    http://www.wantsoft.com 
    qq群:3730223
    隐形者软件代码交流博客 
    -----------------------------
      

  3.   

    #include <windows.h>
    #include <intshcut.h>HRESULT CreateShortcutToURL(LPCSTR pszURL, LPCSTR pszLinkFile);int main()
    {
      CoInitialize(NULL);
      HRESULT hRes = CreateShortcutToURL("http://support.microsoft.com","c:\\mssupport.url");
      if (SUCCEEDED(hRes))
      {
        // do something...
      }
      CoUninitialize();
      return 0;
    }HRESULT CreateShortcutToURL(LPCSTR pszURL, LPCSTR pszLinkFile)
    {
      HRESULT hRes;
       IUniformResourceLocator *pURL = NULL;  // Create an IUniformResourceLocator object
      hRes = CoCreateInstance (CLSID_InternetShortcut, NULL, 
        CLSCTX_INPROC_SERVER, IID_IUniformResourceLocator, (LPVOID*) &pURL);
      if (SUCCEEDED(hRes))
      {
        IPersistFile *pPF = NULL;    hRes = pURL->SetURL(pszURL, 0);    if (SUCCEEDED(hRes))
        {
          WCHAR wsz [MAX_PATH];   // buffer for Unicode string      // Ensure that the string consists of ANSI characters.
          MultiByteToWideChar (CP_ACP, 0, pszLinkFile, -1, wsz, MAX_PATH);      hRes = pURL->QueryInterface (IID_IPersistFile, (void **)&pPF);
          if (SUCCEEDED(hRes))
          {   
            // Save the shortcut via the IPersistFile::Save member function.
            hRes = pPF->Save (wsz, TRUE);        // Release the pointer to IPersistFile.
            pPF->Release ();
          }
        }
        // Release the pointer to IUniformResourceLocator
        pURL->Release ();
      }
      return hRes;
    }