久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='AljoY'></bdo><ul id='AljoY'></ul>

    1. <i id='AljoY'><tr id='AljoY'><dt id='AljoY'><q id='AljoY'><span id='AljoY'><b id='AljoY'><form id='AljoY'><ins id='AljoY'></ins><ul id='AljoY'></ul><sub id='AljoY'></sub></form><legend id='AljoY'></legend><bdo id='AljoY'><pre id='AljoY'><center id='AljoY'></center></pre></bdo></b><th id='AljoY'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='AljoY'><tfoot id='AljoY'></tfoot><dl id='AljoY'><fieldset id='AljoY'></fieldset></dl></div>
      <tfoot id='AljoY'></tfoot>
      1. <legend id='AljoY'><style id='AljoY'><dir id='AljoY'><q id='AljoY'></q></dir></style></legend>

        <small id='AljoY'></small><noframes id='AljoY'>

        如何使用 Win32 以編程方式創(chuàng)建快捷方式

        How to programmatically create a shortcut using Win32(如何使用 Win32 以編程方式創(chuàng)建快捷方式)
            <tbody id='fWei1'></tbody>

              <small id='fWei1'></small><noframes id='fWei1'>

              <legend id='fWei1'><style id='fWei1'><dir id='fWei1'><q id='fWei1'></q></dir></style></legend>
                • <bdo id='fWei1'></bdo><ul id='fWei1'></ul>
                • <i id='fWei1'><tr id='fWei1'><dt id='fWei1'><q id='fWei1'><span id='fWei1'><b id='fWei1'><form id='fWei1'><ins id='fWei1'></ins><ul id='fWei1'></ul><sub id='fWei1'></sub></form><legend id='fWei1'></legend><bdo id='fWei1'><pre id='fWei1'><center id='fWei1'></center></pre></bdo></b><th id='fWei1'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='fWei1'><tfoot id='fWei1'></tfoot><dl id='fWei1'><fieldset id='fWei1'></fieldset></dl></div>

                  <tfoot id='fWei1'></tfoot>

                  本文介紹了如何使用 Win32 以編程方式創(chuàng)建快捷方式的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我需要使用 C++ 以編程方式創(chuàng)建快捷方式.

                  I need to programmatically create a shortcut using C++.

                  如何使用 Win32 SDK 執(zhí)行此操作?

                  How can I do this using Win32 SDK?

                  哪些 API 函數(shù)可用于此目的?

                  What API function can be used for this purpose?

                  推薦答案

                  嘗試 Windows Shell 鏈接. 此頁面還包含一個 C++ 示例.描述性代碼段:

                  Try Windows Shell Links. This page also contains a C++ example. Descriptive Snippet:

                  使用外殼鏈接

                  本節(jié)包含的示例演示如何創(chuàng)建和解決來自基于 Win32 的快捷方式應(yīng)用.本節(jié)假設(shè)您熟悉Win32、C++和OLECOM 編程.

                  This section contains examples that demonstrate how to create and resolve shortcuts from within a Win32-based application. This section assumes you are familiar with Win32, C++, and OLE COM programming.

                  添加代碼示例以防鏈接失效(并且 MSDN 鏈接經(jīng)常失效.)

                  Adding the code sample in case the link dies (and MSDN links do die often.)

                  // CreateLink - Uses the Shell's IShellLink and IPersistFile interfaces 
                  //              to create and store a shortcut to the specified object. 
                  //
                  // Returns the result of calling the member functions of the interfaces. 
                  //
                  // Parameters:
                  // lpszPathObj  - Address of a buffer that contains the path of the object,
                  //                including the file name.
                  // lpszPathLink - Address of a buffer that contains the path where the 
                  //                Shell link is to be stored, including the file name.
                  // lpszDesc     - Address of a buffer that contains a description of the 
                  //                Shell link, stored in the Comment field of the link
                  //                properties.
                  
                  #include "stdafx.h"
                  #include "windows.h"
                  #include "winnls.h"
                  #include "shobjidl.h"
                  #include "objbase.h"
                  #include "objidl.h"
                  #include "shlguid.h"
                  
                  HRESULT CreateLink(LPCWSTR lpszPathObj, LPCSTR lpszPathLink, LPCWSTR lpszDesc) 
                  { 
                      HRESULT hres; 
                      IShellLink* psl; 
                  
                      // Get a pointer to the IShellLink interface. It is assumed that CoInitialize
                      // has already been called.
                      hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*)&psl); 
                      if (SUCCEEDED(hres)) 
                      { 
                          IPersistFile* ppf; 
                  
                          // Set the path to the shortcut target and add the description. 
                          psl->SetPath(lpszPathObj); 
                          psl->SetDescription(lpszDesc); 
                  
                          // Query IShellLink for the IPersistFile interface, used for saving the 
                          // shortcut in persistent storage. 
                          hres = psl->QueryInterface(IID_IPersistFile, (LPVOID*)&ppf); 
                  
                          if (SUCCEEDED(hres)) 
                          { 
                              WCHAR wsz[MAX_PATH]; 
                  
                              // Ensure that the string is Unicode. 
                              MultiByteToWideChar(CP_ACP, 0, lpszPathLink, -1, wsz, MAX_PATH); 
                  
                              // Save the link by calling IPersistFile::Save. 
                              hres = ppf->Save(wsz, TRUE); 
                              ppf->Release(); 
                          } 
                          psl->Release(); 
                      } 
                      return hres; 
                  

                  這篇關(guān)于如何使用 Win32 以編程方式創(chuàng)建快捷方式的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  In what ways do C++ exceptions slow down code when there are no exceptions thown?(當(dāng)沒有異常時,C++ 異常會以何種方式減慢代碼速度?)
                  Why catch an exception as reference-to-const?(為什么要捕獲異常作為對 const 的引用?)
                  When and how should I use exception handling?(我應(yīng)該何時以及如何使用異常處理?)
                  Scope of exception object in C++(C++中異常對象的范圍)
                  Catching exceptions from a constructor#39;s initializer list(從構(gòu)造函數(shù)的初始化列表中捕獲異常)
                  Difference between C++03 throw() specifier C++11 noexcept(C++03 throw() 說明符 C++11 noexcept 之間的區(qū)別)

                    <bdo id='VIZeY'></bdo><ul id='VIZeY'></ul>

                      <legend id='VIZeY'><style id='VIZeY'><dir id='VIZeY'><q id='VIZeY'></q></dir></style></legend>

                      <small id='VIZeY'></small><noframes id='VIZeY'>

                      • <tfoot id='VIZeY'></tfoot>
                        <i id='VIZeY'><tr id='VIZeY'><dt id='VIZeY'><q id='VIZeY'><span id='VIZeY'><b id='VIZeY'><form id='VIZeY'><ins id='VIZeY'></ins><ul id='VIZeY'></ul><sub id='VIZeY'></sub></form><legend id='VIZeY'></legend><bdo id='VIZeY'><pre id='VIZeY'><center id='VIZeY'></center></pre></bdo></b><th id='VIZeY'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='VIZeY'><tfoot id='VIZeY'></tfoot><dl id='VIZeY'><fieldset id='VIZeY'></fieldset></dl></div>

                            <tbody id='VIZeY'></tbody>

                            主站蜘蛛池模板: 国产一区二区三区久久久久久久久 | 成人三级视频 | 日韩欧美在线免费观看 | 亚洲国产aⅴ成人精品无吗 综合国产在线 | 黄频免费 | 天天操天天拍 | 在线观看成人 | 欧洲妇女成人淫片aaa视频 | 中文字幕a√ | 久久99精品久久久久久 | 日韩三级在线观看 | 国产一区二区三区四区三区四 | 四虎影院在线观看av | 天天色综 | 国产日产精品一区二区三区四区 | 色婷婷一区二区三区四区 | 91精品国产一区二区三区动漫 | 色就干 | 人人射人人插 | 四虎影院在线播放 | 国产精品s色 | 日韩二三区| 久久av一区二区三区 | 国产伦精品一区二区三区精品视频 | 欧美一区二区二区 | 91精品久久久久久久久久小网站 | 欧美日韩中文字幕在线播放 | 91精品久久久久久久久 | 国产大毛片 | 精品一二三区视频 | 91精品国产乱码麻豆白嫩 | 国产精品国产馆在线真实露脸 | 精品国产一区二区三区四区在线 | 亚洲一区二区av在线 | 亚洲人成人一区二区在线观看 | 又黑又粗又长的欧美一区 | 国产丝袜一区二区三区免费视频 | 国产h在线 | 欧美亚洲视频 | 97偷拍视频| 亚洲精品乱码久久久久久蜜桃91 |