//MyCommon.h
#pragma once
enum ShortcutType
{
BOTH_SHORTCUT = 0,
ONLY_DESKTOPSHORTCUT,
ONLY_MENUSHORTCUT,
NO_SHORTCUT
};
enum ExitType
{
EN_INITIALIZE_FAILED = -100,
};
//MyWinInstall.h
#pragma once
#include "MyCommon.h"
class CMyWinInstall
{
public:
CMyWinInstall(void);
virtual ~CMyWinInstall(void);
public:
int AddShortcut();
void SetExePath(CString t_strPathName);
void SetShortcutType(ShortcutType t_eShortcutType);
private:
void AddDesktopShortcut();
void AddMenuShortcut();
void GetLinkPath(char *&t_strPath);
void SaveShortcut(char *&t_strPath, wchar_t *&t_pWSZ);
void GetUniLinkName(char *&t_strPath, wchar_t *&t_pWSZ);
int InitializeCOM();
int UnInitializeCOM();
private:
ShortcutType m_eShortcutType; //快捷方式类型
CString m_strFileName; //文件名
CString m_strPathName; //可执行文件路径
CString m_strLinkN