ReactOS  0.4.13-dev-92-gf251225
intshcut.c File Reference
#include <stdio.h>
#include "ieframe.h"
#include "shlobj.h"
#include "shobjidl.h"
#include "intshcut.h"
#include "shellapi.h"
#include "winreg.h"
#include "shlwapi.h"
#include "shlguid.h"
#include "wine/debug.h"
Include dependency graph for intshcut.c:

Go to the source code of this file.

Classes

struct  InternetShortcut
 

Macros

#define NONAMELESSUNION
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ieframe)
 
static InternetShortcutimpl_from_IUniformResourceLocatorA (IUniformResourceLocatorA *iface)
 
static InternetShortcutimpl_from_IUniformResourceLocatorW (IUniformResourceLocatorW *iface)
 
static InternetShortcutimpl_from_IPersistFile (IPersistFile *iface)
 
static InternetShortcutimpl_from_IPropertySetStorage (IPropertySetStorage *iface)
 
static BOOL run_winemenubuilder (const WCHAR *args)
 
static BOOL StartLinkProcessor (LPCOLESTR szLink)
 
static HRESULT Unknown_QueryInterface (InternetShortcut *This, REFIID riid, PVOID *ppvObject)
 
static ULONG Unknown_AddRef (InternetShortcut *This)
 
static ULONG Unknown_Release (InternetShortcut *This)
 
static HRESULT WINAPI UniformResourceLocatorW_QueryInterface (IUniformResourceLocatorW *url, REFIID riid, PVOID *ppvObject)
 
static ULONG WINAPI UniformResourceLocatorW_AddRef (IUniformResourceLocatorW *url)
 
static ULONG WINAPI UniformResourceLocatorW_Release (IUniformResourceLocatorW *url)
 
static HRESULT WINAPI UniformResourceLocatorW_SetUrl (IUniformResourceLocatorW *url, LPCWSTR pcszURL, DWORD dwInFlags)
 
static HRESULT WINAPI UniformResourceLocatorW_GetUrl (IUniformResourceLocatorW *url, LPWSTR *ppszURL)
 
static HRESULT WINAPI UniformResourceLocatorW_InvokeCommand (IUniformResourceLocatorW *url, PURLINVOKECOMMANDINFOW pCommandInfo)
 
static HRESULT WINAPI UniformResourceLocatorA_QueryInterface (IUniformResourceLocatorA *url, REFIID riid, PVOID *ppvObject)
 
static ULONG WINAPI UniformResourceLocatorA_AddRef (IUniformResourceLocatorA *url)
 
static ULONG WINAPI UniformResourceLocatorA_Release (IUniformResourceLocatorA *url)
 
static HRESULT WINAPI UniformResourceLocatorA_SetUrl (IUniformResourceLocatorA *url, LPCSTR pcszURL, DWORD dwInFlags)
 
static HRESULT WINAPI UniformResourceLocatorA_GetUrl (IUniformResourceLocatorA *url, LPSTR *ppszURL)
 
static HRESULT WINAPI UniformResourceLocatorA_InvokeCommand (IUniformResourceLocatorA *url, PURLINVOKECOMMANDINFOA pCommandInfo)
 
static HRESULT WINAPI PersistFile_QueryInterface (IPersistFile *pFile, REFIID riid, PVOID *ppvObject)
 
static ULONG WINAPI PersistFile_AddRef (IPersistFile *pFile)
 
static ULONG WINAPI PersistFile_Release (IPersistFile *pFile)
 
static HRESULT WINAPI PersistFile_GetClassID (IPersistFile *pFile, CLSID *pClassID)
 
static HRESULT WINAPI PersistFile_IsDirty (IPersistFile *pFile)
 
static HRESULT get_profile_string (LPCWSTR lpAppName, LPCWSTR lpKeyName, LPCWSTR lpFileName, WCHAR **rString)
 
static HRESULT WINAPI PersistFile_Load (IPersistFile *pFile, LPCOLESTR pszFileName, DWORD dwMode)
 
static HRESULT WINAPI PersistFile_Save (IPersistFile *pFile, LPCOLESTR pszFileName, BOOL fRemember)
 
static HRESULT WINAPI PersistFile_SaveCompleted (IPersistFile *pFile, LPCOLESTR pszFileName)
 
static HRESULT WINAPI PersistFile_GetCurFile (IPersistFile *pFile, LPOLESTR *ppszFileName)
 
static HRESULT WINAPI PropertySetStorage_QueryInterface (IPropertySetStorage *iface, REFIID riid, PVOID *ppvObject)
 
static ULONG WINAPI PropertySetStorage_AddRef (IPropertySetStorage *iface)
 
static ULONG WINAPI PropertySetStorage_Release (IPropertySetStorage *iface)
 
static HRESULT WINAPI PropertySetStorage_Create (IPropertySetStorage *iface, REFFMTID rfmtid, const CLSID *pclsid, DWORD grfFlags, DWORD grfMode, IPropertyStorage **ppprstg)
 
static HRESULT WINAPI PropertySetStorage_Open (IPropertySetStorage *iface, REFFMTID rfmtid, DWORD grfMode, IPropertyStorage **ppprstg)
 
static HRESULT WINAPI PropertySetStorage_Delete (IPropertySetStorage *iface, REFFMTID rfmtid)
 
static HRESULT WINAPI PropertySetStorage_Enum (IPropertySetStorage *iface, IEnumSTATPROPSETSTG **ppenum)
 
static InternetShortcutcreate_shortcut (void)
 
HRESULT WINAPI InternetShortcut_Create (IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
 
void WINAPI OpenURL (HWND hWnd, HINSTANCE hInst, LPCSTR lpcstrUrl, int nShowCmd)
 

Variables

static const IUniformResourceLocatorWVtbl uniformResourceLocatorWVtbl
 
static const IUniformResourceLocatorAVtbl uniformResourceLocatorAVtbl
 
static const IPersistFileVtbl persistFileVtbl
 
static const IPropertySetStorageVtbl propertySetStorageVtbl
 

Macro Definition Documentation

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 32 of file intshcut.c.

Function Documentation

◆ create_shortcut()

static InternetShortcut* create_shortcut ( void  )
static

Definition at line 786 of file intshcut.c.

787 {
788  InternetShortcut *newshortcut;
789 
790  newshortcut = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(InternetShortcut));
791  if (newshortcut)
792  {
793  HRESULT hr;
795 
798  newshortcut->IPersistFile_iface.lpVtbl = &persistFileVtbl;
799  newshortcut->IPropertySetStorage_iface.lpVtbl = &propertySetStorageVtbl;
800  newshortcut->refCount = 1;
802  STGFMT_STORAGE, 0, NULL, NULL, &IID_IPropertySetStorage, (void **) &newshortcut->property_set_storage);
803  if (FAILED(hr))
804  {
805  TRACE("Failed to create the storage object needed for the shortcut.\n");
806  heap_free(newshortcut);
807  return NULL;
808  }
809 
810  hr = IPropertySetStorage_Create(newshortcut->property_set_storage, &FMTID_Intshcut, NULL, PROPSETFLAG_DEFAULT, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &dummy);
811  if (FAILED(hr))
812  {
813  TRACE("Failed to create the property object needed for the shortcut.\n");
814  IPropertySetStorage_Release(newshortcut->property_set_storage);
815  heap_free(newshortcut);
816  return NULL;
817  }
818  IPropertyStorage_Release(dummy);
819  }
820 
821  return newshortcut;
822 }
IPropertySetStorage IPropertySetStorage_iface
Definition: intshcut.c:53
HRESULT hr
Definition: shlfolder.c:183
#define STGM_SHARE_EXCLUSIVE
Definition: objbase.h:922
HRESULT WINAPI StgCreateStorageEx(const WCHAR *pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS *pStgOptions, void *reserved, REFIID riid, void **ppObjectOpen)
Definition: storage32.c:8660
#define STGM_CREATE
Definition: objbase.h:925
IUniformResourceLocatorW IUniformResourceLocatorW_iface
Definition: intshcut.c:51
smooth NULL
Definition: ftsmooth.c:416
#define STGM_DELETEONRELEASE
Definition: objbase.h:924
IUniformResourceLocatorA IUniformResourceLocatorA_iface
Definition: intshcut.c:50
#define STGFMT_STORAGE
Definition: objbase.h:932
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const IPersistFileVtbl persistFileVtbl
Definition: intshcut.c:764
LONG HRESULT
Definition: typedefs.h:77
static const IUniformResourceLocatorAVtbl uniformResourceLocatorAVtbl
Definition: intshcut.c:755
#define STGM_READWRITE
Definition: objbase.h:918
IPersistFile IPersistFile_iface
Definition: intshcut.c:52
unsigned char dummy
Definition: maze.c:118
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
static const IUniformResourceLocatorWVtbl uniformResourceLocatorWVtbl
Definition: intshcut.c:746
IPropertySetStorage * property_set_storage
Definition: intshcut.c:57
static const IPropertySetStorageVtbl propertySetStorageVtbl
Definition: intshcut.c:776
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by InternetShortcut_Create(), and OpenURL().

