ReactOS  0.4.14-dev-77-gd9e7c48
COpenWithMenu.cpp File Reference
#include "precomp.h"
Include dependency graph for COpenWithMenu.cpp:

Go to the source code of this file.

Classes

class  COpenWithList
 
struct  COpenWithList::SApp
 
struct  COpenWithList::_LANGANDCODEPAGE
 
class  COpenWithDialog
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell)
 
EXTERN_C BOOL PathIsExeW (LPCWSTR lpszPath)
 
HRESULT WINAPI SHOpenWithDialog (HWND hwndParent, const OPENASINFO *poainfo)
 

Function Documentation

◆ PathIsExeW()

EXTERN_C BOOL PathIsExeW ( LPCWSTR  lpszPath)

Definition at line 195 of file shellpath.c.

196 {
197  LPCWSTR lpszExtension = PathGetExtensionW(lpszPath);
198  int i;
199  static const WCHAR lpszExtensions[][4] =
200  {{'e','x','e','\0'}, {'c','o','m','\0'}, {'p','i','f','\0'},
201  {'c','m','d','\0'}, {'b','a','t','\0'}, {'s','c','f','\0'},
202  {'s','c','r','\0'}, {'\0'} };
203 
204  TRACE("path=%s\n",debugstr_w(lpszPath));
205 
206  for(i=0; lpszExtensions[i][0]; i++)
207  if (!strcmpiW(lpszExtension,lpszExtensions[i])) return TRUE;
208 
209  return FALSE;
210 }
#define TRUE
Definition: types.h:120
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define strcmpiW(s1, s2)
Definition: unicode.h:39
static LPWSTR PathGetExtensionW(LPCWSTR lpszPath)
Definition: shellpath.c:90

Referenced by COpenWithMenu::Initialize().

◆ SHOpenWithDialog()

HRESULT WINAPI SHOpenWithDialog ( HWND  hwndParent,
const OPENASINFO poainfo 
)

Definition at line 1408 of file COpenWithMenu.cpp.

1409 {
1410  INT_PTR ret;
1411 
1412  TRACE("SHOpenWithDialog hwndParent %p poainfo %p\n", hwndParent, poainfo);
1413 
1415 
1416  if (poainfo->pcszClass == NULL && poainfo->pcszFile == NULL)
1417  return E_FAIL;
1418 
1419  COpenWithDialog pDialog(poainfo);
1420 
1421  if (pDialog.IsNoOpen(hwndParent))
1422  return S_OK;
1423 
1425  COpenWithDialog::DialogProc, (LPARAM)&pDialog);
1426 
1427  if (ret == (INT_PTR)-1)
1428  {
1429  ERR("Failed to create dialog: %u\n", GetLastError());
1430  return E_FAIL;
1431  }
1432 
1433  return S_OK;
1434 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
LPCWSTR pcszFile
Definition: shlobj.h:2462
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define IDD_OPEN_WITH
Definition: shresdef.h:436
int32_t INT_PTR
Definition: typedefs.h:62
#define E_FAIL
Definition: ddrawi.h:102
LPCWSTR pcszClass
Definition: shlobj.h:2463
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
smooth NULL
Definition: ftsmooth.c:416
static HWND hwndParent
Definition: cryptui.c:300
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
VOID WINAPI InitCommonControls(void)
Definition: commctrl.c:863
static INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)

Referenced by FolderOptionsFileTypesDlg(), CFileDefExt::GeneralPageProc(), COpenWithMenu::InvokeCommand(), and OpenAs_RunDLLW().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell  )