您的位置:首页 > 其它

wm中安装软件时创建中国快捷方式

2010-09-02 08:51 274 查看
C:/Program Files/Windows Mobile 6 SDK/Samples/Common/CPP/Win32/SetupDLL

// **************************************************************************
// Function Name: Install_Exit
//
// Purpose: processes the push message.
//
// Arguments:
// IN HWND hwndParent handle to the parent window
// IN LPCTSTR pszInstallDir name of the user-selected install directory of the application
//
// Return Values:
// codeINSTALL_EXIT
// returns install status
//
// Description:
// Register query client with the PushRouter as part of installation.
// Only the first two parameters really count.
// **************************************************************************
SETUP_API codeINSTALL_EXIT Install_Exit(
HWND hwndParent,
LPCTSTR pszInstallDir, // final install directory
WORD cFailedDirs,
WORD cFailedFiles,
WORD cFailedRegKeys,
WORD cFailedRegVals,
WORD cFailedShortcuts
)

在这个函数里面创建中文快捷方式:
if(SHGetSpecialFolderPath(NULL, szLinkPath, CSIDL_PROGRAMS,FALSE))
{
_tcscat(szLinkPath, _T("中文快捷方式.lnk"));

DeleteFile(szLinkPath);

if(SHCreateShortcut(szLinkPath, szAppPath) == FALSE)
{
//MessageBox(NULL, _T("安装快捷方式失败"), _T("提示"), MB_OK);
}
}
else
{
//MessageBox(NULL, _T("获取系统文件路径失败"), _T("提示"), MB_OK);
}

在安装工程里面设置 CE Setup Dll 为:SetupDLL.dll
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: