⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wshfun.h

📁 大量windows shell编程例子
💻 H
字号:
// WshFun.h : Declaration of the CWshFun

#ifndef __WSHFUN_H_
#define __WSHFUN_H_

#include "resource.h"       // main symbols

const int MAXBUFSIZE = 32768;
const LPTSTR EXECUTEHOOK = __TEXT("c:\\showhook.ini");

/////////////////////////////////////////////////////////////////////////////
// CWshFun
class ATL_NO_VTABLE CWshFun : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CWshFun, &CLSID_WshFun>,
	public IDispatchImpl<IWshFun, &IID_IWshFun, &LIBID_WSHMORELib>
{
public:
	CWshFun()
	{
	}

DECLARE_REGISTRY_RESOURCEID(IDR_WSHFUN)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CWshFun)
	COM_INTERFACE_ENTRY(IWshFun)
	COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()

// IWshFun
public:
	STDMETHOD(AddExecuteHook)(/*[in]*/ BSTR bShortcut, /*[in]*/ BSTR bExeFile);
	STDMETHOD(FindNextValue)(/*[out, retval]*/ BSTR* pbRetVal);
	STDMETHOD(FindFirstValue)(/*[in]*/ long hk, /*[in]*/ BSTR bRegPath, /*[out, retval]*/ BSTR* pbRetVal);
	STDMETHOD(FindNextKey)(/*[out, retval]*/ BSTR* pbRetVal);
	STDMETHOD(FindFirstKey)(/*[in]*/ long hk, /*[in]*/ BSTR bRegPath, /*[out, retval]*/ BSTR* pbRetVal);
	STDMETHOD(BrowseForIcon)(/*[in]*/ BSTR bFile, /*[out, retval]*/ BSTR* pbRetVal);
	STDMETHOD(FormatDrive)(/*[in]*/ int iDrive);
	STDMETHOD(PasteText)(/*[out, retval]*/ BSTR* pbRetVal);
	STDMETHOD(CopyText)(/*[in]*/ BSTR bText);
private:
	DWORD GetNthValue(long hk, BSTR bRegPath, int iIndex, BSTR* pbRetVal);
	DWORD GetNthKey(long hk, BSTR bRegPath, int iIndex, BSTR* pbRetVal);
};

#endif //__WSHFUN_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -