ReactOS  0.4.15-dev-1200-gc3b3fcd
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 244 of file shellpath.c.

245 {
246  LPCWSTR lpszExtension = PathGetExtensionW(lpszPath);
247  int i;
248  static const WCHAR lpszExtensions[][4] =
249  {{'e','x','e','\0'}, {'c','o','m','\0'}, {'p','i','f','\0'},
250  {'c','m','d','\0'}, {'b','a','t','\0'}, {'s','c','f','\0'},
251  {'s','c','r','\0'}, {'\0'} };
252 
253  TRACE("path=%s\n",debugstr_w(lpszPath));
254 
255  for(i=0; lpszExtensions[i][0]; i++)
256  if (!strcmpiW(lpszExtension,lpszExtensions[i])) return TRUE;
257 
258  return FALSE;
259 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define TRUE
Definition: types.h:120
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 FALSE
Definition: types.h:117
#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:139

Referenced by COpenWithMenu::Initialize().

◆ SHOpenWithDialog()

HRESULT WINAPI SHOpenWithDialog ( HWND  hwndParent,
const OPENASINFO poainfo 
)

Definition at line 1409 of file COpenWithMenu.cpp.

1410 {
1411  INT_PTR ret;
1412 
1413  TRACE("SHOpenWithDialog hwndParent %p poainfo %p\n", hwndParent, poainfo);
1414 
1416 
1417  if (poainfo->pcszClass == NULL && poainfo->pcszFile == NULL)
1418  return E_FAIL;
1419 
1420  COpenWithDialog pDialog(poainfo);
1421 
1422  if (pDialog.IsNoOpen(hwndParent))
1423  return S_OK;
1424 
1426  COpenWithDialog::DialogProc, (LPARAM)&pDialog);
1427 
1428  if (ret == (INT_PTR)-1)
1429  {
1430  ERR("Failed to create dialog: %u\n", GetLastError());
1431  return E_FAIL;
1432  }
1433 
1434  return S_OK;
1435 }
#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:2498
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
#define IDD_OPEN_WITH
Definition: shresdef.h:462
int32_t INT_PTR
Definition: typedefs.h:64
#define E_FAIL
Definition: ddrawi.h:102
LPCWSTR pcszClass
Definition: shlobj.h:2499
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:110
#define S_OK
Definition: intsafe.h:51
#define shell32_hInstance
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  )