ReactOS  0.4.15-dev-1377-ga59cecd
shell.c File Reference
#include "wshom_private.h"
#include "wshom.h"
#include "shellapi.h"
#include "shlobj.h"
#include "dispex.h"
#include "wine/debug.h"
#include "wine/heap.h"
Include dependency graph for shell.c:

Go to the source code of this file.

Classes

struct  WshShellImpl
 
struct  WshCollection
 
struct  WshShortcut
 
struct  WshEnvironment
 
struct  WshExecImpl
 
struct  popup_thread_param
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (wshom)
 
static WshCollectionimpl_from_IWshCollection (IWshCollection *iface)
 
static WshShortcutimpl_from_IWshShortcut (IWshShortcut *iface)
 
static WshEnvironmentimpl_from_IWshEnvironment (IWshEnvironment *iface)
 
static WshExecImplimpl_from_IWshExec (IWshExec *iface)
 
static HRESULT WINAPI WshExec_QueryInterface (IWshExec *iface, REFIID riid, void **obj)
 
static ULONG WINAPI WshExec_AddRef (IWshExec *iface)
 
static ULONG WINAPI WshExec_Release (IWshExec *iface)
 
static HRESULT WINAPI WshExec_GetTypeInfoCount (IWshExec *iface, UINT *pctinfo)
 
