IShellLink::SetPath

ショートカットリンク先の実体ファイルパスをセットする場合には、IShellLink::SetPathを使う。

IShellLinkA::SetPath (shobjidl_core.h) - Win32 apps | Microsoft Docs

とりあえずセットはしてみる。
(ただ、これだけで完成ではない。)

一応、確認のために、IShellLink::GetPathでセット出来ているか確認してる。

PathRemoveFileSpec使うのでまたこれ必要
PathRemoveFileSpec使うのでまたこれ必要

PathRemoveFileSpec使うのでまたこれ必要。

リンク順かな
リンク順かな

リンク順かな。

WindowsSDKが前過ぎるので
WindowsSDKが前過ぎるので

WindowsSDKが前過ぎるので、

後ろに移動
後ろに移動

後ろに移動。

こんな内容のtest.txtを置いて
こんな内容のtest.txtを置いて

こんな内容のtest.txtを置いて、

tszSrcPath = c:\Project\Cloud\github.com\Sample\com\IShellLink\SetPath\src\IShel
lLink\debug\test.txt
pShellLink success!, pShellLink = 0x00531888
tszPath = C:\Project\Cloud\github.com\Sample\com\IShellLink\SetPath\src\IShellLi
nk\debug\test.txt
続行するには何かキーを押してください . . .

セット出来てる。

Sample/com/IShellLink/SetPath/src/IShellLink at master · bg1bgst333/Sample · GitHub