◆ get_profile_string()

static HRESULT get_profile_string ( LPCWSTR  lpAppName,
LPCWSTR  lpKeyName,
LPCWSTR  lpFileName,
WCHAR **  rString 
)
static

Definition at line 424 of file intshcut.c.

426 {
427  DWORD r = 0;
428  DWORD len = 128;
429  WCHAR *buffer;
430 
431  *rString = NULL;
432  buffer = CoTaskMemAlloc(len * sizeof(*buffer));
433  if (!buffer)
434  return E_OUTOFMEMORY;
435 
436  r = GetPrivateProfileStringW(lpAppName, lpKeyName, NULL, buffer, len, lpFileName);
437  while (r == len-1)
438  {
439  WCHAR *realloc_buf;
440 
441  len *= 2;
442  realloc_buf = CoTaskMemRealloc(buffer, len * sizeof(*buffer));
443  if (realloc_buf == NULL)
444  {
446  return E_OUTOFMEMORY;
447  }
448  buffer = realloc_buf;
449 
450  r = GetPrivateProfileStringW(lpAppName, lpKeyName, NULL, buffer, len, lpFileName);
451  }
452 
453  *rString = buffer;
454  return r ? S_OK : E_FAIL;
455 }
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
Definition: profile.c:1142
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLuint buffer
Definition: glext.h:5915
#define E_FAIL
Definition: ddrawi.h:102
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:59
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
Definition: ifs.c:440
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406
_In_ LPCSTR lpFileName
Definition: winbase.h:3011

Referenced by PersistFile_Load().

◆ impl_from_IPersistFile()

static InternetShortcut* impl_from_IPersistFile ( IPersistFile iface)
inlinestatic

Definition at line 75 of file intshcut.c.

76 {
77  return CONTAINING_RECORD(iface, InternetShortcut, IPersistFile_iface);
78 }
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 PersistFile_AddRef(), PersistFile_GetCurFile(), PersistFile_IsDirty(), PersistFile_Load(), PersistFile_QueryInterface(), PersistFile_Release(), and PersistFile_Save().

◆ impl_from_IPropertySetStorage()

static InternetShortcut* impl_from_IPropertySetStorage ( IPropertySetStorage iface)
inlinestatic

Definition at line 80 of file intshcut.c.

81 {
82  return CONTAINING_RECORD(iface, InternetShortcut, IPropertySetStorage_iface);
83 }
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 PropertySetStorage_AddRef(), PropertySetStorage_Create(), PropertySetStorage_Delete(), PropertySetStorage_Open(), PropertySetStorage_QueryInterface(), and PropertySetStorage_Release().

◆ impl_from_IUniformResourceLocatorA()

static InternetShortcut* impl_from_IUniformResourceLocatorA ( IUniformResourceLocatorA *  iface)
inlinestatic

Definition at line 65 of file intshcut.c.

66 {
67  return CONTAINING_RECORD(iface, InternetShortcut, IUniformResourceLocatorA_iface);
68 }
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 UniformResourceLocatorA_AddRef(), UniformResourceLocatorA_GetUrl(), UniformResourceLocatorA_InvokeCommand(), UniformResourceLocatorA_QueryInterface(), UniformResourceLocatorA_Release(), and UniformResourceLocatorA_SetUrl().

◆ impl_from_IUniformResourceLocatorW()

static InternetShortcut* impl_from_IUniformResourceLocatorW ( IUniformResourceLocatorW *  iface)
inlinestatic

Definition at line 70 of file intshcut.c.

71 {
72  return CONTAINING_RECORD(iface, InternetShortcut, IUniformResourceLocatorW_iface);
73 }
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 UniformResourceLocatorW_AddRef(), UniformResourceLocatorW_GetUrl(), UniformResourceLocatorW_InvokeCommand(), UniformResourceLocatorW_QueryInterface(), UniformResourceLocatorW_Release(), and UniformResourceLocatorW_SetUrl().

◆ InternetShortcut_Create()

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

Definition at line 824 of file intshcut.c.

