《ShellAPI.h》由会员分享,可在线阅读,更多相关《ShellAPI.h(36页珍藏版)》请在金锄头文库上搜索。
1、/* * shellapi.h - SHELL.DLL functions, types, and definitions * * Copyright (c) Microsoft Corporation. All rights reserved. * */#ifndef _INC_SHELLAPI#define _INC_SHELLAPI#include / Define API decoration for direct importing of DLL references./#ifndef WINSHELLAPI#if !defined(_SHELL32_)#define WINSHEL
2、LAPI DECLSPEC_IMPORT#else#define WINSHELLAPI#endif#endif / WINSHELLAPI#ifndef SHSTDAPI#if !defined(_SHELL32_)#define SHSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE#define SHSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE#else#define SHSTDAPI STDAPI#define SHSTDAPI_(type) STDAPI_
3、(type)#endif#endif / SHSTDAPI#ifndef SHDOCAPI#if !defined(_SHDOCVW_)#define SHDOCAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE#define SHDOCAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE#else#define SHDOCAPI STDAPI#define SHDOCAPI_(type) STDAPI_(type)#endif#endif / SHDOCAPI#if !defined
4、(_WIN64)#include #endif#ifdef _cplusplusextern C /* Assume C declarations for C+ */#endif /* _cplusplus */DECLARE_HANDLE(HDROP);_success(return != 0)SHSTDAPI_(UINT) DragQueryFileA(_in HDROP hDrop, _in UINT iFile, _out_ecount_opt(cch) LPSTR lpszFile, _in UINT cch);_success(return != 0)SHSTDAPI_(UINT)
5、 DragQueryFileW(_in HDROP hDrop, _in UINT iFile, _out_ecount_opt(cch) LPWSTR lpszFile, _in UINT cch);#ifdef UNICODE#define DragQueryFile DragQueryFileW#else#define DragQueryFile DragQueryFileA#endif / !UNICODESHSTDAPI_(BOOL) DragQueryPoint(_in HDROP hDrop,_out LPPOINT lppt);SHSTDAPI_(void) DragFinis
6、h(_in HDROP hDrop);SHSTDAPI_(void) DragAcceptFiles(_in HWND hWnd, _in BOOL fAccept);SHSTDAPI_(HINSTANCE) ShellExecuteA(_in_opt HWND hwnd, _in_opt LPCSTR lpOperation, _in LPCSTR lpFile, _in_opt LPCSTR lpParameters,_in_opt LPCSTR lpDirectory, _in INT nShowCmd);SHSTDAPI_(HINSTANCE) ShellExecuteW(_in_op
7、t HWND hwnd, _in_opt LPCWSTR lpOperation, _in LPCWSTR lpFile, _in_opt LPCWSTR lpParameters,_in_opt LPCWSTR lpDirectory, _in INT nShowCmd);#ifdef UNICODE#define ShellExecute ShellExecuteW#else#define ShellExecute ShellExecuteA#endif / !UNICODE_success(return 32) / SE_ERR_DLLNOTFOUNDSHSTDAPI_(HINSTANC
8、E) FindExecutableA(_in LPCSTR lpFile, _in_opt LPCSTR lpDirectory, _out_ecount(MAX_PATH) LPSTR lpResult);_success(return 32) / SE_ERR_DLLNOTFOUNDSHSTDAPI_(HINSTANCE) FindExecutableW(_in LPCWSTR lpFile, _in_opt LPCWSTR lpDirectory, _out_ecount(MAX_PATH) LPWSTR lpResult);#ifdef UNICODE#define FindExecu
9、table FindExecutableW#else#define FindExecutable FindExecutableA#endif / !UNICODESHSTDAPI_(LPWSTR *) CommandLineToArgvW(_in LPCWSTR lpCmdLine, _out int* pNumArgs);SHSTDAPI_(INT) ShellAboutA(_in_opt HWND hWnd, _in LPCSTR szApp, _in_opt LPCSTR szOtherStuff, _in_opt HICON hIcon);SHSTDAPI_(INT) ShellAbo
10、utW(_in_opt HWND hWnd, _in LPCWSTR szApp, _in_opt LPCWSTR szOtherStuff, _in_opt HICON hIcon);#ifdef UNICODE#define ShellAbout ShellAboutW#else#define ShellAbout ShellAboutA#endif / !UNICODESHSTDAPI_(HICON) DuplicateIcon(_reserved HINSTANCE hInst, _in HICON hIcon);SHSTDAPI_(HICON) ExtractAssociatedIc
11、onA(_reserved HINSTANCE hInst, _inout_ecount(128) LPSTR pszIconPath, _inout WORD *piIcon);SHSTDAPI_(HICON) ExtractAssociatedIconW(_reserved HINSTANCE hInst, _inout_ecount(128) LPWSTR pszIconPath, _inout WORD *piIcon);#ifdef UNICODE#define ExtractAssociatedIcon ExtractAssociatedIconW#else#define Extr
12、actAssociatedIcon ExtractAssociatedIconA#endif / !UNICODESHSTDAPI_(HICON) ExtractAssociatedIconExA(_reserved HINSTANCE hInst, _inout_ecount(128) LPSTR pszIconPath, _inout WORD *piIconIndex, _inout WORD *piIconId);SHSTDAPI_(HICON) ExtractAssociatedIconExW(_reserved HINSTANCE hInst, _inout_ecount(128)
13、 LPWSTR pszIconPath, _inout WORD *piIconIndex, _inout WORD *piIconId);#ifdef UNICODE#define ExtractAssociatedIconEx ExtractAssociatedIconExW#else#define ExtractAssociatedIconEx ExtractAssociatedIconExA#endif / !UNICODESHSTDAPI_(HICON) ExtractIconA(_reserved HINSTANCE hInst, _in LPCSTR lpszExeFileNam
14、e, _in UINT nIconIndex);SHSTDAPI_(HICON) ExtractIconW(_reserved HINSTANCE hInst, _in LPCWSTR lpszExeFileName, _in UINT nIconIndex);#ifdef UNICODE#define ExtractIcon ExtractIconW#else#define ExtractIcon ExtractIconA#endif / !UNICODE#if(WINVER = 0x0400)typedef struct _DRAGINFOA UINT uSize; /* init with sizeof(DRAGINFO) */POINT pt;BOOL fNC;LPSTR lpFileList;DWORD grfKeyState; DRAGINFOA, *LPDRAGINFOA;typedef struct _DRAGINFOW UINT uSize; /* init with sizeof