static HRESULT WINAPI WshExec_GetTypeInfo (IWshExec *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI WshExec_GetIDsOfNames (IWshExec *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI WshExec_Invoke (IWshExec *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI WshExec_get_Status (IWshExec *iface, WshExecStatus *status)
 
static HRESULT WINAPI WshExec_get_StdIn (IWshExec *iface, ITextStream **stream)
 
static HRESULT WINAPI WshExec_get_StdOut (IWshExec *iface, ITextStream **stream)
 
static HRESULT WINAPI WshExec_get_StdErr (IWshExec *iface, ITextStream **stream)
 
static HRESULT WINAPI WshExec_get_ProcessID (IWshExec *iface, DWORD *pid)
 
static HRESULT WINAPI WshExec_get_ExitCode (IWshExec *iface, DWORD *code)
 
static BOOL CALLBACK enum_thread_wnd_proc (HWND hwnd, LPARAM lParam)
 
static HRESULT WINAPI WshExec_Terminate (IWshExec *iface)
 
static HRESULT WshExec_create (BSTR command, IWshExec **ret)
 
static HRESULT WINAPI WshEnvironment_QueryInterface (IWshEnvironment *iface, REFIID riid, void **obj)
 
static ULONG WINAPI WshEnvironment_AddRef (IWshEnvironment *iface)
 
static ULONG WINAPI WshEnvironment_Release (IWshEnvironment *iface)
 
static HRESULT WINAPI WshEnvironment_GetTypeInfoCount (IWshEnvironment *iface, UINT *pctinfo)
 
static HRESULT WINAPI WshEnvironment_GetTypeInfo (IWshEnvironment *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI WshEnvironment_GetIDsOfNames (IWshEnvironment *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI WshEnvironment_Invoke (IWshEnvironment *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI WshEnvironment_get_Item (IWshEnvironment *iface, BSTR name, BSTR *value)
 
static HRESULT WINAPI WshEnvironment_put_Item (IWshEnvironment *iface, BSTR name, BSTR value)
 
static HRESULT WINAPI WshEnvironment_Count (IWshEnvironment *iface, LONG *count)
 
static HRESULT WINAPI WshEnvironment_get_length (IWshEnvironment *iface, LONG *len)
 
static HRESULT WINAPI WshEnvironment__NewEnum (IWshEnvironment *iface, IUnknown **penum)
 
static HRESULT WINAPI WshEnvironment_Remove (IWshEnvironment *iface, BSTR name)
 
static HRESULT WshEnvironment_Create (IWshEnvironment **env)
 
static HRESULT WINAPI WshCollection_QueryInterface (IWshCollection *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI WshCollection_AddRef (IWshCollection *iface)
 
static ULONG WINAPI WshCollection_Release (IWshCollection *iface)
 
static HRESULT WINAPI WshCollection_GetTypeInfoCount (IWshCollection *iface, UINT *pctinfo)
 
static HRESULT WINAPI WshCollection_GetTypeInfo (IWshCollection *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI WshCollection_GetIDsOfNames (IWshCollection *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI WshCollection_Invoke (IWshCollection *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI WshCollection_Item (IWshCollection *iface, VARIANT *index, VARIANT *value)
 
static HRESULT WINAPI WshCollection_Count (IWshCollection *iface, LONG *count)
 
static HRESULT WINAPI WshCollection_get_length (IWshCollection *iface, LONG *count)
 
static HRESULT WINAPI WshCollection__NewEnum (IWshCollection *iface, IUnknown **Enum)
 
static HRESULT WshCollection_Create (IWshCollection **collection)
 
static HRESULT WINAPI WshShortcut_QueryInterface (IWshShortcut *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI WshShortcut_AddRef (IWshShortcut *iface)
 
static ULONG WINAPI WshShortcut_Release (IWshShortcut *iface)
 
static HRESULT WINAPI WshShortcut_GetTypeInfoCount (IWshShortcut *iface, UINT *pctinfo)
 
static HRESULT WINAPI WshShortcut_GetTypeInfo (IWshShortcut *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI WshShortcut_GetIDsOfNames (IWshShortcut *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI WshShortcut_Invoke (IWshShortcut *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI WshShortcut_get_FullName (IWshShortcut *iface, BSTR *name)
 
static HRESULT WINAPI WshShortcut_get_Arguments (IWshShortcut *iface, BSTR *Arguments)
 
static HRESULT WINAPI WshShortcut_put_Arguments (IWshShortcut *iface, BSTR Arguments)
 
static HRESULT WINAPI WshShortcut_get_Description (IWshShortcut *iface, BSTR *Description)
 
static HRESULT WINAPI WshShortcut_put_Description (IWshShortcut *iface, BSTR Description)
 
static HRESULT WINAPI WshShortcut_get_Hotkey (IWshShortcut *iface, BSTR *Hotkey)
 
static HRESULT WINAPI WshShortcut_put_Hotkey (IWshShortcut *iface, BSTR Hotkey)
 
static HRESULT WINAPI WshShortcut_get_IconLocation (IWshShortcut *iface, BSTR *IconPath)
 
static HRESULT WINAPI WshShortcut_put_IconLocation (IWshShortcut *iface, BSTR IconPath)
 
static HRESULT WINAPI WshShortcut_put_RelativePath (IWshShortcut *iface, BSTR rhs)
 
static HRESULT WINAPI WshShortcut_get_TargetPath (IWshShortcut *iface, BSTR *Path)
 
static HRESULT WINAPI WshShortcut_put_TargetPath (IWshShortcut *iface, BSTR Path)
 
static HRESULT WINAPI WshShortcut_get_WindowStyle (IWshShortcut *iface, int *ShowCmd)
 
static HRESULT WINAPI WshShortcut_put_WindowStyle (IWshShortcut *iface, int ShowCmd)
 
static HRESULT WINAPI WshShortcut_get_WorkingDirectory (IWshShortcut *iface, BSTR *WorkingDirectory)
 
static HRESULT WINAPI WshShortcut_put_WorkingDirectory (IWshShortcut *iface, BSTR WorkingDirectory)
 
static HRESULT WINAPI WshShortcut_Load (IWshShortcut *iface, BSTR PathLink)
 
static HRESULT WINAPI WshShortcut_Save (IWshShortcut *iface)
 
static HRESULT WshShortcut_Create (const WCHAR *path, IDispatch **shortcut)
 
static HRESULT WINAPI WshShell3_QueryInterface (IWshShell3 *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI WshShell3_AddRef (IWshShell3 *iface)
 
static ULONG WINAPI WshShell3_Release (IWshShell3 *iface)
 
static HRESULT WINAPI WshShell3_GetTypeInfoCount (IWshShell3 *iface, UINT *pctinfo)
 
static HRESULT WINAPI WshShell3_GetTypeInfo (IWshShell3 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI WshShell3_GetIDsOfNames (IWshShell3 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI WshShell3_Invoke (IWshShell3 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI WshShell3_get_SpecialFolders (IWshShell3 *iface, IWshCollection **folders)
 
static HRESULT WINAPI WshShell3_get_Environment (IWshShell3 *iface, VARIANT *type, IWshEnvironment **env)
 
static BOOL is_optional_argument (const VARIANT *arg)
 
static WCHARsplit_command (BSTR cmd, WCHAR **params)
 
static HRESULT WINAPI WshShell3_Run (IWshShell3 *iface, BSTR cmd, VARIANT *style, VARIANT *wait, DWORD *exit_code)
 
static DWORD WINAPI popup_thread_proc (void *arg)
 
static HRESULT WINAPI WshShell3_Popup (IWshShell3 *iface, BSTR text, VARIANT *seconds_to_wait, VARIANT *title, VARIANT *type, int *button)
 
static HRESULT WINAPI WshShell3_CreateShortcut (IWshShell3 *iface, BSTR PathLink, IDispatch **Shortcut)
 
static HRESULT WINAPI WshShell3_ExpandEnvironmentStrings (IWshShell3 *iface, BSTR Src, BSTR *Dst)
 
static HKEY get_root_key (const WCHAR *path)
 
static HRESULT split_reg_path (const WCHAR *path, WCHAR **subkey, WCHAR **value)
 
static HRESULT WINAPI WshShell3_RegRead (IWshShell3 *iface, BSTR name, VARIANT *value)
 
static HRESULT WINAPI WshShell3_RegWrite (IWshShell3 *iface, BSTR name, VARIANT *value, VARIANT *type)
 
static HRESULT WINAPI WshShell3_RegDelete (IWshShell3 *iface, BSTR Name)
 
static HRESULT WINAPI WshShell3_LogEvent (IWshShell3 *iface, VARIANT *Type, BSTR Message, BSTR Target, VARIANT_BOOL *out_Success)
 
static HRESULT WINAPI WshShell3_AppActivate (IWshShell3 *iface, VARIANT *App, VARIANT *Wait, VARIANT_BOOL *out_Success)
 
static HRESULT WINAPI WshShell3_SendKeys (IWshShell3 *iface, BSTR Keys, VARIANT *Wait)
 
static HRESULT WINAPI WshShell3_Exec (IWshShell3 *iface, BSTR command, IWshExec **ret)
 
static HRESULT WINAPI WshShell3_get_CurrentDirectory (IWshShell3 *iface, BSTR *dir)
 
static HRESULT WINAPI WshShell3_put_CurrentDirectory (IWshShell3 *iface, BSTR dir)
 
HRESULT WINAPI WshShellFactory_CreateInstance (IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
 

Variables

static WshShellImpl WshShell3
 
static const IWshExecVtbl WshExecVtbl
 
static const IWshEnvironmentVtbl WshEnvironmentVtbl
 
static const IWshCollectionVtbl WshCollectionVtbl
 
static const IWshShortcutVtbl WshShortcutVtbl
 
static const IWshShell3Vtbl WshShell3Vtbl
 

Function Documentation

◆ enum_thread_wnd_proc()

static BOOL CALLBACK enum_thread_wnd_proc ( HWND  hwnd,
LPARAM  lParam 
)
static

Definition at line 275 of file shell.c.

276 {
277  INT *count = (INT*)lParam;
278 
279  (*count)++;
280  PostMessageW(hwnd, WM_CLOSE, 0, 0);
281  /* try to send it to all windows, even if failed for some */
282  return TRUE;
283 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
GLuint GLuint GLsizei count
Definition: gl.h:1545
int32_t INT
Definition: typedefs.h:58
#define WM_CLOSE
Definition: winuser.h:1603
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPARAM lParam
Definition: combotst.c:139

Referenced by WshExec_Terminate().

◆ get_root_key()

static HKEY get_root_key ( const WCHAR path)
static

Definition at line 1432 of file shell.c.

1433 {
1434  static const struct {
1435  const WCHAR full[20];
1436  const WCHAR abbrev[5];
1437  HKEY hkey;
1438  } rootkeys[] = {
1439  { {'H','K','E','Y','_','C','U','R','R','E','N','T','_','U','S','E','R',0}, {'H','K','C','U',0}, HKEY_CURRENT_USER },
1440  { {'H','K','E','Y','_','L','O','C','A','L','_','M','A','C','H','I','N','E',0}, {'H','K','L','M',0}, HKEY_LOCAL_MACHINE },
1441  { {'H','K','E','Y','_','C','L','A','S','S','E','S','_','R','O','O','T',0}, {'H','K','C','R',0}, HKEY_CLASSES_ROOT },
1442  { {'H','K','E','Y','_','U','S','E','R','S',0}, {0}, HKEY_USERS },
1443  { {'H','K','E','Y','_','C','U','R','R','E','N','T','_','C','O','N','F','I','G',0}, {0}, HKEY_CURRENT_CONFIG }
1444  };
1445  int i;
1446 
1447  for (i = 0; i < ARRAY_SIZE(rootkeys); i++) {
1448  if (!wcsncmp(path, rootkeys[i].full, lstrlenW(rootkeys[i].full)))
1449  return rootkeys[i].hkey;
1450  if (rootkeys[i].abbrev[0] && !wcsncmp(path, rootkeys[i].abbrev, lstrlenW(rootkeys[i].abbrev)))
1451  return rootkeys[i].hkey;
1452  }
1453 
1454  return NULL;
1455 }
#define HKEY_USERS
Definition: winreg.h:13
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define HKEY_CURRENT_CONFIG
Definition: winreg.h:15
#define lstrlenW
Definition: compat.h:609
__wchar_t WCHAR
Definition: xmlstorage.h:180
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
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 ARRAY_SIZE(a)
Definition: main.h:24
#define NULL
Definition: types.h:112
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by WshShell3_RegRead(), and WshShell3_RegWrite().

◆ impl_from_IWshCollection()

static WshCollection* impl_from_IWshCollection ( IWshCollection *  iface)
inlinestatic

Definition at line 74 of file shell.c.

75 {
76  return CONTAINING_RECORD(iface, WshCollection, IWshCollection_iface);
77 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by WshCollection__NewEnum(), WshCollection_AddRef(), WshCollection_Count(), WshCollection_get_length(), WshCollection_GetIDsOfNames(), WshCollection_GetTypeInfo(), WshCollection_GetTypeInfoCount(), WshCollection_Invoke(), WshCollection_Item(), WshCollection_QueryInterface(), and WshCollection_Release().

◆ impl_from_IWshEnvironment()

static WshEnvironment* impl_from_IWshEnvironment ( IWshEnvironment *  iface)
inlinestatic

Definition at line 84 of file shell.c.

85 {
86  return CONTAINING_RECORD(iface, WshEnvironment, IWshEnvironment_iface);
87 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by WshEnvironment__NewEnum(), WshEnvironment_AddRef(), WshEnvironment_Count(), WshEnvironment_get_Item(), WshEnvironment_get_length(), WshEnvironment_GetIDsOfNames(), WshEnvironment_GetTypeInfo(), WshEnvironment_GetTypeInfoCount(), WshEnvironment_Invoke(), WshEnvironment_put_Item(), WshEnvironment_QueryInterface(), WshEnvironment_Release(), and WshEnvironment_Remove().

◆ impl_from_IWshExec()

static WshExecImpl* impl_from_IWshExec ( IWshExec *  iface)
inlinestatic

Definition at line 89 of file shell.c.

90 {
91  return CONTAINING_RECORD(iface, WshExecImpl, IWshExec_iface);
92 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by WshExec_AddRef(), WshExec_get_ExitCode(), WshExec_get_ProcessID(), WshExec_get_Status(), WshExec_get_StdErr(), WshExec_get_StdIn(), WshExec_get_StdOut(), WshExec_GetIDsOfNames(), WshExec_GetTypeInfo(), WshExec_GetTypeInfoCount(), WshExec_Invoke(), WshExec_QueryInterface(), WshExec_Release(), and WshExec_Terminate().

◆ impl_from_IWshShortcut()

◆ is_optional_argument()

static BOOL is_optional_argument ( const VARIANT arg)
inlinestatic

Definition at line 1221 of file shell.c.

1222 {
1223  return V_VT(arg) == VT_ERROR && V_ERROR(arg) == DISP_E_PARAMNOTFOUND;
1224 }
#define DISP_E_PARAMNOTFOUND
Definition: winerror.h:2513
#define V_VT(A)
Definition: oleauto.h:211
#define V_ERROR(A)
Definition: oleauto.h:241

Referenced by popup_thread_proc(), WshShell3_Popup(), WshShell3_RegWrite(), and WshShell3_Run().

◆ popup_thread_proc()

static DWORD WINAPI popup_thread_proc ( void arg)
static

Definition at line 1323 of file shell.c.

1324 {
1325  static const WCHAR defaulttitleW[] = {'W','i','n','d','o','w','s',' ','S','c','r','i','p','t',' ','H','o','s','t',0};
1326  struct popup_thread_param *param = (struct popup_thread_param *)arg;
1327 
1328  param->button = MessageBoxW(NULL, param->text, is_optional_argument(&param->title) ?
1329  defaulttitleW : V_BSTR(&param->title), V_I4(&param->type));
1330  return 0;
1331 }
static BOOL is_optional_argument(const VARIANT *arg)
Definition: shell.c:1221
#define V_I4(A)
Definition: oleauto.h:247
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLfloat param
Definition: glext.h:5796
#define V_BSTR(A)
Definition: oleauto.h:226
#define NULL
Definition: types.h:112

Referenced by WshShell3_Popup().

◆ split_command()

static WCHAR* split_command ( BSTR  cmd,
WCHAR **  params 
)
static

Definition at line 1226 of file shell.c.

1227 {
1228  WCHAR *ret, *ptr;
1229  BOOL in_quotes = FALSE;
1230 
1231  if (!(ret = heap_alloc((lstrlenW(cmd) + 1) * sizeof(WCHAR)))) return NULL;
1232  lstrcpyW( ret, cmd );
1233 
1234  *params = NULL;
1235  for (ptr = ret; *ptr; ptr++)
1236  {
1237  if (*ptr == '"') in_quotes = !in_quotes;
1238  else if (*ptr == ' ' && !in_quotes)
1239  {
1240  *ptr = 0;
1241  *params = ptr + 1;
1242  break;
1243  }
1244  }
1245 
1246  return ret;
1247 }
Definition: ftp_var.h:139
#define lstrlenW
Definition: compat.h:609
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define FALSE
Definition: types.h:117
GLenum const GLfloat * params
Definition: glext.h:5645
unsigned int BOOL
Definition: ntddk_ex.h:94
static PVOID ptr
Definition: dispmode.c:27
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret
#define lstrcpyW
Definition: compat.h:608
#define NULL
Definition: types.h:112

Referenced by WshShell3_Run().

◆ split_reg_path()

static HRESULT split_reg_path ( const WCHAR path,
WCHAR **  subkey,
WCHAR **  value 
)
static

Definition at line 1458 of file shell.c.

1459 {
1460  *value = NULL;
1461 
1462  /* at least one separator should be present */
1463  *subkey = wcschr(path, '\\');
1464  if (!*subkey)
1466 
1467  /* default value or not */
1468  if ((*subkey)[lstrlenW(*subkey)-1] == '\\') {
1469  (*subkey)++;
1470  *value = NULL;
1471  }
1472  else {
1473  *value = wcsrchr(*subkey, '\\');
1474  if (*value - *subkey > 1) {
1475  unsigned int len = *value - *subkey - 1;
1476  WCHAR *ret;
1477 
1478  ret = heap_alloc((len + 1)*sizeof(WCHAR));
1479  if (!ret)
1480  return E_OUTOFMEMORY;
1481 
1482  memcpy(ret, *subkey + 1, len*sizeof(WCHAR));
1483  ret[len] = 0;
1484  *subkey = ret;
1485  }
1486  (*value)++;
1487  }
1488 
1489  return S_OK;
1490 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define lstrlenW
Definition: compat.h:609
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
#define wcsrchr
Definition: compat.h:16
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:106

Referenced by WshShell3_RegRead(), and WshShell3_RegWrite().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wshom  )

◆ WshCollection__NewEnum()

static HRESULT WINAPI WshCollection__NewEnum ( IWshCollection *  iface,
IUnknown **  Enum 
)
static

Definition at line 705 of file shell.c.

706 {
708  FIXME("(%p)->(%p): stub\n", This, Enum);
709  return E_NOTIMPL;
710 }
static WshCollection * impl_from_IWshCollection(IWshCollection *iface)
Definition: shell.c:74
#define FIXME(fmt,...)
Definition: debug.h:111
MIXER_STATUS Enum(IN PVOID EnumContext, IN ULONG DeviceIndex, OUT LPWSTR *DeviceName, OUT PHANDLE OutHandle, OUT PHANDLE OutKey)
Definition: mmixer.c:220
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshCollection_AddRef()

static ULONG WINAPI WshCollection_AddRef ( IWshCollection *  iface)
static

Definition at line 566 of file shell.c.

567 {
570  TRACE("(%p) ref = %d\n", This, ref);
571  return ref;
572 }
Definition: send.c:48
static WshCollection * impl_from_IWshCollection(IWshCollection *iface)
Definition: shell.c:74
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53

◆ WshCollection_Count()

static HRESULT WINAPI WshCollection_Count ( IWshCollection *  iface,
LONG count 
)
static

Definition at line 691 of file shell.c.

692 {
694  FIXME("(%p)->(%p): stub\n", This, count);
695  return E_NOTIMPL;
696 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
static WshCollection * impl_from_IWshCollection(IWshCollection *iface)
Definition: shell.c:74
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshCollection_Create()

static HRESULT WshCollection_Create ( IWshCollection **  collection)
static

Definition at line 726 of file shell.c.

727 {
729 
730  This = heap_alloc(sizeof(*This));
731  if (!This) return E_OUTOFMEMORY;
732 
733  This->IWshCollection_iface.lpVtbl = &WshCollectionVtbl;
734  This->ref = 1;
735 
736  init_classinfo(&IID_IWshCollection, (IUnknown *)&This->IWshCollection_iface, &This->classinfo);
737  *collection = &This->IWshCollection_iface;
738 
739  return S_OK;
740 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const IWshCollectionVtbl WshCollectionVtbl
Definition: shell.c:712
void init_classinfo(const GUID *guid, IUnknown *outer, struct provideclassinfo *classinfo)
Definition: scrrun.c:232
#define S_OK
Definition: intsafe.h:51
static ICollection collection
Definition: typelib.c:184

Referenced by WshShell3_get_SpecialFolders().

◆ WshCollection_get_length()

static HRESULT WINAPI WshCollection_get_length ( IWshCollection *  iface,
LONG count 
)
static

Definition at line 698 of file shell.c.

699 {
701  FIXME("(%p)->(%p): stub\n", This, count);
702  return E_NOTIMPL;
703 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
static WshCollection * impl_from_IWshCollection(IWshCollection *iface)
Definition: shell.c:74
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshCollection_GetIDsOfNames()

static HRESULT WINAPI WshCollection_GetIDsOfNames ( IWshCollection *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 601 of file shell.c.

603 {
606  HRESULT hr;
607 
608  TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
609 
611  if(SUCCEEDED(hr))
612  {
613  hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
614  ITypeInfo_Release(typeinfo);
615  }
616 
617  return hr;
618 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
static WshCollection * impl_from_IWshCollection(IWshCollection *iface)
Definition: shell.c:74
if SUCCEEDED(hr)
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109

◆ WshCollection_GetTypeInfo()

static HRESULT WINAPI WshCollection_GetTypeInfo ( IWshCollection *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 594 of file shell.c.

595 {
597  TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
598  return get_typeinfo(IWshCollection_tid, ppTInfo);
599 }
static WshCollection * impl_from_IWshCollection(IWshCollection *iface)
Definition: shell.c:74
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define TRACE(s)
Definition: solgame.cpp:4

◆ WshCollection_GetTypeInfoCount()

static HRESULT WINAPI WshCollection_GetTypeInfoCount ( IWshCollection *  iface,
UINT pctinfo 
)
static

Definition at line 586 of file shell.c.

587 {
589  TRACE("(%p)->(%p)\n", This, pctinfo);
590  *pctinfo = 1;
591  return S_OK;
592 }
static WshCollection * impl_from_IWshCollection(IWshCollection *iface)
Definition: shell.c:74
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ WshCollection_Invoke()

static HRESULT WINAPI WshCollection_Invoke ( IWshCollection *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 620 of file shell.c.

622 {
625  HRESULT hr;
626 
627  TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
628  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
629 
631  if(SUCCEEDED(hr))
632  {
633  hr = ITypeInfo_Invoke(typeinfo, &This->IWshCollection_iface, dispIdMember, wFlags,
634  pDispParams, pVarResult, pExcepInfo, puArgErr);
635  ITypeInfo_Release(typeinfo);
636  }
637 
638  return hr;
639 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
static WshCollection * impl_from_IWshCollection(IWshCollection *iface)
Definition: shell.c:74
if SUCCEEDED(hr)
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534

◆ WshCollection_Item()

static HRESULT WINAPI WshCollection_Item ( IWshCollection *  iface,
VARIANT index,
VARIANT value 
)
static

Definition at line 641 of file shell.c.

642 {
644  static const WCHAR allusersdesktopW[] = {'A','l','l','U','s','e','r','s','D','e','s','k','t','o','p',0};
645  static const WCHAR allusersprogramsW[] = {'A','l','l','U','s','e','r','s','P','r','o','g','r','a','m','s',0};
646  static const WCHAR desktopW[] = {'D','e','s','k','t','o','p',0};
647  PIDLIST_ABSOLUTE pidl;
648  WCHAR pathW[MAX_PATH];
649  int kind = 0;
650  BSTR folder;
651  HRESULT hr;
652 
653  TRACE("(%p)->(%s %p)\n", This, debugstr_variant(index), value);
654 
655  if (V_VT(index) != VT_BSTR)
656  {
657  FIXME("only BSTR index supported, got %d\n", V_VT(index));
658  return E_NOTIMPL;
659  }
660 
661  folder = V_BSTR(index);
662  if (!wcsicmp(folder, desktopW))
663  kind = CSIDL_DESKTOP;
664  else if (!wcsicmp(folder, allusersdesktopW))
666  else if (!wcsicmp(folder, allusersprogramsW))
667  kind = CSIDL_COMMON_PROGRAMS;
668  else
669  {
670  FIXME("folder kind %s not supported\n", debugstr_w(folder));
671  return E_NOTIMPL;
672  }
673 
674  hr = SHGetSpecialFolderLocation(NULL, kind, &pidl);
675  if (hr != S_OK) return hr;
676 
677  if (SHGetPathFromIDListW(pidl, pathW))
678  {
679  V_VT(value) = VT_BSTR;
680  V_BSTR(value) = SysAllocString(pathW);
682  }
683  else
684  hr = E_FAIL;
685 
686  CoTaskMemFree(pidl);
687 
688  return hr;
689 }
Definition: fci.c:115
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
HRESULT hr
Definition: shlfolder.c:183
#define CSIDL_COMMON_DESKTOPDIRECTORY
Definition: shlobj.h:2036
#define CSIDL_DESKTOP
Definition: shlobj.h:2012
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1294
OLECHAR * BSTR
Definition: compat.h:2152
#define E_FAIL
Definition: ddrawi.h:102
#define CSIDL_COMMON_PROGRAMS
Definition: shlobj.h:2034
static WshCollection * impl_from_IWshCollection(IWshCollection *iface)
Definition: shell.c:74
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
GLuint index
Definition: glext.h:6031
struct CFFOLDER folder
Definition: fdi.c:102
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:2830
LONG HRESULT
Definition: typedefs.h:79
#define MAX_PATH
Definition: compat.h:34
#define wcsicmp
Definition: compat.h:15
static const WCHAR desktopW[]
Definition: main.c:46
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:51
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112

◆ WshCollection_QueryInterface()

static HRESULT WINAPI WshCollection_QueryInterface ( IWshCollection *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 540 of file shell.c.

541 {
543 
544  TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv);
545 
546  if (IsEqualGUID(riid, &IID_IUnknown) ||
548  IsEqualGUID(riid, &IID_IWshCollection))
549  {
550  *ppv = iface;
551  }
553  {
554  *ppv = &This->classinfo.IProvideClassInfo_iface;
555  }
556  else {
557  FIXME("Unknown iface %s\n", debugstr_guid(riid));
558  *ppv = NULL;
559  return E_NOINTERFACE;
560  }
561 
562  IUnknown_AddRef((IUnknown*)*ppv);
563  return S_OK;
564 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static WshCollection * impl_from_IWshCollection(IWshCollection *iface)
Definition: shell.c:74
const GUID IID_IProvideClassInfo
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ WshCollection_Release()

static ULONG WINAPI WshCollection_Release ( IWshCollection *  iface)
static

Definition at line 574 of file shell.c.

575 {
578  TRACE("(%p) ref = %d\n", This, ref);
579 
580  if (!ref)
581  heap_free(This);
582 
583  return ref;
584 }
Definition: send.c:48
static WshCollection * impl_from_IWshCollection(IWshCollection *iface)
Definition: shell.c:74
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ WshEnvironment__NewEnum()

static HRESULT WINAPI WshEnvironment__NewEnum ( IWshEnvironment *  iface,
IUnknown **  penum 
)
static

Definition at line 494 of file shell.c.

495 {
497  FIXME("(%p)->(%p): stub\n", This, penum);
498  return E_NOTIMPL;
499 }
#define FIXME(fmt,...)
Definition: debug.h:111
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshEnvironment_AddRef()

static ULONG WINAPI WshEnvironment_AddRef ( IWshEnvironment *  iface)
static

Definition at line 375 of file shell.c.

376 {
379  TRACE("(%p) ref = %d\n", This, ref);
380  return ref;
381 }
Definition: send.c:48
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84
#define InterlockedIncrement
Definition: armddk.h:53

◆ WshEnvironment_Count()

static HRESULT WINAPI WshEnvironment_Count ( IWshEnvironment *  iface,
LONG count 
)
static

Definition at line 480 of file shell.c.

481 {
483  FIXME("(%p)->(%p): stub\n", This, count);
484  return E_NOTIMPL;
485 }
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define FIXME(fmt,...)
Definition: debug.h:111
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshEnvironment_Create()

static HRESULT WshEnvironment_Create ( IWshEnvironment **  env)
static

Definition at line 524 of file shell.c.

525 {
527 
528  This = heap_alloc(sizeof(*This));
529  if (!This) return E_OUTOFMEMORY;
530 
531  This->IWshEnvironment_iface.lpVtbl = &WshEnvironmentVtbl;
532  This->ref = 1;
533 
534  init_classinfo(&IID_IWshEnvironment, (IUnknown *)&This->IWshEnvironment_iface, &This->classinfo);
535  *env = &This->IWshEnvironment_iface;
536 
537  return S_OK;
538 }
static const IWshEnvironmentVtbl WshEnvironmentVtbl
Definition: shell.c:508
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
void init_classinfo(const GUID *guid, IUnknown *outer, struct provideclassinfo *classinfo)
Definition: scrrun.c:232
#define S_OK
Definition: intsafe.h:51
static LPCWSTR LPCWSTR LPCWSTR env
Definition: db.cpp:168

Referenced by WshShell3_get_Environment().

◆ WshEnvironment_get_Item()

static HRESULT WINAPI WshEnvironment_get_Item ( IWshEnvironment *  iface,
BSTR  name,
BSTR value 
)
static

Definition at line 450 of file shell.c.

451 {
453  DWORD len;
454 
455  TRACE("(%p)->(%s %p)\n", This, debugstr_w(name), value);
456 
457  if (!value)
458  return E_POINTER;
459 
461  if (len)
462  {
463  *value = SysAllocStringLen(NULL, len - 1);
464  if (*value)
466  }
467  else
469 
470  return *value ? S_OK : E_OUTOFMEMORY;
471 }
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
Definition: name.c:38
#define E_POINTER
Definition: winerror.h:2365
#define GetEnvironmentVariableW(x, y, z)
Definition: compat.h:614

◆ WshEnvironment_get_length()

static HRESULT WINAPI WshEnvironment_get_length ( IWshEnvironment *  iface,
LONG len 
)
static

Definition at line 487 of file shell.c.

488 {
490  FIXME("(%p)->(%p): stub\n", This, len);
491  return E_NOTIMPL;
492 }
#define FIXME(fmt,...)
Definition: debug.h:111
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84
GLenum GLsizei len
Definition: glext.h:6722
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshEnvironment_GetIDsOfNames()

static HRESULT WINAPI WshEnvironment_GetIDsOfNames ( IWshEnvironment *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 410 of file shell.c.

412 {
415  HRESULT hr;
416 
417  TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
418 
420  if(SUCCEEDED(hr))
421  {
422  hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
423  ITypeInfo_Release(typeinfo);
424  }
425 
426  return hr;
427 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
if SUCCEEDED(hr)
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84
LONG HRESULT
Definition: typedefs.h:79
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109

◆ WshEnvironment_GetTypeInfo()

static HRESULT WINAPI WshEnvironment_GetTypeInfo ( IWshEnvironment *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 403 of file shell.c.

404 {
406  TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
407  return get_typeinfo(IWshEnvironment_tid, ppTInfo);
408 }
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define TRACE(s)
Definition: solgame.cpp:4
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84

◆ WshEnvironment_GetTypeInfoCount()

static HRESULT WINAPI WshEnvironment_GetTypeInfoCount ( IWshEnvironment *  iface,
UINT pctinfo 
)
static

Definition at line 395 of file shell.c.

396 {
398  TRACE("(%p)->(%p)\n", This, pctinfo);
399  *pctinfo = 1;
400  return S_OK;
401 }
#define TRACE(s)
Definition: solgame.cpp:4
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84
#define S_OK
Definition: intsafe.h:51

◆ WshEnvironment_Invoke()

static HRESULT WINAPI WshEnvironment_Invoke ( IWshEnvironment *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 429 of file shell.c.

431 {
434  HRESULT hr;
435 
436  TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
437  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
438 
440  if(SUCCEEDED(hr))
441  {
442  hr = ITypeInfo_Invoke(typeinfo, &This->IWshEnvironment_iface, dispIdMember, wFlags,
443  pDispParams, pVarResult, pExcepInfo, puArgErr);
444  ITypeInfo_Release(typeinfo);
445  }
446 
447  return hr;
448 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
if SUCCEEDED(hr)
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84
LONG HRESULT
Definition: typedefs.h:79
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534

◆ WshEnvironment_put_Item()

static HRESULT WINAPI WshEnvironment_put_Item ( IWshEnvironment *  iface,
BSTR  name,
BSTR  value 
)
static

Definition at line 473 of file shell.c.

474 {
476  FIXME("(%p)->(%s %s): stub\n", This, debugstr_w(name), debugstr_w(value));
477  return E_NOTIMPL;
478 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: name.c:38

◆ WshEnvironment_QueryInterface()

static HRESULT WINAPI WshEnvironment_QueryInterface ( IWshEnvironment *  iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 349 of file shell.c.

350 {
352 
353  TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj);
354 
355  if (IsEqualGUID(riid, &IID_IUnknown) ||
357  IsEqualGUID(riid, &IID_IWshEnvironment))
358  {
359  *obj = iface;
360  }
362  {
363  *obj = &This->classinfo.IProvideClassInfo_iface;
364  }
365  else {
366  FIXME("Unknown iface %s\n", debugstr_guid(riid));
367  *obj = NULL;
368  return E_NOINTERFACE;
369  }
370 
371  IUnknown_AddRef((IUnknown*)*obj);
372  return S_OK;
373 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IProvideClassInfo
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84
const GUID IID_IUnknown
const GUID IID_IDispatch
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ WshEnvironment_Release()

static ULONG WINAPI WshEnvironment_Release ( IWshEnvironment *  iface)
static

Definition at line 383 of file shell.c.

384 {
387  TRACE("(%p) ref = %d\n", This, ref);
388 
389  if (!ref)
390  heap_free(This);
391 
392  return ref;
393 }
Definition: send.c:48
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84
#define InterlockedDecrement
Definition: armddk.h:52
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ WshEnvironment_Remove()

static HRESULT WINAPI WshEnvironment_Remove ( IWshEnvironment *  iface,
BSTR  name 
)
static

Definition at line 501 of file shell.c.

502 {
504  FIXME("(%p)->(%s): stub\n", This, debugstr_w(name));
505  return E_NOTIMPL;
506 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
static WshEnvironment * impl_from_IWshEnvironment(IWshEnvironment *iface)
Definition: shell.c:84
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: name.c:38

◆ WshExec_AddRef()

static ULONG WINAPI WshExec_AddRef ( IWshExec *  iface)
static

Definition at line 120 of file shell.c.

121 {
124  TRACE("(%p) ref = %d\n", This, ref);
125  return ref;
126 }
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
Definition: send.c:48
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53

◆ WshExec_create()

static HRESULT WshExec_create ( BSTR  command,
IWshExec **  ret 
)
static

Definition at line 325 of file shell.c.

326 {
327  STARTUPINFOW si = {0};
328  WshExecImpl *This;
329 
330  *ret = NULL;
331 
332  This = heap_alloc(sizeof(*This));
333  if (!This)
334  return E_OUTOFMEMORY;
335 
336  This->IWshExec_iface.lpVtbl = &WshExecVtbl;
337  This->ref = 1;
338 
339  if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, 0, NULL, NULL, &si, &This->info)) {
340  heap_free(This);
342  }
343 
344  init_classinfo(&CLSID_WshExec, (IUnknown *)&This->IWshExec_iface, &This->classinfo);
345  *ret = &This->IWshExec_iface;
346  return S_OK;
347 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FALSE
Definition: types.h:117
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4595
static const IWshExecVtbl WshExecVtbl
Definition: shell.c:308
void init_classinfo(const GUID *guid, IUnknown *outer, struct provideclassinfo *classinfo)
Definition: scrrun.c:232
int ret
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by WshShell3_Exec().

◆ WshExec_get_ExitCode()

static HRESULT WINAPI WshExec_get_ExitCode ( IWshExec *  iface,
DWORD code 
)
static

Definition at line 266 of file shell.c.

267 {
269 
270  FIXME("(%p)->(%p): stub\n", This, code);
271 
272  return E_NOTIMPL;
273 }
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
#define FIXME(fmt,...)
Definition: debug.h:111
Definition: inflate.c:139
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshExec_get_ProcessID()

static HRESULT WINAPI WshExec_get_ProcessID ( IWshExec *  iface,
DWORD pid 
)
static

Definition at line 253 of file shell.c.

254 {
256 
257  TRACE("(%p)->(%p)\n", This, pid);
258 
259  if (!pid)
260  return E_INVALIDARG;
261 
262  *pid = This->info.dwProcessId;
263  return S_OK;
264 }
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3835
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ WshExec_get_Status()

static HRESULT WINAPI WshExec_get_Status ( IWshExec *  iface,
WshExecStatus *  status 
)
static

Definition at line 198 of file shell.c.

199 {
201  DWORD code;
202 
203  TRACE("(%p)->(%p)\n", This, status);
204 
205  if (!status)
206  return E_INVALIDARG;
207 
208  if (!GetExitCodeProcess(This->info.hProcess, &code))
210 
211  switch (code)
212  {
213  case 0:
214  *status = WshFinished;
215  break;
216  case STILL_ACTIVE:
217  *status = WshRunning;
218  break;
219  default:
220  *status = WshFailed;
221  }
222 
223  return S_OK;
224 }
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
BOOL WINAPI GetExitCodeProcess(IN HANDLE hProcess, IN LPDWORD lpExitCode)
Definition: proc.c:1168
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define STILL_ACTIVE
Definition: winbase.h:230
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: inflate.c:139
int code
Definition: main.c:75
#define S_OK
Definition: intsafe.h:51
Definition: ps.c:97

◆ WshExec_get_StdErr()

static HRESULT WINAPI WshExec_get_StdErr ( IWshExec *  iface,
ITextStream **  stream 
)
static

Definition at line 244 of file shell.c.

245 {
247 
248  FIXME("(%p)->(%p): stub\n", This, stream);
249 
250  return E_NOTIMPL;
251 }
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
#define FIXME(fmt,...)
Definition: debug.h:111
Definition: parse.h:22
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshExec_get_StdIn()

static HRESULT WINAPI WshExec_get_StdIn ( IWshExec *  iface,
ITextStream **  stream 
)
static

Definition at line 226 of file shell.c.

227 {
229 
230  FIXME("(%p)->(%p): stub\n", This, stream);
231 
232  return E_NOTIMPL;
233 }
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
#define FIXME(fmt,...)
Definition: debug.h:111
Definition: parse.h:22
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshExec_get_StdOut()

static HRESULT WINAPI WshExec_get_StdOut ( IWshExec *  iface,
ITextStream **  stream 
)
static

Definition at line 235 of file shell.c.

236 {
238 
239  FIXME("(%p)->(%p): stub\n", This, stream);
240 
241  return E_NOTIMPL;
242 }
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
#define FIXME(fmt,...)
Definition: debug.h:111
Definition: parse.h:22
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshExec_GetIDsOfNames()

static HRESULT WINAPI WshExec_GetIDsOfNames ( IWshExec *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 158 of file shell.c.

160 {
163  HRESULT hr;
164 
165  TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
166 
168  if(SUCCEEDED(hr))
169  {
170  hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
171  ITypeInfo_Release(typeinfo);
172  }
173 
174  return hr;
175 }
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
if SUCCEEDED(hr)
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109

◆ WshExec_GetTypeInfo()

static HRESULT WINAPI WshExec_GetTypeInfo ( IWshExec *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 151 of file shell.c.

152 {
154  TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
155  return get_typeinfo(IWshExec_tid, ppTInfo);
156 }
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define TRACE(s)
Definition: solgame.cpp:4

◆ WshExec_GetTypeInfoCount()

static HRESULT WINAPI WshExec_GetTypeInfoCount ( IWshExec *  iface,
UINT pctinfo 
)
static

Definition at line 143 of file shell.c.

144 {
146  TRACE("(%p)->(%p)\n", This, pctinfo);
147  *pctinfo = 1;
148  return S_OK;
149 }
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ WshExec_Invoke()

static HRESULT WINAPI WshExec_Invoke ( IWshExec *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 177 of file shell.c.

179 {
182  HRESULT hr;
183 
184  TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
185  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
186 
188  if(SUCCEEDED(hr))
189  {
190  hr = ITypeInfo_Invoke(typeinfo, &This->IWshExec_iface, dispIdMember, wFlags,
191  pDispParams, pVarResult, pExcepInfo, puArgErr);
192  ITypeInfo_Release(typeinfo);
193  }
194 
195  return hr;
196 }
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
if SUCCEEDED(hr)
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534

◆ WshExec_QueryInterface()

static HRESULT WINAPI WshExec_QueryInterface ( IWshExec *  iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 94 of file shell.c.

95 {
97 
98  TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj);
99 
100  if (IsEqualGUID(riid, &IID_IDispatch) ||
101  IsEqualGUID(riid, &IID_IWshExec) ||
103  {
104  *obj = iface;
105  }
107  {
108  *obj = &This->classinfo.IProvideClassInfo_iface;
109  }
110  else {
111  FIXME("Unknown iface %s\n", debugstr_guid(riid));
112  *obj = NULL;
113  return E_NOINTERFACE;
114  }
115 
116  IUnknown_AddRef((IUnknown *)*obj);
117  return S_OK;
118 }
#define E_NOINTERFACE
Definition: winerror.h:2364
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
REFIID riid
Definition: precomp.h:44
const GUID IID_IProvideClassInfo
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ WshExec_Release()

static ULONG WINAPI WshExec_Release ( IWshExec *  iface)
static

Definition at line 128 of file shell.c.

129 {
132  TRACE("(%p) ref = %d\n", This, ref);
133 
134  if (!ref) {
135  CloseHandle(This->info.hThread);
136  CloseHandle(This->info.hProcess);
137  heap_free(This);
138  }
139 
140  return ref;
141 }
#define CloseHandle
Definition: compat.h:598
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
Definition: send.c:48
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ WshExec_Terminate()

static HRESULT WINAPI WshExec_Terminate ( IWshExec *  iface)
static

Definition at line 285 of file shell.c.

286 {
288  BOOL ret, kill = FALSE;
289  INT count = 0;
290 
291  TRACE("(%p)\n", This);
292 
293  ret = EnumThreadWindows(This->info.dwThreadId, enum_thread_wnd_proc, (LPARAM)&count);
294  if (ret && count) {
295  /* manual testing shows that it waits 2 seconds before forcing termination */
296  if (WaitForSingleObject(This->info.hProcess, 2000) != WAIT_OBJECT_0)
297  kill = TRUE;
298  }
299  else
300  kill = TRUE;
301 
302  if (kill)
303  TerminateProcess(This->info.hProcess, 0);
304 
305  return S_OK;
306 }
static WshExecImpl * impl_from_IWshExec(IWshExec *iface)
Definition: shell.c:89
#define TRUE
Definition: types.h:120
GLuint GLuint GLsizei count
Definition: gl.h:1545
BOOL WINAPI EnumThreadWindows(_In_ DWORD, _In_ WNDENUMPROC, _In_ LPARAM)
int32_t INT
Definition: typedefs.h:58
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
#define WAIT_OBJECT_0
Definition: winbase.h:387
static BOOL CALLBACK enum_thread_wnd_proc(HWND hwnd, LPARAM lParam)
Definition: shell.c:275
int ret
#define S_OK
Definition: intsafe.h:51
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
Definition: proc.c:1532

◆ WshShell3_AddRef()

static ULONG WINAPI WshShell3_AddRef ( IWshShell3 *  iface)
static

Definition at line 1146 of file shell.c.

1147 {
1148  TRACE("()\n");
1149  return 2;
1150 }
#define TRACE(s)
Definition: solgame.cpp:4

◆ WshShell3_AppActivate()

static HRESULT WINAPI WshShell3_AppActivate ( IWshShell3 *  iface,
VARIANT App,
VARIANT Wait,
VARIANT_BOOL out_Success 
)
static

Definition at line 1729 of file shell.c.

1730 {
1731  FIXME("(%s %s %p): stub\n", debugstr_variant(App), debugstr_variant(Wait), out_Success);
1732  return E_NOTIMPL;
1733 }
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:167
#define FIXME(fmt,...)
Definition: debug.h:111
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshShell3_CreateShortcut()

static HRESULT WINAPI WshShell3_CreateShortcut ( IWshShell3 *  iface,
BSTR  PathLink,
IDispatch **  Shortcut 
)
static

Definition at line 1404 of file shell.c.

1405 {
1406  TRACE("(%s %p)\n", debugstr_w(PathLink), Shortcut);
1407  return WshShortcut_Create(PathLink, Shortcut);
1408 }
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WshShortcut_Create(const WCHAR *path, IDispatch **shortcut)
Definition: shell.c:1079

◆ WshShell3_Exec()

static HRESULT WINAPI WshShell3_Exec ( IWshShell3 *  iface,
BSTR  command,
IWshExec **  ret 
)
static

Definition at line 1741 of file shell.c.

1742 {
1743  TRACE("(%s %p)\n", debugstr_w(command), ret);
1744 
1745  if (!ret)
1746  return E_POINTER;
1747 
1748  if (!command)
1749  return DISP_E_EXCEPTION;
1750 
1751  return WshExec_create(command, ret);
1752 }
#define DISP_E_EXCEPTION
Definition: winerror.h:2518
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
int ret
static HRESULT WshExec_create(BSTR command, IWshExec **ret)
Definition: shell.c:325
#define E_POINTER
Definition: winerror.h:2365

◆ WshShell3_ExpandEnvironmentStrings()

static HRESULT WINAPI WshShell3_ExpandEnvironmentStrings ( IWshShell3 *  iface,
BSTR  Src,
BSTR Dst 
)
static

Definition at line 1410 of file shell.c.

1411 {
1412  DWORD ret;
1413 
1414  TRACE("(%s %p)\n", debugstr_w(Src), Dst);
1415 
1416  if (!Src || !Dst) return E_POINTER;
1417 
1418  ret = ExpandEnvironmentStringsW(Src, NULL, 0);
1420  if (!*Dst) return E_OUTOFMEMORY;
1421 
1422  if (ExpandEnvironmentStringsW(Src, *Dst, ret))
1423  return S_OK;
1424  else
1425  {
1426  SysFreeString(*Dst);
1427  *Dst = NULL;
1428  return HRESULT_FROM_WIN32(GetLastError());
1429  }
1430 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define Dst
Definition: mesh.h:153
#define S_OK
Definition: intsafe.h:51
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define NULL
Definition: types.h:112
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519
#define E_POINTER
Definition: winerror.h:2365

◆ WshShell3_get_CurrentDirectory()

static HRESULT WINAPI WshShell3_get_CurrentDirectory ( IWshShell3 *  iface,
BSTR dir 
)
static

Definition at line 1754 of file shell.c.

1755 {
1756  DWORD ret;
1757 
1758  TRACE("(%p)\n", dir);
1759 
1761  if (!ret)
1762  return HRESULT_FROM_WIN32(GetLastError());
1763 
1764  *dir = SysAllocStringLen(NULL, ret-1);
1765  if (!*dir)
1766  return E_OUTOFMEMORY;
1767 
1769  if (!ret) {
1770  SysFreeString(*dir);
1771  *dir = NULL;
1772  return HRESULT_FROM_WIN32(GetLastError());
1773  }
1774 
1775  return S_OK;
1776 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define GetCurrentDirectoryW(x, y)
Definition: compat.h:615
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
unsigned int dir
Definition: maze.c:112
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define S_OK
Definition: intsafe.h:51
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define NULL
Definition: types.h:112

◆ WshShell3_get_Environment()

static HRESULT WINAPI WshShell3_get_Environment ( IWshShell3 *  iface,
VARIANT type,
IWshEnvironment **  env 
)
static

Definition at line 1215 of file shell.c.

1216 {
1217  FIXME("(%s %p): semi-stub\n", debugstr_variant(type), env);
1218  return WshEnvironment_Create(env);
1219 }
static HRESULT WshEnvironment_Create(IWshEnvironment **env)
Definition: shell.c:524
#define FIXME(fmt,...)
Definition: debug.h:111
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
static LPCWSTR LPCWSTR LPCWSTR env
Definition: db.cpp:168
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

◆ WshShell3_get_SpecialFolders()

static HRESULT WINAPI WshShell3_get_SpecialFolders ( IWshShell3 *  iface,
IWshCollection **  folders 
)
static

Definition at line 1209 of file shell.c.

1210 {
1211  TRACE("(%p)\n", folders);
1212  return WshCollection_Create(folders);
1213 }
static HRESULT WshCollection_Create(IWshCollection **collection)
Definition: shell.c:726
#define TRACE(s)
Definition: solgame.cpp:4

◆ WshShell3_GetIDsOfNames()

static HRESULT WINAPI WshShell3_GetIDsOfNames ( IWshShell3 *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 1171 of file shell.c.

1173 {
1175  HRESULT hr;
1176 
1177  TRACE("(%s %p %u %u %p)\n", debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
1178 
1180  if(SUCCEEDED(hr))
1181  {
1182  hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
1183  ITypeInfo_Release(typeinfo);
1184  }
1185 
1186  return hr;
1187 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
if SUCCEEDED(hr)
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109

◆ WshShell3_GetTypeInfo()

static HRESULT WINAPI WshShell3_GetTypeInfo ( IWshShell3 *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 1165 of file shell.c.

1166 {
1167  TRACE("(%u %u %p)\n", iTInfo, lcid, ppTInfo);
1168  return get_typeinfo(IWshShell3_tid, ppTInfo);
1169 }
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define TRACE(s)
Definition: solgame.cpp:4

◆ WshShell3_GetTypeInfoCount()

static HRESULT WINAPI WshShell3_GetTypeInfoCount ( IWshShell3 *  iface,
UINT pctinfo 
)
static

Definition at line 1158 of file shell.c.

1159 {
1160  TRACE("(%p)\n", pctinfo);
1161  *pctinfo = 1;
1162  return S_OK;
1163 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ WshShell3_Invoke()

static HRESULT WINAPI WshShell3_Invoke ( IWshShell3 *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 1189 of file shell.c.

1191 {
1193  HRESULT hr;
1194 
1195  TRACE("(%d %s %d %d %p %p %p %p)\n", dispIdMember, debugstr_guid(riid),
1196  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
1197 
1199  if(SUCCEEDED(hr))
1200  {
1201  hr = ITypeInfo_Invoke(typeinfo, &WshShell3.IWshShell3_iface, dispIdMember, wFlags,
1202  pDispParams, pVarResult, pExcepInfo, puArgErr);
1203  ITypeInfo_Release(typeinfo);
1204  }
1205 
1206  return hr;
1207 }
static WshShellImpl WshShell3
Definition: shell.c:40
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
if SUCCEEDED(hr)
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534
IWshShell3 IWshShell3_iface
Definition: shell.c:38

◆ WshShell3_LogEvent()

static HRESULT WINAPI WshShell3_LogEvent ( IWshShell3 *  iface,
VARIANT Type,
BSTR  Message,
BSTR  Target,
VARIANT_BOOL out_Success 
)
static

Definition at line 1723 of file shell.c.

1724 {
1725  FIXME("(%s %s %s %p): stub\n", debugstr_variant(Type), debugstr_w(Message), debugstr_w(Target), out_Success);
1726  return E_NOTIMPL;
1727 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
Type
Definition: Type.h:6
CHAR Message[80]
Definition: alive.c:5
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define E_NOTIMPL
Definition: ddrawi.h:99
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306

◆ WshShell3_Popup()

static HRESULT WINAPI WshShell3_Popup ( IWshShell3 *  iface,
BSTR  text,
VARIANT seconds_to_wait,
VARIANT title,
VARIANT type,
int button 
)
static

Definition at line 1333 of file shell.c.

1335 {
1336  struct popup_thread_param param;
1337  DWORD tid, status;
1338  VARIANT timeout;
1339  HANDLE hthread;
1340  HRESULT hr;
1341 
1342  TRACE("(%s %s %s %s %p)\n", debugstr_w(text), debugstr_variant(seconds_to_wait), debugstr_variant(title),
1344 
1345  if (!seconds_to_wait || !title || !type || !button)
1346  return E_POINTER;
1347 
1348  VariantInit(&timeout);
1349  if (!is_optional_argument(seconds_to_wait))
1350  {
1351  hr = VariantChangeType(&timeout, seconds_to_wait, 0, VT_I4);
1352  if (FAILED(hr))
1353  return hr;
1354  }
1355 #ifdef __REACTOS__
1356  else
1357  {
1359  }
1360 #endif
1361 
1362  VariantInit(&param.type);
1363  if (!is_optional_argument(type))
1364  {
1365  hr = VariantChangeType(&param.type, type, 0, VT_I4);
1366  if (FAILED(hr))
1367  return hr;
1368  }
1369 #ifdef __REACTOS__
1370  else
1371  {
1372  VariantChangeType(&param.type, &param.type, 0, VT_I4);
1373  }
1374 #endif
1375 
1377  param.title = *title;
1378  else
1379  {
1380  VariantInit(&param.title);
1381  hr = VariantChangeType(&param.title, title, 0, VT_BSTR);
1382  if (FAILED(hr))
1383  return hr;
1384  }
1385 
1386  param.text = text;
1387  param.button = -1;
1388  hthread = CreateThread(NULL, 0, popup_thread_proc, &param, 0, &tid);
1389  status = MsgWaitForMultipleObjects(1, &hthread, FALSE, V_I4(&timeout) ? V_I4(&timeout) * 1000: INFINITE, 0);
1390  if (status == WAIT_TIMEOUT)
1391  {
1392  PostThreadMessageW(tid, WM_QUIT, 0, 0);
1393  MsgWaitForMultipleObjects(1, &hthread, FALSE, INFINITE, 0);
1394  param.button = -1;
1395  }
1396  *button = param.button;
1397 
1398  VariantClear(&param.title);
1399  CloseHandle(hthread);
1400 
1401  return S_OK;
1402 }
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
Definition: variant.c:962
#define CloseHandle
Definition: compat.h:598
Definition: compat.h:2157
HRESULT hr
Definition: shlfolder.c:183
const WCHAR * text
Definition: package.c:1827
DWORD button
Definition: button.c:166
#define WM_QUIT
Definition: winuser.h:1605
static BOOL is_optional_argument(const VARIANT *arg)
Definition: shell.c:1221
Definition: dhcpd.h:245
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
GLbitfield GLuint64 timeout
Definition: glext.h:7164
#define V_I4(A)
Definition: oleauto.h:247
#define FALSE
Definition: types.h:117
#define debugstr_w
Definition: kernel32.h:32
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:136
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
GLfloat param
Definition: glext.h:5796
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WAIT_TIMEOUT
Definition: dderror.h:14
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
static DWORD WINAPI popup_thread_proc(void *arg)
Definition: shell.c:1323
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define E_POINTER
Definition: winerror.h:2365
#define INFINITE
Definition: serial.h:102
static SERVICE_STATUS status
Definition: service.c:31
BOOL WINAPI PostThreadMessageW(_In_ DWORD, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static TfClientId tid
static char title[]
Definition: ps.c:92
Definition: ps.c:97

◆ WshShell3_put_CurrentDirectory()

static HRESULT WINAPI WshShell3_put_CurrentDirectory ( IWshShell3 *  iface,
BSTR  dir 
)
static

Definition at line 1778 of file shell.c.

1779 {
1780  TRACE("(%s)\n", debugstr_w(dir));
1781 
1782  if (!dir)
1783  return E_INVALIDARG;
1784 
1785  if (!SetCurrentDirectoryW(dir))
1786  return HRESULT_FROM_WIN32(GetLastError());
1787 
1788  return S_OK;
1789 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
unsigned int dir
Definition: maze.c:112
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
Definition: path.c:2248

◆ WshShell3_QueryInterface()

static HRESULT WINAPI WshShell3_QueryInterface ( IWshShell3 *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1114 of file shell.c.

1115 {
1116  TRACE("(%s, %p)\n", debugstr_guid(riid), ppv);
1117 
1118  *ppv = NULL;
1119 
1120  if (IsEqualGUID(riid, &IID_IDispatch) ||
1121  IsEqualGUID(riid, &IID_IWshShell3) ||
1122  IsEqualGUID(riid, &IID_IWshShell2) ||
1123  IsEqualGUID(riid, &IID_IWshShell) ||
1125  {
1126  *ppv = iface;
1127  }
1128  else if (IsEqualGUID(riid, &IID_IDispatchEx))
1129  {
1130  return E_NOINTERFACE;
1131  }
1133  {
1134  *ppv = &WshShell3.classinfo.IProvideClassInfo_iface;
1135  }
1136  else
1137  {
1138  WARN("unknown iface %s\n", debugstr_guid(riid));
1139  return E_NOINTERFACE;
1140  }
1141 
1142  IUnknown_AddRef((IUnknown *)*ppv);
1143  return S_OK;
1144 }
struct provideclassinfo classinfo
Definition: shell.c:37
static WshShellImpl WshShell3
Definition: shell.c:40
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:112
REFIID LPVOID * ppv
Definition: atlbase.h:39
const GUID IID_IProvideClassInfo
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ WshShell3_RegDelete()

static HRESULT WINAPI WshShell3_RegDelete ( IWshShell3 *  iface,
BSTR  Name 
)
static

Definition at line 1717 of file shell.c.

1718 {
1719  FIXME("(%s): stub\n", debugstr_w(Name));
1720  return E_NOTIMPL;
1721 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshShell3_RegRead()

static HRESULT WINAPI WshShell3_RegRead ( IWshShell3 *  iface,
BSTR  name,
VARIANT value 
)
static

Definition at line 1492 of file shell.c.

1493 {
1494  DWORD type, datalen, ret;
1495  WCHAR *subkey, *val;
1496  HRESULT hr;
1497  HKEY root;
1498 
1499  TRACE("(%s %p)\n", debugstr_w(name), value);
1500 
1501  if (!name || !value)
1502  return E_POINTER;
1503 
1504  root = get_root_key(name);
1505  if (!root)
1507 
1508  hr = split_reg_path(name, &subkey, &val);
1509  if (FAILED(hr))
1510  return hr;
1511 
1512  type = REG_NONE;
1513  datalen = 0;
1514  ret = RegGetValueW(root, subkey, val, RRF_RT_ANY, &type, NULL, &datalen);
1515  if (ret == ERROR_SUCCESS) {
1516  void *data;
1517 
1518  data = heap_alloc(datalen);
1519  if (!data) {
1520  hr = E_OUTOFMEMORY;
1521  goto fail;
1522  }
1523 
1524  ret = RegGetValueW(root, subkey, val, RRF_RT_ANY, &type, data, &datalen);
1525  if (ret) {
1526  heap_free(data);
1528  goto fail;
1529  }
1530 
1531  switch (type) {
1532  case REG_SZ:
1533  case REG_EXPAND_SZ:
1534  V_VT(value) = VT_BSTR;
1536  if (!V_BSTR(value))
1537  hr = E_OUTOFMEMORY;
1538  break;
1539  case REG_DWORD:
1540  V_VT(value) = VT_I4;
1541  V_I4(value) = *(DWORD*)data;
1542  break;
1543  case REG_BINARY:
1544  {
1545  BYTE *ptr = (BYTE*)data;
1546  SAFEARRAYBOUND bound;
1547  unsigned int i;
1548  SAFEARRAY *sa;
1549  VARIANT *v;
1550 
1551  bound.lLbound = 0;
1552  bound.cElements = datalen;
1553  sa = SafeArrayCreate(VT_VARIANT, 1, &bound);
1554  if (!sa)
1555  break;
1556 
1557  hr = SafeArrayAccessData(sa, (void**)&v);
1558  if (FAILED(hr)) {
1560  break;
1561  }
1562 
1563  for (i = 0; i < datalen; i++) {
1564  V_VT(&v[i]) = VT_UI1;
1565  V_UI1(&v[i]) = ptr[i];
1566  }
1568 
1570  V_ARRAY(value) = sa;
1571  break;
1572  }
1573  case REG_MULTI_SZ:
1574  {
1575  WCHAR *ptr = (WCHAR*)data;
1576  SAFEARRAYBOUND bound;
1577  SAFEARRAY *sa;
1578  VARIANT *v;
1579 
1580  /* get element count first */
1581  bound.lLbound = 0;
1582  bound.cElements = 0;
1583  while (*ptr) {
1584  bound.cElements++;
1585  ptr += lstrlenW(ptr)+1;
1586  }
1587 
1588  sa = SafeArrayCreate(VT_VARIANT, 1, &bound);
1589  if (!sa)
1590  break;
1591 
1592  hr = SafeArrayAccessData(sa, (void**)&v);
1593  if (FAILED(hr)) {
1595  break;
1596  }
1597 
1598  ptr = (WCHAR*)data;
1599  while (*ptr) {
1600  V_VT(v) = VT_BSTR;
1601  V_BSTR(v) = SysAllocString(ptr);
1602  ptr += lstrlenW(ptr)+1;
1603  v++;
1604  }
1605 
1608  V_ARRAY(value) = sa;
1609  break;
1610  }
1611  default:
1612  FIXME("value type %d not supported\n", type);
1613  hr = E_FAIL;
1614  };
1615 
1616  heap_free(data);
1617  if (FAILED(hr))
1618  VariantInit(value);
1619  }
1620  else
1622 
1623 fail:
1624  if (val)
1625  heap_free(subkey);
1626  return hr;
1627 }
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1965
Definition: compat.h:2157
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define ERROR_SUCCESS
Definition: deptool.c:10
HRESULT hr
Definition: shlfolder.c:183
#define REG_BINARY
Definition: nt_native.h:1496
struct _root root
#define V_ARRAY(A)
Definition: oleauto.h:222
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
int const JOCTET unsigned int datalen
Definition: jpeglib.h:1030
#define lstrlenW
Definition: compat.h:609
#define E_FAIL
Definition: ddrawi.h:102
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define V_I4(A)
Definition: oleauto.h:247
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
Definition: safearray.c:1137
#define REG_MULTI_SZ
Definition: nt_native.h:1501
#define debugstr_w
Definition: kernel32.h:32
static HKEY get_root_key(const WCHAR *path)
Definition: shell.c:1432
#define FIXME(fmt,...)
Definition: debug.h:111
static PVOID ptr
Definition: dispmode.c:27
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
GLuint GLfloat * val
Definition: glext.h:7180
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define V_UI1(A)
Definition: oleauto.h:266
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
Definition: safearray.c:1347
int ret
#define V_VT(A)
Definition: oleauto.h:211
unsigned char BYTE
Definition: xxhash.c:193
#define V_BSTR(A)
Definition: oleauto.h:226
static HRESULT split_reg_path(const WCHAR *path, WCHAR **subkey, WCHAR **value)
Definition: shell.c:1458
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
Definition: safearray.c:600
const GLdouble * v
Definition: gl.h:2040
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 REG_EXPAND_SZ
Definition: nt_native.h:1494
#define NULL
Definition: types.h:112
Definition: name.c:38
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:106
#define RRF_RT_ANY
Definition: winreg.h:64
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define REG_NONE
Definition: nt_native.h:1492
#define E_POINTER
Definition: winerror.h:2365
#define REG_DWORD
Definition: sdbapi.c:596
static struct sockaddr_in sa
Definition: adnsresfilter.c:69
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
Definition: safearray.c:1168
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
#define REG_SZ
Definition: layer.c:22

◆ WshShell3_RegWrite()

static HRESULT WINAPI WshShell3_RegWrite ( IWshShell3 *  iface,
BSTR  name,
VARIANT value,
VARIANT type 
)
static

Definition at line 1629 of file shell.c.

1630 {
1631  static const WCHAR regexpandszW[] = {'R','E','G','_','E','X','P','A','N','D','_','S','Z',0};
1632  static const WCHAR regszW[] = {'R','E','G','_','S','Z',0};
1633  static const WCHAR regdwordW[] = {'R','E','G','_','D','W','O','R','D',0};
1634  static const WCHAR regbinaryW[] = {'R','E','G','_','B','I','N','A','R','Y',0};
1635 
1636  DWORD regtype, data_len;
1637  WCHAR *subkey, *val;
1638  const BYTE *data;
1639  HRESULT hr;
1640  HKEY root;
1641  VARIANT v;
1642  LONG ret;
1643 
1645 
1646  if (!name || !value || !type)
1647  return E_POINTER;
1648 
1649  root = get_root_key(name);
1650  if (!root)
1652 
1653  /* value type */
1655  regtype = REG_SZ;
1656  else {
1657  if (V_VT(type) != VT_BSTR)
1658  return E_INVALIDARG;
1659 
1660  if (!wcscmp(V_BSTR(type), regszW))
1661  regtype = REG_SZ;
1662  else if (!wcscmp(V_BSTR(type), regdwordW))
1663  regtype = REG_DWORD;
1664  else if (!wcscmp(V_BSTR(type), regexpandszW))
1665  regtype = REG_EXPAND_SZ;
1666  else if (!wcscmp(V_BSTR(type), regbinaryW))
1667  regtype = REG_BINARY;
1668  else {
1669  FIXME("unrecognized value type %s\n", debugstr_w(V_BSTR(type)));
1670  return E_FAIL;
1671  }
1672  }
1673 
1674  /* it's always a string or a DWORD */
1675  VariantInit(&v);
1676  switch (regtype)
1677  {
1678  case REG_SZ:
1679  case REG_EXPAND_SZ:
1680  hr = VariantChangeType(&v, value, 0, VT_BSTR);
1681  if (hr == S_OK) {
1682  data = (BYTE*)V_BSTR(&v);
1683  data_len = SysStringByteLen(V_BSTR(&v)) + sizeof(WCHAR);
1684  }
1685  break;
1686  case REG_DWORD:
1687  case REG_BINARY:
1688  hr = VariantChangeType(&v, value, 0, VT_I4);
1689  data = (BYTE*)&V_I4(&v);
1690  data_len = sizeof(DWORD);
1691  break;
1692  default:
1693  FIXME("unexpected regtype %d\n", regtype);
1694  return E_FAIL;
1695  };
1696 
1697  if (FAILED(hr)) {
1698  FIXME("failed to convert value, regtype %d, 0x%08x\n", regtype, hr);
1699  return hr;
1700  }
1701 
1702  hr = split_reg_path(name, &subkey, &val);
1703  if (FAILED(hr))
1704  goto fail;
1705 
1706  ret = RegSetKeyValueW(root, subkey, val, regtype, data, data_len);
1707  if (ret)
1709 
1710 fail:
1711  VariantClear(&v);
1712  if (val)
1713  heap_free(subkey);
1714  return hr;
1715 }
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
Definition: variant.c:962
Definition: compat.h:2157
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
HRESULT hr
Definition: shlfolder.c:183
#define REG_BINARY
Definition: nt_native.h:1496
LONG WINAPI RegSetKeyValueW(IN HKEY hKey, IN LPCWSTR lpSubKey OPTIONAL, IN LPCWSTR lpValueName OPTIONAL, IN DWORD dwType, IN LPCVOID lpData OPTIONAL, IN DWORD cbData)
Definition: reg.c:2172
struct _root root
static BOOL is_optional_argument(const VARIANT *arg)
Definition: shell.c:1221
UINT WINAPI SysStringByteLen(BSTR str)
Definition: oleaut.c:215
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
#define E_FAIL
Definition: ddrawi.h:102
#define DWORD
Definition: nt_native.h:44
#define V_I4(A)
Definition: oleauto.h:247
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
static HKEY get_root_key(const WCHAR *path)
Definition: shell.c:1432
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint GLfloat * val
Definition: glext.h:7180
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
int ret
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
#define V_VT(A)
Definition: oleauto.h:211
unsigned char BYTE
Definition: xxhash.c:193
#define V_BSTR(A)
Definition: oleauto.h:226
static HRESULT split_reg_path(const WCHAR *path, WCHAR **subkey, WCHAR **value)
Definition: shell.c:1458
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:51
const GLdouble * v
Definition: gl.h:2040
#define REG_EXPAND_SZ
Definition: nt_native.h:1494
Definition: name.c:38
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:106
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define E_POINTER
Definition: winerror.h:2365
#define REG_DWORD
Definition: sdbapi.c:596
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
#define REG_SZ
Definition: layer.c:22

◆ WshShell3_Release()

static ULONG WINAPI WshShell3_Release ( IWshShell3 *  iface)
static

Definition at line 1152 of file shell.c.

1153 {
1154  TRACE("()\n");
1155  return 2;
1156 }
#define TRACE(s)
Definition: solgame.cpp:4

◆ WshShell3_Run()

static HRESULT WINAPI WshShell3_Run ( IWshShell3 *  iface,
BSTR  cmd,
VARIANT style,
VARIANT wait,
DWORD exit_code 
)
static

Definition at line 1249 of file shell.c.

1250 {
1252  int waitforprocess;
1253  WCHAR *file, *params;
1254  VARIANT s;
1255  HRESULT hr;
1256  BOOL ret;
1257 
1258  TRACE("(%s %s %s %p)\n", debugstr_w(cmd), debugstr_variant(style), debugstr_variant(wait), exit_code);
1259 
1260  if (!style || !wait || !exit_code)
1261  return E_POINTER;
1262 
1263  VariantInit(&s);
1264  hr = VariantChangeType(&s, style, 0, VT_I4);
1265  if (FAILED(hr))
1266  {
1267  ERR("failed to convert style argument, 0x%08x\n", hr);
1268  return hr;
1269  }
1270 
1271  if (is_optional_argument(wait))
1272  waitforprocess = 0;
1273  else {
1274  VARIANT w;
1275 
1276  VariantInit(&w);
1277  hr = VariantChangeType(&w, wait, 0, VT_I4);
1278  if (FAILED(hr))
1279  return hr;
1280 
1281  waitforprocess = V_I4(&w);
1282  }
1283 
1284  if (!(file = split_command(cmd, &params))) return E_OUTOFMEMORY;
1285 
1286  memset(&info, 0, sizeof(info));
1287  info.cbSize = sizeof(info);
1288  info.fMask = waitforprocess ? SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS : SEE_MASK_DEFAULT;
1289  info.lpFile = file;
1290  info.lpParameters = params;
1291  info.nShow = V_I4(&s);
1292 
1293  ret = ShellExecuteExW(&info);
1294  heap_free( file );
1295  if (!ret)
1296  {
1297  TRACE("ShellExecute failed, %d\n", GetLastError());
1298  return HRESULT_FROM_WIN32(GetLastError());
1299  }
1300  else
1301  {
1302  if (waitforprocess)
1303  {
1304  WaitForSingleObject(info.hProcess, INFINITE);
1305  GetExitCodeProcess(info.hProcess, exit_code);
1306  CloseHandle(info.hProcess);
1307  }
1308  else
1309  *exit_code = 0;
1310 
1311  return S_OK;
1312  }
1313 }
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
Definition: variant.c:962
#define CloseHandle
Definition: compat.h:598
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
Definition: compat.h:2157
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
static WCHAR * split_command(BSTR cmd, WCHAR **params)
Definition: shell.c:1226
HRESULT hr
Definition: shlfolder.c:183
Definition: ftp_var.h:139
#define SEE_MASK_NOCLOSEPROCESS
Definition: shellapi.h:31
BOOL WINAPI GetExitCodeProcess(IN HANDLE hProcess, IN LPDWORD lpExitCode)
Definition: proc.c:1168
static BOOL is_optional_argument(const VARIANT *arg)
Definition: shell.c:1221
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
#define V_I4(A)
Definition: oleauto.h:247
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
GLenum const GLfloat * params
Definition: glext.h:5645
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
#define SEE_MASK_NOASYNC
Definition: shellapi.h:33
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2263
static UINT exit_code
Definition: process.c:78
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
const char file[]
Definition: icontest.c:11
struct _test_info info[]
Definition: SetCursorPos.c:19
int ret
GLdouble s
Definition: gl.h:2039
#define ERR(fmt,...)
Definition: debug.h:110
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:51
#define SEE_MASK_DEFAULT
Definition: shellapi.h:24
#define E_POINTER
Definition: winerror.h:2365
#define INFINITE
Definition: serial.h:102
Arabic default style
Definition: afstyles.h:93
#define memset(x, y, z)
Definition: compat.h:39
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
Definition: fci.c:126

◆ WshShell3_SendKeys()

static HRESULT WINAPI WshShell3_SendKeys ( IWshShell3 *  iface,
BSTR  Keys,
VARIANT Wait 
)
static

Definition at line 1735 of file shell.c.

1736 {
1737  FIXME("(%s %p): stub\n", debugstr_w(Keys), Wait);
1738  return E_NOTIMPL;
1739 }
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:167
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshShellFactory_CreateInstance()

HRESULT WINAPI WshShellFactory_CreateInstance ( IClassFactory iface,
IUnknown outer,
REFIID  riid,
void **  ppv 
)

Definition at line 1816 of file shell.c.

1817 {
1818  TRACE("(%p %s %p)\n", outer, debugstr_guid(riid), ppv);
1819 
1822  return IWshShell3_QueryInterface(&WshShell3.IWshShell3_iface, riid, ppv);
1823 }
struct provideclassinfo classinfo
Definition: shell.c:37
static WshShellImpl WshShell3
Definition: shell.c:40
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static const IWshShell3Vtbl WshShell3Vtbl
Definition: shell.c:1791
void init_classinfo(const GUID *guid, IUnknown *outer, struct provideclassinfo *classinfo)
Definition: scrrun.c:232
IWshShell3 IWshShell3_iface
Definition: shell.c:38

◆ WshShortcut_AddRef()

static ULONG WINAPI WshShortcut_AddRef ( IWshShortcut *  iface)
static

Definition at line 769 of file shell.c.

770 {
773  TRACE("(%p) ref = %d\n", This, ref);
774  return ref;
775 }
Definition: send.c:48
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53

◆ WshShortcut_Create()

static HRESULT WshShortcut_Create ( const WCHAR path,
IDispatch **  shortcut 
)
static

Definition at line 1079 of file shell.c.

1080 {
1081  WshShortcut *This;
1082  HRESULT hr;
1083 
1084  *shortcut = NULL;
1085 
1086  This = heap_alloc(sizeof(*This));
1087  if (!This) return E_OUTOFMEMORY;
1088 
1089  This->IWshShortcut_iface.lpVtbl = &WshShortcutVtbl;
1090  This->ref = 1;
1091 
1092  hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
1093  &IID_IShellLinkW, (void**)&This->link);
1094  if (FAILED(hr))
1095  {
1096  heap_free(This);
1097  return hr;
1098  }
1099 
1100  This->path_link = SysAllocString(path);
1101  if (!This->path_link)
1102  {
1103  IShellLinkW_Release(This->link);
1104  heap_free(This);
1105  return E_OUTOFMEMORY;
1106  }
1107 
1108  init_classinfo(&IID_IWshShortcut, (IUnknown *)&This->IWshShortcut_iface, &This->classinfo);
1109  *shortcut = (IDispatch*)&This->IWshShortcut_iface;
1110 
1111  return S_OK;
1112 }
HRESULT hr
Definition: shlfolder.c:183
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
LONG HRESULT
Definition: typedefs.h:79
static const IWshShortcutVtbl WshShortcutVtbl
Definition: shell.c:1051
void init_classinfo(const GUID *guid, IUnknown *outer, struct provideclassinfo *classinfo)
Definition: scrrun.c:232
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by WshShell3_CreateShortcut().

◆ WshShortcut_get_Arguments()

static HRESULT WINAPI WshShortcut_get_Arguments ( IWshShortcut *  iface,
BSTR Arguments 
)
static

Definition at line 855 of file shell.c.

856 {
858  WCHAR buffW[INFOTIPSIZE];
859  HRESULT hr;
860 
861  TRACE("(%p)->(%p)\n", This, Arguments);
862 
863  if (!Arguments)
864  return E_POINTER;
865 
866  *Arguments = NULL;
867 
868  hr = IShellLinkW_GetArguments(This->link, buffW, ARRAY_SIZE(buffW));
869  if (FAILED(hr))
870  return hr;
871 
872  *Arguments = SysAllocString(buffW);
873  return *Arguments ? S_OK : E_OUTOFMEMORY;
874 }
HRESULT hr
Definition: shlfolder.c:183
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define S_OK
Definition: intsafe.h:51
#define ARRAY_SIZE(a)
Definition: main.h:24
#define INFOTIPSIZE
Definition: commctrl.h:124
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ WshShortcut_get_Description()

static HRESULT WINAPI WshShortcut_get_Description ( IWshShortcut *  iface,
BSTR Description 
)
static

Definition at line 885 of file shell.c.

886 {
888  FIXME("(%p)->(%p): stub\n", This, Description);
889  return E_NOTIMPL;
890 }
static const WCHAR Description[]
Definition: oid.c:1266
#define FIXME(fmt,...)
Definition: debug.h:111
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshShortcut_get_FullName()

static HRESULT WINAPI WshShortcut_get_FullName ( IWshShortcut *  iface,
BSTR name 
)
static

Definition at line 848 of file shell.c.

849 {
851  FIXME("(%p)->(%p): stub\n", This, name);
852  return E_NOTIMPL;
853 }
#define FIXME(fmt,...)
Definition: debug.h:111
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: name.c:38

◆ WshShortcut_get_Hotkey()

static HRESULT WINAPI WshShortcut_get_Hotkey ( IWshShortcut *  iface,
BSTR Hotkey 
)
static

Definition at line 899 of file shell.c.

900 {
902  FIXME("(%p)->(%p): stub\n", This, Hotkey);
903  return E_NOTIMPL;
904 }
#define FIXME(fmt,...)
Definition: debug.h:111
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshShortcut_get_IconLocation()

static HRESULT WINAPI WshShortcut_get_IconLocation ( IWshShortcut *  iface,
BSTR IconPath 
)
static

Definition at line 913 of file shell.c.

914 {
915  static const WCHAR fmtW[] = {'%','s',',',' ','%','d',0};
917  WCHAR buffW[MAX_PATH], pathW[MAX_PATH];
918  INT icon = 0;
919  HRESULT hr;
920 
921  TRACE("(%p)->(%p)\n", This, IconPath);
922 
923  if (!IconPath)
924  return E_POINTER;
925 
926  hr = IShellLinkW_GetIconLocation(This->link, buffW, ARRAY_SIZE(buffW), &icon);
927  if (FAILED(hr)) return hr;
928 
929  swprintf(pathW, fmtW, buffW, icon);
930  *IconPath = SysAllocString(pathW);
931  if (!*IconPath) return E_OUTOFMEMORY;
932 
933  return S_OK;
934 }
HRESULT hr
Definition: shlfolder.c:183
int32_t INT
Definition: typedefs.h:58
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define MAX_PATH
Definition: compat.h:34
#define swprintf(buf, format,...)
Definition: sprintf.c:56
#define S_OK
Definition: intsafe.h:51
#define ARRAY_SIZE(a)
Definition: main.h:24
static const WCHAR IconPath[]
Definition: install.c:51
#define E_POINTER
Definition: winerror.h:2365

◆ WshShortcut_get_TargetPath()

static HRESULT WINAPI WshShortcut_get_TargetPath ( IWshShortcut *  iface,
BSTR Path 
)
static

Definition at line 975 of file shell.c.

976 {
978  FIXME("(%p)->(%p): stub\n", This, Path);
979  return E_NOTIMPL;
980 }
#define FIXME(fmt,...)
Definition: debug.h:111
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
PRTL_UNICODE_STRING_BUFFER Path
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshShortcut_get_WindowStyle()

static HRESULT WINAPI WshShortcut_get_WindowStyle ( IWshShortcut *  iface,
int ShowCmd 
)
static

Definition at line 989 of file shell.c.

990 {
992  TRACE("(%p)->(%p)\n", This, ShowCmd);
993  return IShellLinkW_GetShowCmd(This->link, ShowCmd);
994 }
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4

◆ WshShortcut_get_WorkingDirectory()

static HRESULT WINAPI WshShortcut_get_WorkingDirectory ( IWshShortcut *  iface,
BSTR WorkingDirectory 
)
static

Definition at line 1003 of file shell.c.

1004 {
1006  WCHAR buffW[MAX_PATH];
1007  HRESULT hr;
1008 
1009  TRACE("(%p)->(%p)\n", This, WorkingDirectory);
1010 
1011  if (!WorkingDirectory)
1012  return E_POINTER;
1013 
1014  *WorkingDirectory = NULL;
1015  hr = IShellLinkW_GetWorkingDirectory(This->link, buffW, ARRAY_SIZE(buffW));
1016  if (FAILED(hr)) return hr;
1017 
1018  *WorkingDirectory = SysAllocString(buffW);
1019  return *WorkingDirectory ? S_OK : E_OUTOFMEMORY;
1020 }
HRESULT hr
Definition: shlfolder.c:183
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define MAX_PATH
Definition: compat.h:34
#define S_OK
Definition: intsafe.h:51
#define ARRAY_SIZE(a)
Definition: main.h:24
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ WshShortcut_GetIDsOfNames()

static HRESULT WINAPI WshShortcut_GetIDsOfNames ( IWshShortcut *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 808 of file shell.c.

810 {
813  HRESULT hr;
814 
815  TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
816 
818  if(SUCCEEDED(hr))
819  {
820  hr = ITypeInfo_GetIDsOfNames(typeinfo, rgszNames, cNames, rgDispId);
821  ITypeInfo_Release(typeinfo);
822  }
823 
824  return hr;
825 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
if SUCCEEDED(hr)
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109

◆ WshShortcut_GetTypeInfo()

static HRESULT WINAPI WshShortcut_GetTypeInfo ( IWshShortcut *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 801 of file shell.c.

802 {
804  TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
805  return get_typeinfo(IWshShortcut_tid, ppTInfo);
806 }
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4

◆ WshShortcut_GetTypeInfoCount()

static HRESULT WINAPI WshShortcut_GetTypeInfoCount ( IWshShortcut *  iface,
UINT pctinfo 
)
static

Definition at line 793 of file shell.c.

794 {
796  TRACE("(%p)->(%p)\n", This, pctinfo);
797  *pctinfo = 1;
798  return S_OK;
799 }
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ WshShortcut_Invoke()

static HRESULT WINAPI WshShortcut_Invoke ( IWshShortcut *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 827 of file shell.c.

829 {
832  HRESULT hr;
833 
834  TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
835  lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
836 
838  if(SUCCEEDED(hr))
839  {
840  hr = ITypeInfo_Invoke(typeinfo, &This->IWshShortcut_iface, dispIdMember, wFlags,
841  pDispParams, pVarResult, pExcepInfo, puArgErr);
842  ITypeInfo_Release(typeinfo);
843  }
844 
845  return hr;
846 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
if SUCCEEDED(hr)
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static ITypeInfo * typeinfo[last_tid]
Definition: apps.c:109
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534

◆ WshShortcut_Load()

static HRESULT WINAPI WshShortcut_Load ( IWshShortcut *  iface,
BSTR  PathLink 
)
static

Definition at line 1029 of file shell.c.

1030 {
1032  FIXME("(%p)->(%s): stub\n", This, debugstr_w(PathLink));
1033  return E_NOTIMPL;
1034 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshShortcut_put_Arguments()

static HRESULT WINAPI WshShortcut_put_Arguments ( IWshShortcut *  iface,
BSTR  Arguments 
)
static

Definition at line 876 of file shell.c.

877 {
879 
880  TRACE("(%p)->(%s)\n", This, debugstr_w(Arguments));
881 
882  return IShellLinkW_SetArguments(This->link, Arguments);
883 }
#define debugstr_w
Definition: kernel32.h:32
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4

◆ WshShortcut_put_Description()

static HRESULT WINAPI WshShortcut_put_Description ( IWshShortcut *  iface,
BSTR  Description 
)
static

Definition at line 892 of file shell.c.

893 {
895  TRACE("(%p)->(%s)\n", This, debugstr_w(Description));
896  return IShellLinkW_SetDescription(This->link, Description);
897 }
static const WCHAR Description[]
Definition: oid.c:1266
#define debugstr_w
Definition: kernel32.h:32
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4

◆ WshShortcut_put_Hotkey()

static HRESULT WINAPI WshShortcut_put_Hotkey ( IWshShortcut *  iface,
BSTR  Hotkey 
)
static

Definition at line 906 of file shell.c.

907 {
909  FIXME("(%p)->(%s): stub\n", This, debugstr_w(Hotkey));
910  return E_NOTIMPL;
911 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshShortcut_put_IconLocation()

static HRESULT WINAPI WshShortcut_put_IconLocation ( IWshShortcut *  iface,
BSTR  IconPath 
)
static

Definition at line 936 of file shell.c.

937 {
939  HRESULT hr;
940  WCHAR *ptr;
941  BSTR path;
942  INT icon;
943 
944  TRACE("(%p)->(%s)\n", This, debugstr_w(IconPath));
945 
946  /* scan for icon id */
947  ptr = wcsrchr(IconPath, ',');
948  if (!ptr)
949  {
950  WARN("icon index not found\n");
951  return E_FAIL;
952  }
953 
955 
956  /* skip spaces if any */
957  while (iswspace(*++ptr))
958  ;
959 
960  icon = wcstol(ptr, NULL, 10);
961 
962  hr = IShellLinkW_SetIconLocation(This->link, path, icon);
964 
965  return hr;
966 }
HRESULT hr
Definition: shlfolder.c:183
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
GLsizei const GLchar ** path
Definition: glext.h:7234
#define WARN(fmt,...)
Definition: debug.h:112
OLECHAR * BSTR
Definition: compat.h:2152
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define E_FAIL
Definition: ddrawi.h:102
int32_t INT
Definition: typedefs.h:58
#define debugstr_w
Definition: kernel32.h:32
static PVOID ptr
Definition: dispmode.c:27
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define iswspace(_c)
Definition: ctype.h:669
#define wcsrchr
Definition: compat.h:16
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define NULL
Definition: types.h:112
static const WCHAR IconPath[]
Definition: install.c:51

◆ WshShortcut_put_RelativePath()

static HRESULT WINAPI WshShortcut_put_RelativePath ( IWshShortcut *  iface,
BSTR  rhs 
)
static

Definition at line 968 of file shell.c.

969 {
971  FIXME("(%p)->(%s): stub\n", This, debugstr_w(rhs));
972  return E_NOTIMPL;
973 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WshShortcut_put_TargetPath()

static HRESULT WINAPI WshShortcut_put_TargetPath ( IWshShortcut *  iface,
BSTR  Path 
)
static

Definition at line 982 of file shell.c.

983 {
985  TRACE("(%p)->(%s)\n", This, debugstr_w(Path));
986  return IShellLinkW_SetPath(This->link, Path);
987 }
#define debugstr_w
Definition: kernel32.h:32
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4
PRTL_UNICODE_STRING_BUFFER Path

◆ WshShortcut_put_WindowStyle()

static HRESULT WINAPI WshShortcut_put_WindowStyle ( IWshShortcut *  iface,
int  ShowCmd 
)
static

Definition at line 996 of file shell.c.

997 {
999  TRACE("(%p)->(%d)\n", This, ShowCmd);
1000  return IShellLinkW_SetShowCmd(This->link, ShowCmd);
1001 }
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4

◆ WshShortcut_put_WorkingDirectory()

static HRESULT WINAPI WshShortcut_put_WorkingDirectory ( IWshShortcut *  iface,
BSTR  WorkingDirectory 
)
static

Definition at line 1022 of file shell.c.

1023 {
1025  TRACE("(%p)->(%s)\n", This, debugstr_w(WorkingDirectory));
1026  return IShellLinkW_SetWorkingDirectory(This->link, WorkingDirectory);
1027 }
#define debugstr_w
Definition: kernel32.h:32
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4

◆ WshShortcut_QueryInterface()

static HRESULT WINAPI WshShortcut_QueryInterface ( IWshShortcut *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 743 of file shell.c.

744 {
746 
747  TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv);
748 
749  if (IsEqualGUID(riid, &IID_IUnknown) ||
751  IsEqualGUID(riid, &IID_IWshShortcut))
752  {
753  *ppv = iface;
754  }
756  {
757  *ppv = &This->classinfo.IProvideClassInfo_iface;
758  }
759  else {
760  FIXME("Unknown iface %s\n", debugstr_guid(riid));
761  *ppv = NULL;
762  return E_NOINTERFACE;
763  }
764 
765  IUnknown_AddRef((IUnknown*)*ppv);
766  return S_OK;
767 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
const GUID IID_IProvideClassInfo
#define FIXME(fmt,...)
Definition: debug.h:111
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ WshShortcut_Release()

static ULONG WINAPI WshShortcut_Release ( IWshShortcut *  iface)
static

Definition at line 777 of file shell.c.

778 {
781  TRACE("(%p) ref = %d\n", This, ref);
782 
783  if (!ref)
784  {
785  SysFreeString(This->path_link);
786  IShellLinkW_Release(This->link);
787  heap_free(This);
788  }
789 
790  return ref;
791 }
Definition: send.c:48
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ WshShortcut_Save()

static HRESULT WINAPI WshShortcut_Save ( IWshShortcut *  iface)
static

Definition at line 1036 of file shell.c.

1037 {
1039  IPersistFile *file;
1040  HRESULT hr;
1041 
1042  TRACE("(%p)\n", This);
1043 
1044  IShellLinkW_QueryInterface(This->link, &IID_IPersistFile, (void**)&file);
1045  hr = IPersistFile_Save(file, This->path_link, TRUE);
1046  IPersistFile_Release(file);
1047 
1048  return hr;
1049 }
HRESULT hr
Definition: shlfolder.c:183
#define TRUE
Definition: types.h:120
static WshShortcut * impl_from_IWshShortcut(IWshShortcut *iface)
Definition: shell.c:79
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
const char file[]
Definition: icontest.c:11
const GUID IID_IPersistFile
Definition: fci.c:126

Variable Documentation

◆ WshCollectionVtbl

const IWshCollectionVtbl WshCollectionVtbl
static
Initial value:
= {
}
static HRESULT WINAPI WshCollection_GetIDsOfNames(IWshCollection *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: shell.c:601
static ULONG WINAPI WshCollection_Release(IWshCollection *iface)
Definition: shell.c:574
static HRESULT WINAPI WshCollection_Item(IWshCollection *iface, VARIANT *index, VARIANT *value)
Definition: shell.c:641
static HRESULT WINAPI WshCollection_Invoke(IWshCollection *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: shell.c:620
static HRESULT WINAPI WshCollection_get_length(IWshCollection *iface, LONG *count)
Definition: shell.c:698
static HRESULT WINAPI WshCollection_QueryInterface(IWshCollection *iface, REFIID riid, void **ppv)
Definition: shell.c:540
static HRESULT WINAPI WshCollection__NewEnum(IWshCollection *iface, IUnknown **Enum)
Definition: shell.c:705
static HRESULT WINAPI WshCollection_GetTypeInfo(IWshCollection *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: shell.c:594
static ULONG WINAPI WshCollection_AddRef(IWshCollection *iface)
Definition: shell.c:566
static HRESULT WINAPI WshCollection_Count(IWshCollection *iface, LONG *count)
Definition: shell.c:691
static HRESULT WINAPI WshCollection_GetTypeInfoCount(IWshCollection *iface, UINT *pctinfo)
Definition: shell.c:586

Definition at line 712 of file shell.c.

Referenced by WshCollection_Create().

◆ WshEnvironmentVtbl

const IWshEnvironmentVtbl WshEnvironmentVtbl
static
Initial value:
= {
}
static HRESULT WINAPI WshEnvironment_GetTypeInfoCount(IWshEnvironment *iface, UINT *pctinfo)
Definition: shell.c:395
static HRESULT WINAPI WshEnvironment_Remove(IWshEnvironment *iface, BSTR name)
Definition: shell.c:501
static HRESULT WINAPI WshEnvironment_get_Item(IWshEnvironment *iface, BSTR name, BSTR *value)
Definition: shell.c:450
static HRESULT WINAPI WshEnvironment_GetTypeInfo(IWshEnvironment *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: shell.c:403
static HRESULT WINAPI WshEnvironment__NewEnum(IWshEnvironment *iface, IUnknown **penum)
Definition: shell.c:494
static ULONG WINAPI WshEnvironment_Release(IWshEnvironment *iface)
Definition: shell.c:383
static HRESULT WINAPI WshEnvironment_put_Item(IWshEnvironment *iface, BSTR name, BSTR value)
Definition: shell.c:473
static HRESULT WINAPI WshEnvironment_Invoke(IWshEnvironment *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: shell.c:429
static ULONG WINAPI WshEnvironment_AddRef(IWshEnvironment *iface)
Definition: shell.c:375
static HRESULT WINAPI WshEnvironment_QueryInterface(IWshEnvironment *iface, REFIID riid, void **obj)
Definition: shell.c:349
static HRESULT WINAPI WshEnvironment_GetIDsOfNames(IWshEnvironment *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: shell.c:410
static HRESULT WINAPI WshEnvironment_Count(IWshEnvironment *iface, LONG *count)
Definition: shell.c:480
static HRESULT WINAPI WshEnvironment_get_length(IWshEnvironment *iface, LONG *len)
Definition: shell.c:487

Definition at line 508 of file shell.c.

Referenced by WshEnvironment_Create().

◆ WshExecVtbl

const IWshExecVtbl WshExecVtbl
static
Initial value:
= {
}
static HRESULT WINAPI WshExec_get_ExitCode(IWshExec *iface, DWORD *code)
Definition: shell.c:266
static HRESULT WINAPI WshExec_GetTypeInfoCount(IWshExec *iface, UINT *pctinfo)
Definition: shell.c:143
static HRESULT WINAPI WshExec_get_StdErr(IWshExec *iface, ITextStream **stream)
Definition: shell.c:244
static HRESULT WINAPI WshExec_Invoke(IWshExec *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: shell.c:177
static HRESULT WINAPI WshExec_GetIDsOfNames(IWshExec *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: shell.c:158
static HRESULT WINAPI WshExec_get_StdIn(IWshExec *iface, ITextStream **stream)
Definition: shell.c:226
static ULONG WINAPI WshExec_AddRef(IWshExec *iface)
Definition: shell.c:120
static HRESULT WINAPI WshExec_get_Status(IWshExec *iface, WshExecStatus *status)
Definition: shell.c:198
static ULONG WINAPI WshExec_Release(IWshExec *iface)
Definition: shell.c:128
static HRESULT WINAPI WshExec_GetTypeInfo(IWshExec *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: shell.c:151
static HRESULT WINAPI WshExec_get_ProcessID(IWshExec *iface, DWORD *pid)
Definition: shell.c:253
static HRESULT WINAPI WshExec_QueryInterface(IWshExec *iface, REFIID riid, void **obj)
Definition: shell.c:94
static HRESULT WINAPI WshExec_Terminate(IWshExec *iface)
Definition: shell.c:285
static HRESULT WINAPI WshExec_get_StdOut(IWshExec *iface, ITextStream **stream)
Definition: shell.c:235

Definition at line 308 of file shell.c.

Referenced by WshExec_create().

◆ WshShell3

WshShellImpl WshShell3
static

◆ WshShell3Vtbl

const IWshShell3Vtbl WshShell3Vtbl
static
Initial value:
= {