825 {
827  HRESULT hres;
828 
829  TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
830 
831  *ppv = NULL;
832 
833  if(outer)
834  return CLASS_E_NOAGGREGATION;
835 
836  This = create_shortcut();
837  if(!This)
838  return E_OUTOFMEMORY;
839 
842  return hres;
843 }
static ULONG Unknown_Release(InternetShortcut *This)
Definition: intshcut.c:186
REFIID riid
Definition: precomp.h:44
static InternetShortcut * create_shortcut(void)
Definition: intshcut.c:786
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
static HRESULT Unknown_QueryInterface(InternetShortcut *This, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:147
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662

◆ OpenURL()

void WINAPI OpenURL ( HWND  hWnd,
HINSTANCE  hInst,
LPCSTR  lpcstrUrl,
int  nShowCmd 
)

Definition at line 849 of file intshcut.c.

850 {
851  InternetShortcut *shortcut;
852  WCHAR* urlfilepath = NULL;
853  int len;
854 
855  shortcut = create_shortcut();
856 
857  if(!shortcut)
858  return;
859 
860  len = MultiByteToWideChar(CP_ACP, 0, lpcstrUrl, -1, NULL, 0);
861  urlfilepath = heap_alloc(len * sizeof(WCHAR));
862  MultiByteToWideChar(CP_ACP, 0, lpcstrUrl, -1, urlfilepath, len);
863 
864  if(SUCCEEDED(IPersistFile_Load(&shortcut->IPersistFile_iface, urlfilepath, 0))) {
866 
867  memset( &ici, 0, sizeof ici );
868  ici.dwcbSize = sizeof ici;
870  ici.hwndParent = hWnd;
871 
873  TRACE("failed to open URL: %s\n", debugstr_a(lpcstrUrl));
874  }
875 
876  heap_free(urlfilepath);
877  Unknown_Release(shortcut);
878 }
static ULONG Unknown_Release(InternetShortcut *This)
Definition: intshcut.c:186
#define CP_ACP
Definition: compat.h:99
static InternetShortcut * create_shortcut(void)
Definition: intshcut.c:786
HWND hWnd
Definition: settings.c:17
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
IUniformResourceLocatorW IUniformResourceLocatorW_iface
Definition: intshcut.c:51
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define debugstr_a
Definition: kernel32.h:31
GLenum GLsizei len
Definition: glext.h:6722
IPersistFile IPersistFile_iface
Definition: intshcut.c:52
static HRESULT WINAPI UniformResourceLocatorW_InvokeCommand(IUniformResourceLocatorW *url, PURLINVOKECOMMANDINFOW pCommandInfo)
Definition: intshcut.c:260
#define MultiByteToWideChar
Definition: compat.h:100
#define memset(x, y, z)
Definition: compat.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ PersistFile_AddRef()

static ULONG WINAPI PersistFile_AddRef ( IPersistFile pFile)
static

Definition at line 395 of file intshcut.c.

396 {
398  TRACE("(%p)\n", pFile);
399  return Unknown_AddRef(This);
400 }
static InternetShortcut * impl_from_IPersistFile(IPersistFile *iface)
Definition: intshcut.c:75
static ULONG Unknown_AddRef(InternetShortcut *This)
Definition: intshcut.c:180
#define TRACE(s)
Definition: solgame.cpp:4

◆ PersistFile_GetClassID()

static HRESULT WINAPI PersistFile_GetClassID ( IPersistFile pFile,
CLSID pClassID 
)
static

Definition at line 409 of file intshcut.c.

410 {
411  TRACE("(%p, %p)\n", pFile, pClassID);
412  *pClassID = CLSID_InternetShortcut;
413  return S_OK;
414 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ PersistFile_GetCurFile()

static HRESULT WINAPI PersistFile_GetCurFile ( IPersistFile pFile,
LPOLESTR ppszFileName 
)
static

Definition at line 658 of file intshcut.c.

659 {
660  HRESULT hr = S_OK;
662  TRACE("(%p, %p)\n", pFile, ppszFileName);
663  if (This->currentFile == NULL)
664  *ppszFileName = NULL;
665  else
666  {
667  *ppszFileName = co_strdupW(This->currentFile);
668  if (*ppszFileName == NULL)
669  hr = E_OUTOFMEMORY;
670  }
671  return hr;
672 }
static InternetShortcut * impl_from_IPersistFile(IPersistFile *iface)
Definition: intshcut.c:75
HRESULT hr
Definition: shlfolder.c:183
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
static LPWSTR co_strdupW(LPCWSTR str)
Definition: ieframe.h:359

◆ PersistFile_IsDirty()

static HRESULT WINAPI PersistFile_IsDirty ( IPersistFile pFile)
static

Definition at line 416 of file intshcut.c.

417 {
419  TRACE("(%p)\n", pFile);
420  return This->isDirty ? S_OK : S_FALSE;
421 }
static InternetShortcut * impl_from_IPersistFile(IPersistFile *iface)
Definition: intshcut.c:75
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ PersistFile_Load()

static HRESULT WINAPI PersistFile_Load ( IPersistFile pFile,
LPCOLESTR  pszFileName,
DWORD  dwMode 
)
static

Definition at line 457 of file intshcut.c.

458 {
459  static const WCHAR str_header[] = {'I','n','t','e','r','n','e','t','S','h','o','r','t','c','u','t',0};
460  static const WCHAR str_URL[] = {'U','R','L',0};
461  static const WCHAR str_iconfile[] = {'i','c','o','n','f','i','l','e',0};
462  static const WCHAR str_iconindex[] = {'i','c','o','n','i','n','d','e','x',0};
464  WCHAR *filename = NULL;
465  WCHAR *url;
466  HRESULT hr;
467  IPropertyStorage *pPropStg;
468  WCHAR *iconfile;
469  WCHAR *iconindexstring;
470 
471  TRACE("(%p, %s, 0x%x)\n", pFile, debugstr_w(pszFileName), dwMode);
472 
473  if (dwMode != 0)
474  FIXME("ignoring unimplemented mode 0x%x\n", dwMode);
475 
477  if (!filename)
478  return E_OUTOFMEMORY;
479 
480  if (FAILED(hr = get_profile_string(str_header, str_URL, pszFileName, &url)))
481  {
483  return hr;
484  }
485 
486  hr = IPropertySetStorage_Open(This->property_set_storage, &FMTID_Intshcut,
487  STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &pPropStg);
488  if (FAILED(hr))
489  {
492  return hr;
493  }
494 
495  CoTaskMemFree(This->currentFile);
496  This->currentFile = filename;
497  CoTaskMemFree(This->url);
498  This->url = url;
499  This->isDirty = FALSE;
500 
501  /* Now we're going to read in the iconfile and iconindex.
502  If we don't find them, that's not a failure case -- it's possible
503  that they just aren't in there. */
504 
505  if (get_profile_string(str_header, str_iconfile, pszFileName, &iconfile) == S_OK)
506  {
507  PROPSPEC ps;
508  PROPVARIANT pv;
509  ps.ulKind = PRSPEC_PROPID;
510  ps.u.propid = PID_IS_ICONFILE;
511  pv.vt = VT_LPWSTR;
512  pv.u.pwszVal = iconfile;
513  hr = IPropertyStorage_WriteMultiple(pPropStg, 1, &ps, &pv, 0);
514  if (FAILED(hr))
515  TRACE("Failed to store the iconfile to our property storage. hr = 0x%x\n", hr);
516  }
517  CoTaskMemFree(iconfile);
518 
519  if (get_profile_string(str_header, str_iconindex, pszFileName, &iconindexstring) == S_OK)
520  {
521  int iconindex;
522  PROPSPEC ps;
523  PROPVARIANT pv;
524  iconindex = strtolW(iconindexstring, NULL, 10);
525  ps.ulKind = PRSPEC_PROPID;
526  ps.u.propid = PID_IS_ICONINDEX;
527  pv.vt = VT_I4;
528  pv.u.iVal = iconindex;
529  hr = IPropertyStorage_WriteMultiple(pPropStg, 1, &ps, &pv, 0);
530  if (FAILED(hr))
531  TRACE("Failed to store the iconindex to our property storage. hr = 0x%x\n", hr);
532  }
533  CoTaskMemFree(iconindexstring);
534 
535  IPropertyStorage_Release(pPropStg);
536  return hr;
537 }
static InternetShortcut * impl_from_IPersistFile(IPersistFile *iface)
Definition: intshcut.c:75
Definition: compat.h:1939
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
HRESULT hr
Definition: shlfolder.c:183
#define STGM_SHARE_EXCLUSIVE
Definition: objbase.h:922
#define strtolW(s, e, b)
Definition: unicode.h:33
static HRESULT get_profile_string(LPCWSTR lpAppName, LPCWSTR lpKeyName, LPCWSTR lpFileName, WCHAR **rString)
Definition: intshcut.c:424
const char * filename
Definition: ioapi.h:135
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:41
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR url[]
Definition: encode.c:1432
#define STGM_READWRITE
Definition: objbase.h:918
#define S_OK
Definition: intsafe.h:59
static LPWSTR co_strdupW(LPCWSTR str)
Definition: ieframe.h:359
#define PID_IS_ICONFILE
Definition: shlobj.h:2285
#define PID_IS_ICONINDEX
Definition: shlobj.h:2284

◆ PersistFile_QueryInterface()

static HRESULT WINAPI PersistFile_QueryInterface ( IPersistFile pFile,
REFIID  riid,
PVOID ppvObject 
)
static

Definition at line 388 of file intshcut.c.

389 {
391  TRACE("(%p, %s, %p)\n", pFile, debugstr_guid(riid), ppvObject);
393 }
static InternetShortcut * impl_from_IPersistFile(IPersistFile *iface)
Definition: intshcut.c:75
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
static HRESULT Unknown_QueryInterface(InternetShortcut *This, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:147
#define TRACE(s)
Definition: solgame.cpp:4
REFIID LPVOID * ppvObject
Definition: precomp.h:44

◆ PersistFile_Release()

static ULONG WINAPI PersistFile_Release ( IPersistFile pFile)
static

Definition at line 402 of file intshcut.c.

403 {
405  TRACE("(%p)\n", pFile);
406  return Unknown_Release(This);
407 }
static InternetShortcut * impl_from_IPersistFile(IPersistFile *iface)
Definition: intshcut.c:75
static ULONG Unknown_Release(InternetShortcut *This)
Definition: intshcut.c:186
#define TRACE(s)
Definition: solgame.cpp:4

◆ PersistFile_Save()

static HRESULT WINAPI PersistFile_Save ( IPersistFile pFile,
LPCOLESTR  pszFileName,
BOOL  fRemember 
)
static

Definition at line 539 of file intshcut.c.

540 {
541  HRESULT hr = S_OK;
542  INT len;
543  CHAR *url;
545 
546  TRACE("(%p, %s, %d)\n", pFile, debugstr_w(pszFileName), fRemember);
547 
548  if (pszFileName != NULL && fRemember)
549  {
550  LPOLESTR oldFile = This->currentFile;
551  This->currentFile = co_strdupW(pszFileName);
552  if (This->currentFile == NULL)
553  {
554  This->currentFile = oldFile;
555  return E_OUTOFMEMORY;
556  }
557  CoTaskMemFree(oldFile);
558  }
559  if (This->url == NULL)
560  return E_FAIL;
561 
562  /* Windows seems to always write:
563  * ASCII "[InternetShortcut]" headers
564  * ASCII names in "name=value" pairs
565  * An ASCII (probably UTF8?) value in "URL=..."
566  */
567  len = WideCharToMultiByte(CP_UTF8, 0, This->url, -1, NULL, 0, 0, 0);
568  url = heap_alloc(len);
569  if (url != NULL)
570  {
571  HANDLE file;
572  WideCharToMultiByte(CP_UTF8, 0, This->url, -1, url, len, 0, 0);
574  if (file != INVALID_HANDLE_VALUE)
575  {
576  static const char str_header[] = "[InternetShortcut]";
577  static const char str_URL[] = "URL=";
578  static const char str_ICONFILE[] = "ICONFILE=";
579  static const char str_eol[] = "\r\n";
581  char *iconfile;
582  IPropertyStorage *pPropStgRead;
583  PROPSPEC ps[2];
584  PROPVARIANT pvread[2];
585  ps[0].ulKind = PRSPEC_PROPID;
586  ps[0].u.propid = PID_IS_ICONFILE;
587  ps[1].ulKind = PRSPEC_PROPID;
588  ps[1].u.propid = PID_IS_ICONINDEX;
589 
590  WriteFile(file, str_header, ARRAY_SIZE(str_header) - 1, &bytesWritten, NULL);
591  WriteFile(file, str_eol, ARRAY_SIZE(str_eol) - 1, &bytesWritten, NULL);
592  WriteFile(file, str_URL, ARRAY_SIZE(str_URL) - 1, &bytesWritten, NULL);
594  WriteFile(file, str_eol, ARRAY_SIZE(str_eol) - 1, &bytesWritten, NULL);
595 
596  hr = IPropertySetStorage_Open(This->property_set_storage, &FMTID_Intshcut, STGM_READ|STGM_SHARE_EXCLUSIVE, &pPropStgRead);
597  if (SUCCEEDED(hr))
598  {
599  hr = IPropertyStorage_ReadMultiple(pPropStgRead, 2, ps, pvread);
600  if (hr == S_FALSE)
601  {
602  /* None of the properties are present, that's ok */
603  hr = S_OK;
604  IPropertyStorage_Release(pPropStgRead);
605  }
606  else if (SUCCEEDED(hr))
607  {
608  char indexString[50];
609  len = WideCharToMultiByte(CP_UTF8, 0, pvread[0].u.pwszVal, -1, NULL, 0, 0, 0);
610  iconfile = heap_alloc(len);
611  if (iconfile != NULL)
612  {
613  WideCharToMultiByte(CP_UTF8, 0, pvread[0].u.pwszVal, -1, iconfile, len, 0, 0);
614  WriteFile(file, str_ICONFILE, lstrlenA(str_ICONFILE), &bytesWritten, NULL);
615  WriteFile(file, iconfile, lstrlenA(iconfile), &bytesWritten, NULL);
616  WriteFile(file, str_eol, lstrlenA(str_eol), &bytesWritten, NULL);
617  }
618 
619  sprintf(indexString, "ICONINDEX=%d", pvread[1].u.iVal);
620  WriteFile(file, indexString, lstrlenA(indexString), &bytesWritten, NULL);
621  WriteFile(file, str_eol, lstrlenA(str_eol), &bytesWritten, NULL);
622 
623  IPropertyStorage_Release(pPropStgRead);
624  PropVariantClear(&pvread[0]);
625  PropVariantClear(&pvread[1]);
626  }
627  else
628  {
629  TRACE("Unable to read properties.\n");
630  }
631  }
632  else
633  {
634  TRACE("Unable to get the IPropertyStorage.\n");
635  }
636 
637  CloseHandle(file);
638  if (pszFileName == NULL || fRemember)
639  This->isDirty = FALSE;
641  }
642  else
643  hr = E_FAIL;
644  heap_free(url);
645  }
646  else
647  hr = E_OUTOFMEMORY;
648 
649  return hr;
650 }
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 * u
Definition: glfuncs.h:240
static InternetShortcut * impl_from_IPersistFile(IPersistFile *iface)
Definition: intshcut.c:75
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
#define CloseHandle
Definition: compat.h:398
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
#define WideCharToMultiByte
Definition: compat.h:101
HRESULT hr
Definition: shlfolder.c:183
#define STGM_SHARE_EXCLUSIVE
Definition: objbase.h:922
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
Definition: ole2.c:2952
char CHAR
Definition: xmlstorage.h:175
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
static LPOLESTR
Definition: stg_prop.c:27
#define E_FAIL
Definition: ddrawi.h:102
int32_t INT
Definition: typedefs.h:56
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define FILE_SHARE_READ
Definition: compat.h:125
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define CP_UTF8
Definition: nls.h:20
#define GENERIC_WRITE
Definition: nt_native.h:90
#define debugstr_w
Definition: kernel32.h:32
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:41
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define STGM_READ
Definition: objbase.h:916
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR url[]
Definition: encode.c:1432
const char file[]
Definition: icontest.c:11
unsigned long DWORD
Definition: ntddk_ex.h:95
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
GLenum GLsizei len
Definition: glext.h:6722
GLenum GLsizei GLuint GLint * bytesWritten
Definition: glext.h:11123
#define S_OK
Definition: intsafe.h:59
#define CREATE_ALWAYS
Definition: disk.h:72
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define ARRAY_SIZE(a)
Definition: main.h:24
#define CreateFileW
Definition: compat.h:400
static LPWSTR co_strdupW(LPCWSTR str)
Definition: ieframe.h:359
#define PID_IS_ICONFILE
Definition: shlobj.h:2285
static BOOL StartLinkProcessor(LPCOLESTR szLink)
Definition: intshcut.c:127
#define PID_IS_ICONINDEX
Definition: shlobj.h:2284
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
Definition: fci.c:126

◆ PersistFile_SaveCompleted()

static HRESULT WINAPI PersistFile_SaveCompleted ( IPersistFile pFile,
LPCOLESTR  pszFileName 
)
static

Definition at line 652 of file intshcut.c.

653 {
654  FIXME("(%p, %p): stub\n", pFile, pszFileName);
655  return E_NOTIMPL;
656 }
#define FIXME(fmt,...)
Definition: debug.h:110
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:41
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ PropertySetStorage_AddRef()

static ULONG WINAPI PropertySetStorage_AddRef ( IPropertySetStorage iface)
static

Definition at line 681 of file intshcut.c.

682 {
684  TRACE("(%p)\n", iface);
685  return Unknown_AddRef(This);
686 }
static ULONG Unknown_AddRef(InternetShortcut *This)
Definition: intshcut.c:180
#define TRACE(s)
Definition: solgame.cpp:4
static InternetShortcut * impl_from_IPropertySetStorage(IPropertySetStorage *iface)
Definition: intshcut.c:80

◆ PropertySetStorage_Create()

static HRESULT WINAPI PropertySetStorage_Create ( IPropertySetStorage iface,
REFFMTID  rfmtid,
const CLSID pclsid,
DWORD  grfFlags,
DWORD  grfMode,
IPropertyStorage **  ppprstg 
)
static

Definition at line 695 of file intshcut.c.

702 {
704  TRACE("(%s, %p, 0x%x, 0x%x, %p)\n", debugstr_guid(rfmtid), pclsid, grfFlags, grfMode, ppprstg);
705 
706  return IPropertySetStorage_Create(This->property_set_storage,
707  rfmtid,
708  pclsid,
709  grfFlags,
710  grfMode,
711  ppprstg);
712 }
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static InternetShortcut * impl_from_IPropertySetStorage(IPropertySetStorage *iface)
Definition: intshcut.c:80

◆ PropertySetStorage_Delete()

static HRESULT WINAPI PropertySetStorage_Delete ( IPropertySetStorage iface,
REFFMTID  rfmtid 
)
static

Definition at line 730 of file intshcut.c.

731 {
733  TRACE("(%s)\n", debugstr_guid(rfmtid));
734 
735 
736  return IPropertySetStorage_Delete(This->property_set_storage,
737  rfmtid);
738 }
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static InternetShortcut * impl_from_IPropertySetStorage(IPropertySetStorage *iface)
Definition: intshcut.c:80

◆ PropertySetStorage_Enum()

static HRESULT WINAPI PropertySetStorage_Enum ( IPropertySetStorage iface,
IEnumSTATPROPSETSTG **  ppenum 
)
static

Definition at line 740 of file intshcut.c.

741 {
742  FIXME("(%p): stub\n", ppenum);
743  return E_NOTIMPL;
744 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ PropertySetStorage_Open()

static HRESULT WINAPI PropertySetStorage_Open ( IPropertySetStorage iface,
REFFMTID  rfmtid,
DWORD  grfMode,
IPropertyStorage **  ppprstg 
)
static

Definition at line 714 of file intshcut.c.

719 {
721  TRACE("(%s, 0x%x, %p)\n", debugstr_guid(rfmtid), grfMode, ppprstg);
722 
723  /* Note: The |STGM_SHARE_EXCLUSIVE is to cope with a bug in the implementation. Should be fixed in ole32. */
724  return IPropertySetStorage_Open(This->property_set_storage,
725  rfmtid,
726  grfMode|STGM_SHARE_EXCLUSIVE,
727  ppprstg);
728 }
#define STGM_SHARE_EXCLUSIVE
Definition: objbase.h:922
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static InternetShortcut * impl_from_IPropertySetStorage(IPropertySetStorage *iface)
Definition: intshcut.c:80

◆ PropertySetStorage_QueryInterface()

static HRESULT WINAPI PropertySetStorage_QueryInterface ( IPropertySetStorage iface,
REFIID  riid,
PVOID ppvObject 
)
static

Definition at line 674 of file intshcut.c.

675 {
677  TRACE("(%p)\n", iface);
679 }
REFIID riid
Definition: precomp.h:44
static HRESULT Unknown_QueryInterface(InternetShortcut *This, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:147
#define TRACE(s)
Definition: solgame.cpp:4
static InternetShortcut * impl_from_IPropertySetStorage(IPropertySetStorage *iface)
Definition: intshcut.c:80
REFIID LPVOID * ppvObject
Definition: precomp.h:44

◆ PropertySetStorage_Release()

static ULONG WINAPI PropertySetStorage_Release ( IPropertySetStorage iface)
static

Definition at line 688 of file intshcut.c.

689 {
691  TRACE("(%p)\n", iface);
692  return Unknown_Release(This);
693 }
static ULONG Unknown_Release(InternetShortcut *This)
Definition: intshcut.c:186
#define TRACE(s)
Definition: solgame.cpp:4
static InternetShortcut * impl_from_IPropertySetStorage(IPropertySetStorage *iface)
Definition: intshcut.c:80

◆ run_winemenubuilder()

static BOOL run_winemenubuilder ( const WCHAR args)
static

Definition at line 85 of file intshcut.c.

86 {
87  static const WCHAR menubuilder[] = {'\\','w','i','n','e','m','e','n','u','b','u','i','l','d','e','r','.','e','x','e',0};
88  LONG len;
89  LPWSTR buffer;
90  STARTUPINFOW si;
92  BOOL ret;
93  WCHAR app[MAX_PATH];
94  void *redir;
95 
96  GetSystemDirectoryW( app, MAX_PATH - ARRAY_SIZE( menubuilder ));
97  strcatW( app, menubuilder );
98 
99  len = (strlenW( app ) + strlenW( args ) + 1) * sizeof(WCHAR);
100  buffer = heap_alloc( len );
101  if( !buffer )
102  return FALSE;
103 
104  strcpyW( buffer, app );
105  strcatW( buffer, args );
106 
107  TRACE("starting %s\n",debugstr_w(buffer));
108 
109  memset(&si, 0, sizeof(si));
110  si.cb = sizeof(si);
111 
115 
116  heap_free( buffer );
117 
118  if (ret)
119  {
120  CloseHandle( pi.hProcess );
121  CloseHandle( pi.hThread );
122  }
123 
124  return ret;
125 }
BOOL WINAPI Wow64RevertWow64FsRedirection(IN PVOID OldValue)
Definition: utils.c:796
#define CloseHandle
Definition: compat.h:398
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
GLuint buffer
Definition: glext.h:5915
Definition: match.c:390
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
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:4623
#define TRACE(s)
Definition: solgame.cpp:4
DWORD cb
Definition: winbase.h:817
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
static DWORD pi
Definition: protocol.c:150
int ret
GLenum GLsizei len
Definition: glext.h:6722
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define ARRAY_SIZE(a)
Definition: main.h:24
#define DETACHED_PROCESS
Definition: winbase.h:179
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:242
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2312
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define memset(x, y, z)
Definition: compat.h:39
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
BOOL WINAPI Wow64DisableWow64FsRedirection(IN PVOID *OldValue)
Definition: utils.c:773

Referenced by SHChangeNotify(), and StartLinkProcessor().

◆ StartLinkProcessor()

static BOOL StartLinkProcessor ( LPCOLESTR  szLink)
static

Definition at line 127 of file intshcut.c.

128 {
129  static const WCHAR szFormat[] = { ' ','-','w',' ','-','u',' ','"','%','s','"',0 };
130  LONG len;
131  LPWSTR buffer;
132  BOOL ret;
133 
134  len = sizeof(szFormat) + lstrlenW( szLink ) * sizeof(WCHAR);
135  buffer = heap_alloc( len );
136  if( !buffer )
137  return FALSE;
138 
139  sprintfW( buffer, szFormat, szLink );
141  heap_free( buffer );
142  return ret;
143 }
static BOOL run_winemenubuilder(const WCHAR *args)
Definition: intshcut.c:85
GLuint buffer
Definition: glext.h:5915
#define lstrlenW
Definition: compat.h:407
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret
GLenum GLsizei len
Definition: glext.h:6722
#define sprintfW
Definition: unicode.h:58
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by PersistFile_Save().

◆ UniformResourceLocatorA_AddRef()

static ULONG WINAPI UniformResourceLocatorA_AddRef ( IUniformResourceLocatorA *  url)
static

Definition at line 312 of file intshcut.c.

313 {
315  TRACE("(%p)\n", url);
316  return Unknown_AddRef(This);
317 }
static ULONG Unknown_AddRef(InternetShortcut *This)
Definition: intshcut.c:180
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR url[]
Definition: encode.c:1432
static InternetShortcut * impl_from_IUniformResourceLocatorA(IUniformResourceLocatorA *iface)
Definition: intshcut.c:65

◆ UniformResourceLocatorA_GetUrl()

static HRESULT WINAPI UniformResourceLocatorA_GetUrl ( IUniformResourceLocatorA *  url,
LPSTR ppszURL 
)
static

Definition at line 345 of file intshcut.c.

346 {
348 
349  TRACE("(%p, %p)\n", url, ppszURL);
350 
351  if (!This->url) {
352  *ppszURL = NULL;
353  return S_FALSE;
354 
355  }
356 
357  *ppszURL = co_strdupWtoA(This->url);
358  if (!*ppszURL)
359  return E_OUTOFMEMORY;
360 
361  return S_OK;
362 }
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR url[]
Definition: encode.c:1432
static InternetShortcut * impl_from_IUniformResourceLocatorA(IUniformResourceLocatorA *iface)
Definition: intshcut.c:65
#define S_OK
Definition: intsafe.h:59
static LPSTR co_strdupWtoA(LPCWSTR str)
Definition: ieframe.h:378

◆ UniformResourceLocatorA_InvokeCommand()

static HRESULT WINAPI UniformResourceLocatorA_InvokeCommand ( IUniformResourceLocatorA *  url,
PURLINVOKECOMMANDINFOA  pCommandInfo 
)
static

Definition at line 364 of file intshcut.c.

365 {
366  URLINVOKECOMMANDINFOW wideCommandInfo;
367  int len;
368  WCHAR *wideVerb;
369  HRESULT res;
371 
372  wideCommandInfo.dwcbSize = sizeof wideCommandInfo;
373  wideCommandInfo.dwFlags = pCommandInfo->dwFlags;
374  wideCommandInfo.hwndParent = pCommandInfo->hwndParent;
375 
376  len = MultiByteToWideChar(CP_ACP, 0, pCommandInfo->pcszVerb, -1, NULL, 0);
377  wideVerb = heap_alloc(len * sizeof(WCHAR));
378  MultiByteToWideChar(CP_ACP, 0, pCommandInfo->pcszVerb, -1, wideVerb, len);
379 
380  wideCommandInfo.pcszVerb = wideVerb;
381 
382  res = UniformResourceLocatorW_InvokeCommand(&This->IUniformResourceLocatorW_iface, &wideCommandInfo);
383  heap_free(wideVerb);
384 
385  return res;
386 }
#define CP_ACP
Definition: compat.h:99
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR url[]
Definition: encode.c:1432
static InternetShortcut * impl_from_IUniformResourceLocatorA(IUniformResourceLocatorA *iface)
Definition: intshcut.c:65
GLenum GLsizei len
Definition: glext.h:6722
static HRESULT WINAPI UniformResourceLocatorW_InvokeCommand(IUniformResourceLocatorW *url, PURLINVOKECOMMANDINFOW pCommandInfo)
Definition: intshcut.c:260
#define MultiByteToWideChar
Definition: compat.h:100
GLuint res
Definition: glext.h:9613
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ UniformResourceLocatorA_QueryInterface()

static HRESULT WINAPI UniformResourceLocatorA_QueryInterface ( IUniformResourceLocatorA *  url,
REFIID  riid,
PVOID ppvObject 
)
static

Definition at line 305 of file intshcut.c.

306 {
308  TRACE("(%p, %s, %p)\n", url, debugstr_guid(riid), ppvObject);
310 }
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
static HRESULT Unknown_QueryInterface(InternetShortcut *This, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:147
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR url[]
Definition: encode.c:1432
static InternetShortcut * impl_from_IUniformResourceLocatorA(IUniformResourceLocatorA *iface)
Definition: intshcut.c:65
REFIID LPVOID * ppvObject
Definition: precomp.h:44

◆ UniformResourceLocatorA_Release()

static ULONG WINAPI UniformResourceLocatorA_Release ( IUniformResourceLocatorA *  url)
static

Definition at line 319 of file intshcut.c.

320 {
322  TRACE("(%p)\n", url);
323  return Unknown_Release(This);
324 }
static ULONG Unknown_Release(InternetShortcut *This)
Definition: intshcut.c:186
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR url[]
Definition: encode.c:1432
static InternetShortcut * impl_from_IUniformResourceLocatorA(IUniformResourceLocatorA *iface)
Definition: intshcut.c:65

◆ UniformResourceLocatorA_SetUrl()

static HRESULT WINAPI UniformResourceLocatorA_SetUrl ( IUniformResourceLocatorA *  url,
LPCSTR  pcszURL,
DWORD  dwInFlags 
)
static

Definition at line 326 of file intshcut.c.

327 {
328  WCHAR *newURL = NULL;
330  TRACE("(%p, %s, 0x%x)\n", url, debugstr_a(pcszURL), dwInFlags);
331  if (dwInFlags != 0)
332  FIXME("ignoring unsupported flags 0x%x\n", dwInFlags);
333  if (pcszURL != NULL)
334  {
335  newURL = co_strdupAtoW(pcszURL);
336  if (newURL == NULL)
337  return E_OUTOFMEMORY;
338  }
339  CoTaskMemFree(This->url);
340  This->url = newURL;
341  This->isDirty = TRUE;
342  return S_OK;
343 }
#define TRUE
Definition: types.h:120
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
static LPWSTR co_strdupAtoW(LPCSTR str)
Definition: ieframe.h:367
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define debugstr_a
Definition: kernel32.h:31
static const WCHAR url[]
Definition: encode.c:1432
static InternetShortcut * impl_from_IUniformResourceLocatorA(IUniformResourceLocatorA *iface)
Definition: intshcut.c:65
#define S_OK
Definition: intsafe.h:59

◆ UniformResourceLocatorW_AddRef()

static ULONG WINAPI UniformResourceLocatorW_AddRef ( IUniformResourceLocatorW *  url)
static

Definition at line 209 of file intshcut.c.

210 {
212  TRACE("(%p)\n", url);
213  return Unknown_AddRef(This);
214 }
static InternetShortcut * impl_from_IUniformResourceLocatorW(IUniformResourceLocatorW *iface)
Definition: intshcut.c:70
static ULONG Unknown_AddRef(InternetShortcut *This)
Definition: intshcut.c:180
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR url[]
Definition: encode.c:1432

◆ UniformResourceLocatorW_GetUrl()

static HRESULT WINAPI UniformResourceLocatorW_GetUrl ( IUniformResourceLocatorW *  url,
LPWSTR ppszURL 
)
static

Definition at line 242 of file intshcut.c.

243 {
245 
246  TRACE("(%p, %p)\n", url, ppszURL);
247 
248  if (!This->url) {
249  *ppszURL = NULL;
250  return S_FALSE;
251  }
252 
253  *ppszURL = co_strdupW(This->url);
254  if (!*ppszURL)
255  return E_OUTOFMEMORY;
256 
257  return S_OK;
258 }
static InternetShortcut * impl_from_IUniformResourceLocatorW(IUniformResourceLocatorW *iface)
Definition: intshcut.c:70
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR url[]
Definition: encode.c:1432
#define S_OK
Definition: intsafe.h:59
static LPWSTR co_strdupW(LPCWSTR str)
Definition: ieframe.h:359

◆ UniformResourceLocatorW_InvokeCommand()

static HRESULT WINAPI UniformResourceLocatorW_InvokeCommand ( IUniformResourceLocatorW *  url,
PURLINVOKECOMMANDINFOW  pCommandInfo 
)
static

Definition at line 260 of file intshcut.c.

261 {
263  WCHAR app[64];
264  HKEY hkey;
265  static const WCHAR wszURLProtocol[] = {'U','R','L',' ','P','r','o','t','o','c','o','l',0};
266  SHELLEXECUTEINFOW sei;
267  DWORD res, type;
268  HRESULT hres;
269 
270  TRACE("%p %p\n", This, pCommandInfo );
271 
272  if (pCommandInfo->dwcbSize < sizeof (URLINVOKECOMMANDINFOW))
273  return E_INVALIDARG;
274 
275  if (pCommandInfo->dwFlags != IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB)
276  {
277  FIXME("(%p, %p): non-default verbs not implemented\n", url, pCommandInfo);
278  return E_NOTIMPL;
279  }
280 
281  hres = CoInternetParseUrl(This->url, PARSE_SCHEMA, 0, app, ARRAY_SIZE(app), NULL, 0);
282  if(FAILED(hres))
283  return E_FAIL;
284 
285  res = RegOpenKeyW(HKEY_CLASSES_ROOT, app, &hkey);
286  if(res != ERROR_SUCCESS)
287  return E_FAIL;
288 
289  res = RegQueryValueExW(hkey, wszURLProtocol, NULL, &type, NULL, NULL);
290  RegCloseKey(hkey);
291  if(res != ERROR_SUCCESS || type != REG_SZ)
292  return E_FAIL;
293 
294  memset(&sei, 0, sizeof(sei));
295  sei.cbSize = sizeof(sei);
296  sei.lpFile = This->url;
297  sei.nShow = SW_SHOW;
298 
299  if( ShellExecuteExW(&sei) )
300  return S_OK;
301  else
302  return E_FAIL;
303 }
#define ERROR_SUCCESS
Definition: deptool.c:10
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
Definition: internet.c:392
#define E_FAIL
Definition: ddrawi.h:102
static InternetShortcut * impl_from_IUniformResourceLocatorW(IUniformResourceLocatorW *iface)
Definition: intshcut.c:70
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3311
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2225
#define SW_SHOW
Definition: winuser.h:769
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4134
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR url[]
Definition: encode.c:1432
unsigned long DWORD
Definition: ntddk_ex.h:95
#define S_OK
Definition: intsafe.h:59
#define ARRAY_SIZE(a)
Definition: main.h:24
#define E_NOTIMPL
Definition: ddrawi.h:99
GLuint res
Definition: glext.h:9613
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define memset(x, y, z)
Definition: compat.h:39
#define REG_SZ
Definition: layer.c:22

Referenced by OpenURL(), and UniformResourceLocatorA_InvokeCommand().

◆ UniformResourceLocatorW_QueryInterface()

static HRESULT WINAPI UniformResourceLocatorW_QueryInterface ( IUniformResourceLocatorW *  url,
REFIID  riid,
PVOID ppvObject 
)
static

Definition at line 202 of file intshcut.c.

203 {
205  TRACE("(%p, %s, %p)\n", url, debugstr_guid(riid), ppvObject);
207 }
REFIID riid
Definition: precomp.h:44
static InternetShortcut * impl_from_IUniformResourceLocatorW(IUniformResourceLocatorW *iface)
Definition: intshcut.c:70
#define debugstr_guid
Definition: kernel32.h:35
static HRESULT Unknown_QueryInterface(InternetShortcut *This, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:147
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR url[]
Definition: encode.c:1432
REFIID LPVOID * ppvObject
Definition: precomp.h:44

◆ UniformResourceLocatorW_Release()

static ULONG WINAPI UniformResourceLocatorW_Release ( IUniformResourceLocatorW *  url)
static

Definition at line 216 of file intshcut.c.

217 {
219  TRACE("(%p)\n", url);
220  return Unknown_Release(This);
221 }
static ULONG Unknown_Release(InternetShortcut *This)
Definition: intshcut.c:186
static InternetShortcut * impl_from_IUniformResourceLocatorW(IUniformResourceLocatorW *iface)
Definition: intshcut.c:70
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR url[]
Definition: encode.c:1432

◆ UniformResourceLocatorW_SetUrl()

static HRESULT WINAPI UniformResourceLocatorW_SetUrl ( IUniformResourceLocatorW *  url,
LPCWSTR  pcszURL,
DWORD  dwInFlags 
)
static

Definition at line 223 of file intshcut.c.

224 {
225  WCHAR *newURL = NULL;
227  TRACE("(%p, %s, 0x%x)\n", url, debugstr_w(pcszURL), dwInFlags);
228  if (dwInFlags != 0)
229  FIXME("ignoring unsupported flags 0x%x\n", dwInFlags);
230  if (pcszURL != NULL)
231  {
232  newURL = co_strdupW(pcszURL);
233  if (newURL == NULL)
234  return E_OUTOFMEMORY;
235  }
236  CoTaskMemFree(This->url);
237  This->url = newURL;
238  This->isDirty = TRUE;
239  return S_OK;
240 }
#define TRUE
Definition: types.h:120
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
static InternetShortcut * impl_from_IUniformResourceLocatorW(IUniformResourceLocatorW *iface)
Definition: intshcut.c:70
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR url[]
Definition: encode.c:1432
#define S_OK
Definition: intsafe.h:59
static LPWSTR co_strdupW(LPCWSTR str)
Definition: ieframe.h:359

◆ Unknown_AddRef()

static ULONG Unknown_AddRef ( InternetShortcut This)
static

Definition at line 180 of file intshcut.c.

181 {
182  TRACE("(%p)\n", This);
183  return InterlockedIncrement(&This->refCount);
184 }
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53

Referenced by PersistFile_AddRef(), PropertySetStorage_AddRef(), UniformResourceLocatorA_AddRef(), and UniformResourceLocatorW_AddRef().

◆ Unknown_QueryInterface()

static HRESULT Unknown_QueryInterface ( InternetShortcut This,
REFIID  riid,
PVOID ppvObject 
)
static

Definition at line 147 of file intshcut.c.

148 {
149  TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
150  *ppvObject = NULL;
152  *ppvObject = &This->IUniformResourceLocatorA_iface;
153  else if (IsEqualGUID(&IID_IUniformResourceLocatorA, riid))
154  *ppvObject = &This->IUniformResourceLocatorA_iface;
155  else if (IsEqualGUID(&IID_IUniformResourceLocatorW, riid))
156  *ppvObject = &This->IUniformResourceLocatorW_iface;
157  else if (IsEqualGUID(&IID_IPersistFile, riid))
158  *ppvObject = &This->IPersistFile_iface;
159  else if (IsEqualGUID(&IID_IPropertySetStorage, riid))
160  *ppvObject = &This->IPropertySetStorage_iface;
161  else if (IsEqualGUID(&IID_IShellLinkA, riid))
162  {
163  FIXME("The IShellLinkA interface is not yet supported by InternetShortcut\n");
164  return E_NOINTERFACE;
165  }
166  else if (IsEqualGUID(&IID_IShellLinkW, riid))
167  {
168  FIXME("The IShellLinkW interface is not yet supported by InternetShortcut\n");
169  return E_NOINTERFACE;
170  }
171  else
172  {
173  FIXME("Interface with GUID %s not yet implemented by InternetShortcut\n", debugstr_guid(riid));
174  return E_NOINTERFACE;
175  }
176  IUnknown_AddRef((IUnknown*)*ppvObject);
177  return S_OK;
178 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
const GUID IID_IPersistFile

Referenced by InternetShortcut_Create(), PersistFile_QueryInterface(), PropertySetStorage_QueryInterface(), UniformResourceLocatorA_QueryInterface(), and UniformResourceLocatorW_QueryInterface().

◆ Unknown_Release()

static ULONG Unknown_Release ( InternetShortcut This)
static

Definition at line 186 of file intshcut.c.

187 {
188  ULONG count;
189  TRACE("(%p)\n", This);
190  count = InterlockedDecrement(&This->refCount);
191  if (count == 0)
192  {
193  CoTaskMemFree(This->url);
194  CoTaskMemFree(This->currentFile);
195  IPropertySetStorage_Release(This->property_set_storage);
196  heap_free(This);
197  unlock_module();
198  }
199  return count;
200 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define TRACE(s)
Definition: solgame.cpp:4
static void unlock_module(void)
Definition: ieframe.h:339
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by InternetShortcut_Create(), OpenURL(), PersistFile_Release(), PropertySetStorage_Release(), UniformResourceLocatorA_Release(), and UniformResourceLocatorW_Release().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ieframe  )

Variable Documentation

◆ persistFileVtbl

const IPersistFileVtbl persistFileVtbl
static
Initial value:
= {
}
static HRESULT WINAPI PersistFile_SaveCompleted(IPersistFile *pFile, LPCOLESTR pszFileName)
Definition: intshcut.c:652
static ULONG WINAPI PersistFile_AddRef(IPersistFile *pFile)
Definition: intshcut.c:395
static HRESULT WINAPI PersistFile_QueryInterface(IPersistFile *pFile, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:388
static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR pszFileName, DWORD dwMode)
Definition: intshcut.c:457
static HRESULT WINAPI PersistFile_GetClassID(IPersistFile *pFile, CLSID *pClassID)
Definition: intshcut.c:409
static HRESULT WINAPI PersistFile_GetCurFile(IPersistFile *pFile, LPOLESTR *ppszFileName)
Definition: intshcut.c:658
static ULONG WINAPI PersistFile_Release(IPersistFile *pFile)
Definition: intshcut.c:402
static HRESULT WINAPI PersistFile_Save(IPersistFile *pFile, LPCOLESTR pszFileName, BOOL fRemember)
Definition: intshcut.c:539
static HRESULT WINAPI PersistFile_IsDirty(IPersistFile *pFile)
Definition: intshcut.c:416

Definition at line 764 of file intshcut.c.

Referenced by create_shortcut().

◆ propertySetStorageVtbl

const IPropertySetStorageVtbl propertySetStorageVtbl
static
Initial value:
= {
}
static HRESULT WINAPI PropertySetStorage_Create(IPropertySetStorage *iface, REFFMTID rfmtid, const CLSID *pclsid, DWORD grfFlags, DWORD grfMode, IPropertyStorage **ppprstg)
Definition: intshcut.c:695
static HRESULT WINAPI PropertySetStorage_Delete(IPropertySetStorage *iface, REFFMTID rfmtid)
Definition: intshcut.c:730
static ULONG WINAPI PropertySetStorage_AddRef(IPropertySetStorage *iface)
Definition: intshcut.c:681
static ULONG WINAPI PropertySetStorage_Release(IPropertySetStorage *iface)
Definition: intshcut.c:688
static HRESULT WINAPI PropertySetStorage_Open(IPropertySetStorage *iface, REFFMTID rfmtid, DWORD grfMode, IPropertyStorage **ppprstg)
Definition: intshcut.c:714
static HRESULT WINAPI PropertySetStorage_QueryInterface(IPropertySetStorage *iface, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:674
static HRESULT WINAPI PropertySetStorage_Enum(IPropertySetStorage *iface, IEnumSTATPROPSETSTG **ppenum)
Definition: intshcut.c:740

Definition at line 776 of file intshcut.c.

Referenced by create_shortcut().

◆ uniformResourceLocatorAVtbl

const IUniformResourceLocatorAVtbl uniformResourceLocatorAVtbl
static
Initial value:
= {
}
static HRESULT WINAPI UniformResourceLocatorA_QueryInterface(IUniformResourceLocatorA *url, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:305
static ULONG WINAPI UniformResourceLocatorA_AddRef(IUniformResourceLocatorA *url)
Definition: intshcut.c:312
static HRESULT WINAPI UniformResourceLocatorA_GetUrl(IUniformResourceLocatorA *url, LPSTR *ppszURL)
Definition: intshcut.c:345
static ULONG WINAPI UniformResourceLocatorA_Release(IUniformResourceLocatorA *url)
Definition: intshcut.c:319
static HRESULT WINAPI UniformResourceLocatorA_InvokeCommand(IUniformResourceLocatorA *url, PURLINVOKECOMMANDINFOA pCommandInfo)
Definition: intshcut.c:364
static HRESULT WINAPI UniformResourceLocatorA_SetUrl(IUniformResourceLocatorA *url, LPCSTR pcszURL, DWORD dwInFlags)
Definition: intshcut.c:326

Definition at line 755 of file intshcut.c.

Referenced by create_shortcut().

◆ uniformResourceLocatorWVtbl

const IUniformResourceLocatorWVtbl uniformResourceLocatorWVtbl
static
Initial value:
= {
}
static HRESULT WINAPI UniformResourceLocatorW_GetUrl(IUniformResourceLocatorW *url, LPWSTR *ppszURL)
Definition: intshcut.c:242
static HRESULT WINAPI UniformResourceLocatorW_QueryInterface(IUniformResourceLocatorW *url, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:202
static ULONG WINAPI UniformResourceLocatorW_Release(IUniformResourceLocatorW *url)
Definition: intshcut.c:216
static HRESULT WINAPI UniformResourceLocatorW_SetUrl(IUniformResourceLocatorW *url, LPCWSTR pcszURL, DWORD dwInFlags)
Definition: intshcut.c:223
static ULONG WINAPI UniformResourceLocatorW_AddRef(IUniformResourceLocatorW *url)
Definition: intshcut.c:209
static HRESULT WINAPI UniformResourceLocatorW_InvokeCommand(IUniformResourceLocatorW *url, PURLINVOKECOMMANDINFOW pCommandInfo)
Definition: intshcut.c:260

Definition at line 746 of file intshcut.c.

Referenced by create_shortcut().