ReactOS 0.4.17-dev-1071-gb2116d0
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
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ieframe)
 
static InternetShortcut * impl_from_IUniformResourceLocatorA (IUniformResourceLocatorA *iface)
 
static InternetShortcut * impl_from_IUniformResourceLocatorW (IUniformResourceLocatorW *iface)
 
static InternetShortcut * impl_from_IPersistFile (IPersistFile *iface)
 
static InternetShortcut * impl_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 InternetShortcut * create_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
 

Function Documentation

◆ create_shortcut()

static InternetShortcut * create_shortcut ( void  )
static

Definition at line 790 of file intshcut.c.

791{
792 InternetShortcut *newshortcut;
793
794 newshortcut = calloc(1, sizeof(InternetShortcut));
795 if (newshortcut)
796 {
797 HRESULT hr;
799
802 newshortcut->IPersistFile_iface.lpVtbl = &persistFileVtbl;
804 newshortcut->refCount = 1;
806 STGFMT_STORAGE, 0, NULL, NULL, &IID_IPropertySetStorage, (void **) &newshortcut->property_set_storage);
807 if (FAILED(hr))
808 {
809 TRACE("Failed to create the storage object needed for the shortcut.\n");
810 free(newshortcut);
811 return NULL;
812 }
813
814 hr = IPropertySetStorage_Create(newshortcut->property_set_storage, &FMTID_Intshcut, NULL, PROPSETFLAG_DEFAULT, STGM_CREATE | STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &dummy);
815 if (FAILED(hr))
816 {
817 TRACE("Failed to create the property object needed for the shortcut.\n");
818 IPropertySetStorage_Release(newshortcut->property_set_storage);
819 free(newshortcut);
820 return NULL;
821 }
822 IPropertyStorage_Release(dummy);
823 }
824
825 return newshortcut;
826}
IPersistFile IPersistFile_iface
Definition: intshcut.c:50
IUniformResourceLocatorA IUniformResourceLocatorA_iface
Definition: intshcut.c:48
IUniformResourceLocatorW IUniformResourceLocatorW_iface
Definition: intshcut.c:49
IPropertySetStorage IPropertySetStorage_iface
Definition: intshcut.c:51
IPropertySetStorage * property_set_storage
Definition: intshcut.c:55
#define free
Definition: debug_ros.c:5
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
static const IUniformResourceLocatorWVtbl uniformResourceLocatorWVtbl
Definition: intshcut.c:750
static const IPersistFileVtbl persistFileVtbl
Definition: intshcut.c:768
static const IUniformResourceLocatorAVtbl uniformResourceLocatorAVtbl
Definition: intshcut.c:759
static const IPropertySetStorageVtbl propertySetStorageVtbl
Definition: intshcut.c:780
HRESULT WINAPI StgCreateStorageEx(const WCHAR *pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS *pStgOptions, void *reserved, REFIID riid, void **ppObjectOpen)
Definition: storage32.c:8618
#define FAILED(hr)
Definition: intsafe.h:51
#define STGM_CREATE
Definition: objbase.h:945
#define STGM_READWRITE
Definition: objbase.h:938
#define STGM_SHARE_EXCLUSIVE
Definition: objbase.h:942
#define STGM_DELETEONRELEASE
Definition: objbase.h:944
#define STGFMT_STORAGE
Definition: objbase.h:952
#define calloc
Definition: rosglue.h:14
#define TRACE(s)
Definition: solgame.cpp:4

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 422 of file intshcut.c.

424{
425 DWORD r = 0;
426 DWORD len = 128;
427 WCHAR *buffer;
428
429 *rString = NULL;
430 buffer = CoTaskMemAlloc(len * sizeof(*buffer));
431 if (!buffer)
432 return E_OUTOFMEMORY;
433
434 r = GetPrivateProfileStringW(lpAppName, lpKeyName, NULL, buffer, len, lpFileName);
435 while (r == len-1)
436 {
437 WCHAR *realloc_buf;
438
439 len *= 2;
440 realloc_buf = CoTaskMemRealloc(buffer, len * sizeof(*buffer));
441 if (realloc_buf == NULL)
442 {
444 return E_OUTOFMEMORY;
445 }
446 buffer = realloc_buf;
447
448 r = GetPrivateProfileStringW(lpAppName, lpKeyName, NULL, buffer, len, lpFileName);
449 }
450
451 *rString = buffer;
452 return r ? S_OK : E_FAIL;
453}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_FAIL
Definition: ddrawi.h:102
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
void *WINAPI CoTaskMemRealloc(void *ptr, SIZE_T size)
Definition: malloc.c:397
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
Definition: profile.c:1142
unsigned long DWORD
Definition: ntddk_ex.h:95
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLuint buffer
Definition: glext.h:5915
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:52
short WCHAR
Definition: pedump.c:58
_In_ LPCSTR lpFileName
Definition: winbase.h:2800

Referenced by PersistFile_Load().

◆ impl_from_IPersistFile()

static InternetShortcut * impl_from_IPersistFile ( IPersistFile *  iface)
inlinestatic

Definition at line 73 of file intshcut.c.

74{
75 return CONTAINING_RECORD(iface, InternetShortcut, IPersistFile_iface);
76}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

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

◆ impl_from_IUniformResourceLocatorA()

static InternetShortcut * impl_from_IUniformResourceLocatorA ( IUniformResourceLocatorA *  iface)
inlinestatic

◆ impl_from_IUniformResourceLocatorW()

static InternetShortcut * impl_from_IUniformResourceLocatorW ( IUniformResourceLocatorW *  iface)
inlinestatic

◆ InternetShortcut_Create()

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

Definition at line 828 of file intshcut.c.

829{
832
833 TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
834
835 *ppv = NULL;
836
837 if(outer)
839
841 if(!This)
842 return E_OUTOFMEMORY;
843
846 return hres;
847}
static ULONG Unknown_Release(InternetShortcut *This)
Definition: intshcut.c:184
static InternetShortcut * create_shortcut(void)
Definition: intshcut.c:790
static HRESULT Unknown_QueryInterface(InternetShortcut *This, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:145
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
HRESULT hres
Definition: protocol.c:432
static IUnknown * outer
Definition: compobj.c:82
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:3771

◆ OpenURL()

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

Definition at line 853 of file intshcut.c.

854{
855 InternetShortcut *shortcut;
856 WCHAR* urlfilepath = NULL;
857 int len;
858
859 shortcut = create_shortcut();
860
861 if(!shortcut)
862 return;
863
864 len = MultiByteToWideChar(CP_ACP, 0, lpcstrUrl, -1, NULL, 0);
865 urlfilepath = malloc(len * sizeof(WCHAR));
866 MultiByteToWideChar(CP_ACP, 0, lpcstrUrl, -1, urlfilepath, len);
867
868 if(SUCCEEDED(IPersistFile_Load(&shortcut->IPersistFile_iface, urlfilepath, 0))) {
870
871 memset( &ici, 0, sizeof ici );
872 ici.dwcbSize = sizeof ici;
874 ici.hwndParent = hWnd;
875
877 TRACE("failed to open URL: %s\n", debugstr_a(lpcstrUrl));
878 }
879
880 free(urlfilepath);
881 Unknown_Release(shortcut);
882}
HWND hWnd
Definition: settings.c:17
#define malloc
Definition: debug_ros.c:4
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
static HRESULT WINAPI UniformResourceLocatorW_InvokeCommand(IUniformResourceLocatorW *url, PURLINVOKECOMMANDINFOW pCommandInfo)
Definition: intshcut.c:258
#define SUCCEEDED(hr)
Definition: intsafe.h:50
@ IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB
Definition: intshcut.h:43
#define debugstr_a
Definition: kernel32.h:31
#define memset(x, y, z)
Definition: compat.h:39

◆ PersistFile_AddRef()

static ULONG WINAPI PersistFile_AddRef ( IPersistFile *  pFile)
static

Definition at line 393 of file intshcut.c.

394{
396 TRACE("(%p)\n", pFile);
397 return Unknown_AddRef(This);
398}
static InternetShortcut * impl_from_IPersistFile(IPersistFile *iface)
Definition: intshcut.c:73
static ULONG Unknown_AddRef(InternetShortcut *This)
Definition: intshcut.c:178
MdFileObject pFile

◆ PersistFile_GetClassID()

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

Definition at line 407 of file intshcut.c.

408{
409 TRACE("(%p, %p)\n", pFile, pClassID);
410 *pClassID = CLSID_InternetShortcut;
411 return S_OK;
412}

◆ PersistFile_GetCurFile()

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

Definition at line 657 of file intshcut.c.

658{
659 HRESULT hr = S_OK;
661 TRACE("(%p, %p)\n", pFile, ppszFileName);
662 if (This->currentFile == NULL)
663 *ppszFileName = NULL;
664 else
665 {
666 *ppszFileName = co_strdupW(This->currentFile);
667 if (*ppszFileName == NULL)
669 }
670 return hr;
671}
static LPWSTR co_strdupW(LPCWSTR str)
Definition: ieframe.h:350

◆ PersistFile_IsDirty()

static HRESULT WINAPI PersistFile_IsDirty ( IPersistFile *  pFile)
static

Definition at line 414 of file intshcut.c.

415{
417 TRACE("(%p)\n", pFile);
418 return This->isDirty ? S_OK : S_FALSE;
419}
#define S_FALSE
Definition: winerror.h:3451

◆ PersistFile_Load()

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

Definition at line 455 of file intshcut.c.

456{
457 static const WCHAR str_header[] = {'I','n','t','e','r','n','e','t','S','h','o','r','t','c','u','t',0};
458 static const WCHAR str_URL[] = {'U','R','L',0};
459 static const WCHAR str_iconfile[] = {'i','c','o','n','f','i','l','e',0};
460 static const WCHAR str_iconindex[] = {'i','c','o','n','i','n','d','e','x',0};
463 WCHAR *url;
464 HRESULT hr;
465 IPropertyStorage *pPropStg;
466 WCHAR *iconfile;
467 WCHAR *iconindexstring;
468
469 TRACE("(%p, %s, 0x%lx)\n", pFile, debugstr_w(pszFileName), dwMode);
470
471 if (dwMode != 0)
472 FIXME("ignoring unimplemented mode 0x%lx\n", dwMode);
473
475 if (!filename)
476 return E_OUTOFMEMORY;
477
478 if (FAILED(hr = get_profile_string(str_header, str_URL, pszFileName, &url)))
479 {
481 return hr;
482 }
483
484 hr = IPropertySetStorage_Open(This->property_set_storage, &FMTID_Intshcut,
486 if (FAILED(hr))
487 {
490 return hr;
491 }
492
493 CoTaskMemFree(This->currentFile);
494 This->currentFile = filename;
495 CoTaskMemFree(This->url);
496 This->url = url;
497 This->isDirty = FALSE;
498
499 /* Now we're going to read in the iconfile and iconindex.
500 If we don't find them, that's not a failure case -- it's possible
501 that they just aren't in there. */
502
503 if (get_profile_string(str_header, str_iconfile, pszFileName, &iconfile) == S_OK)
504 {
505 PROPSPEC ps;
506 PROPVARIANT pv;
507 ps.ulKind = PRSPEC_PROPID;
508 ps.propid = PID_IS_ICONFILE;
509 pv.vt = VT_LPWSTR;
510 pv.pwszVal = iconfile;
511 hr = IPropertyStorage_WriteMultiple(pPropStg, 1, &ps, &pv, 0);
512 if (FAILED(hr))
513 TRACE("Failed to store the iconfile to our property storage. hr = 0x%lx\n", hr);
514 }
515 CoTaskMemFree(iconfile);
516
517 if (get_profile_string(str_header, str_iconindex, pszFileName, &iconindexstring) == S_OK)
518 {
519 int iconindex;
520 PROPSPEC ps;
521 PROPVARIANT pv;
522 iconindex = wcstol(iconindexstring, NULL, 10);
523 ps.ulKind = PRSPEC_PROPID;
524 ps.propid = PID_IS_ICONINDEX;
525 pv.vt = VT_I4;
526 pv.iVal = iconindex;
527 hr = IPropertyStorage_WriteMultiple(pPropStg, 1, &ps, &pv, 0);
528 if (FAILED(hr))
529 TRACE("Failed to store the iconindex to our property storage. hr = 0x%lx\n", hr);
530 }
531 CoTaskMemFree(iconindexstring);
532
533 IPropertyStorage_Release(pPropStg);
534 return hr;
535}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define FALSE
Definition: types.h:117
@ VT_LPWSTR
Definition: compat.h:2325
@ VT_I4
Definition: compat.h:2298
static HRESULT get_profile_string(LPCWSTR lpAppName, LPCWSTR lpKeyName, LPCWSTR lpFileName, WCHAR **rString)
Definition: intshcut.c:422
_ACRTIMP __msvcrt_long __cdecl wcstol(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2752
const char * filename
Definition: ioapi.h:137
#define debugstr_w
Definition: kernel32.h:32
static const WCHAR url[]
Definition: encode.c:1384
#define PID_IS_ICONINDEX
Definition: shlobj.h:2511
#define PID_IS_ICONFILE
Definition: shlobj.h:2512
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:44

◆ PersistFile_QueryInterface()

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

Definition at line 386 of file intshcut.c.

387{
389 TRACE("(%p, %s, %p)\n", pFile, debugstr_guid(riid), ppvObject);
390 return Unknown_QueryInterface(This, riid, ppvObject);
391}

◆ PersistFile_Release()

static ULONG WINAPI PersistFile_Release ( IPersistFile *  pFile)
static

Definition at line 400 of file intshcut.c.

401{
403 TRACE("(%p)\n", pFile);
404 return Unknown_Release(This);
405}

◆ PersistFile_Save()

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

Definition at line 537 of file intshcut.c.

538{
539 HRESULT hr = S_OK;
540 INT len;
541 CHAR *url;
543
544 TRACE("(%p, %s, %d)\n", pFile, debugstr_w(pszFileName), fRemember);
545
546 if (pszFileName != NULL && fRemember)
547 {
548 LPOLESTR oldFile = This->currentFile;
549 This->currentFile = co_strdupW(pszFileName);
550 if (This->currentFile == NULL)
551 {
552 This->currentFile = oldFile;
553 return E_OUTOFMEMORY;
554 }
555 CoTaskMemFree(oldFile);
556 }
557 if (This->url == NULL)
558 return E_FAIL;
559
560 /* Windows seems to always write:
561 * ASCII "[InternetShortcut]" headers
562 * ASCII names in "name=value" pairs
563 * An ASCII (probably UTF8?) value in "URL=..."
564 */
565 len = WideCharToMultiByte(CP_UTF8, 0, This->url, -1, NULL, 0, 0, 0);
566 url = malloc(len);
567 if (url != NULL)
568 {
569 HANDLE file;
570 WideCharToMultiByte(CP_UTF8, 0, This->url, -1, url, len, 0, 0);
573 {
574 static const char str_header[] = "[InternetShortcut]";
575 static const char str_URL[] = "URL=";
576 static const char str_ICONFILE[] = "ICONFILE=";
577 static const char str_eol[] = "\r\n";
579 char *iconfile;
580 IPropertyStorage *pPropStgRead;
581 PROPSPEC ps[2];
582 PROPVARIANT pvread[2];
583 ps[0].ulKind = PRSPEC_PROPID;
584 ps[0].propid = PID_IS_ICONFILE;
585 ps[1].ulKind = PRSPEC_PROPID;
586 ps[1].propid = PID_IS_ICONINDEX;
587
588 WriteFile(file, str_header, ARRAY_SIZE(str_header) - 1, &bytesWritten, NULL);
589 WriteFile(file, str_eol, ARRAY_SIZE(str_eol) - 1, &bytesWritten, NULL);
590 WriteFile(file, str_URL, ARRAY_SIZE(str_URL) - 1, &bytesWritten, NULL);
592 WriteFile(file, str_eol, ARRAY_SIZE(str_eol) - 1, &bytesWritten, NULL);
593
594 hr = IPropertySetStorage_Open(This->property_set_storage, &FMTID_Intshcut, STGM_READ|STGM_SHARE_EXCLUSIVE, &pPropStgRead);
595 if (SUCCEEDED(hr))
596 {
597 hr = IPropertyStorage_ReadMultiple(pPropStgRead, 2, ps, pvread);
598 if (hr == S_FALSE)
599 {
600 /* None of the properties are present, that's ok */
601 hr = S_OK;
602 IPropertyStorage_Release(pPropStgRead);
603 }
604 else if (SUCCEEDED(hr))
605 {
606 char indexString[50];
607 len = WideCharToMultiByte(CP_UTF8, 0, pvread[0].pwszVal, -1, NULL, 0, 0, 0);
608 iconfile = malloc(len);
609 if (iconfile != NULL)
610 {
611 WideCharToMultiByte(CP_UTF8, 0, pvread[0].pwszVal, -1, iconfile, len, 0, 0);
612 WriteFile(file, str_ICONFILE, lstrlenA(str_ICONFILE), &bytesWritten, NULL);
613 WriteFile(file, iconfile, lstrlenA(iconfile), &bytesWritten, NULL);
614 WriteFile(file, str_eol, lstrlenA(str_eol), &bytesWritten, NULL);
615 free(iconfile);
616 }
617
618 sprintf(indexString, "ICONINDEX=%d", pvread[1].iVal);
619 WriteFile(file, indexString, lstrlenA(indexString), &bytesWritten, NULL);
620 WriteFile(file, str_eol, lstrlenA(str_eol), &bytesWritten, NULL);
621
622 IPropertyStorage_Release(pPropStgRead);
623 PropVariantClear(&pvread[0]);
624 PropVariantClear(&pvread[1]);
625 }
626 else
627 {
628 TRACE("Unable to read properties.\n");
629 }
630 }
631 else
632 {
633 TRACE("Unable to get the IPropertyStorage.\n");
634 }
635
637 if (pszFileName == NULL || fRemember)
638 This->isDirty = FALSE;
640 }
641 else
642 hr = E_FAIL;
643 free(url);
644 }
645 else
647
648 return hr;
649}
#define ARRAY_SIZE(A)
Definition: main.h:20
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
Definition: combase.c:709
#define CloseHandle
Definition: compat.h:739
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileW
Definition: compat.h:741
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define WideCharToMultiByte
Definition: compat.h:111
#define FILE_SHARE_READ
Definition: compat.h:136
static BOOL StartLinkProcessor(LPCOLESTR szLink)
Definition: intshcut.c:125
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
Definition: rw.c:25
GLenum GLsizei GLuint GLint * bytesWritten
Definition: glext.h:11123
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define CREATE_ALWAYS
Definition: disk.h:72
#define sprintf
Definition: sprintf.c:45
#define GENERIC_WRITE
Definition: nt_native.h:90
#define STGM_READ
Definition: objbase.h:936
char CHAR
Definition: pedump.c:57
#define CP_UTF8
Definition: nls.h:20
Definition: fci.c:123
int32_t INT
Definition: typedefs.h:58

◆ PersistFile_SaveCompleted()

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

Definition at line 651 of file intshcut.c.

652{
653 FIXME("(%p, %p): stub\n", pFile, pszFileName);
654 return E_NOTIMPL;
655}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ PropertySetStorage_AddRef()

static ULONG WINAPI PropertySetStorage_AddRef ( IPropertySetStorage *  iface)
static

Definition at line 680 of file intshcut.c.

681{
683 TRACE("(%p)\n", iface);
684 return Unknown_AddRef(This);
685}
static InternetShortcut * impl_from_IPropertySetStorage(IPropertySetStorage *iface)
Definition: intshcut.c:78

◆ PropertySetStorage_Create()

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

Definition at line 694 of file intshcut.c.

701{
703 TRACE("(%s, %p, 0x%lx, 0x%lx, %p)\n", debugstr_guid(rfmtid), pclsid, grfFlags, grfMode, ppprstg);
704
705 return IPropertySetStorage_Create(This->property_set_storage,
706 rfmtid,
707 pclsid,
708 grfFlags,
709 grfMode,
710 ppprstg);
711}

◆ PropertySetStorage_Delete()

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

Definition at line 734 of file intshcut.c.

735{
737 TRACE("(%s)\n", debugstr_guid(rfmtid));
738
739
740 return IPropertySetStorage_Delete(This->property_set_storage,
741 rfmtid);
742}

◆ PropertySetStorage_Enum()

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

Definition at line 744 of file intshcut.c.

745{
746 FIXME("(%p): stub\n", ppenum);
747 return E_NOTIMPL;
748}

◆ PropertySetStorage_Open()

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

Definition at line 713 of file intshcut.c.

718{
719 const DWORD STGM_ACCESS_MASK = 0x0000000f;
721 TRACE("(%s, 0x%lx, %p)\n", debugstr_guid(rfmtid), grfMode, ppprstg);
722
723 /* ole32 doesn't like STGM_WRITE */
724 if ((grfMode & STGM_ACCESS_MASK) == STGM_WRITE)
725 grfMode = (grfMode & ~STGM_ACCESS_MASK) | STGM_READWRITE;
726
727 /* Note: The |STGM_SHARE_EXCLUSIVE is to cope with a bug in the implementation. Should be fixed in ole32. */
728 return IPropertySetStorage_Open(This->property_set_storage,
729 rfmtid,
730 grfMode|STGM_SHARE_EXCLUSIVE,
731 ppprstg);
732}
#define STGM_WRITE
Definition: objbase.h:937

◆ PropertySetStorage_QueryInterface()

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

Definition at line 673 of file intshcut.c.

674{
676 TRACE("(%p)\n", iface);
677 return Unknown_QueryInterface(This, riid, ppvObject);
678}

◆ PropertySetStorage_Release()

static ULONG WINAPI PropertySetStorage_Release ( IPropertySetStorage *  iface)
static

Definition at line 687 of file intshcut.c.

688{
690 TRACE("(%p)\n", iface);
691 return Unknown_Release(This);
692}

◆ run_winemenubuilder()

static BOOL run_winemenubuilder ( const WCHAR *  args)
static

Definition at line 83 of file intshcut.c.

84{
85 static const WCHAR menubuilder[] = {'\\','w','i','n','e','m','e','n','u','b','u','i','l','d','e','r','.','e','x','e',0};
86 LONG len;
90 BOOL ret;
91 WCHAR app[MAX_PATH];
92 void *redir;
93
94 GetSystemDirectoryW( app, MAX_PATH - ARRAY_SIZE( menubuilder ));
95 lstrcatW( app, menubuilder );
96
97 len = (lstrlenW( app ) + lstrlenW( args ) + 1) * sizeof(WCHAR);
98 buffer = malloc( len );
99 if( !buffer )
100 return FALSE;
101
102 lstrcpyW( buffer, app );
103 lstrcatW( buffer, args );
104
105 TRACE("starting %s\n",debugstr_w(buffer));
106
107 memset(&si, 0, sizeof(si));
108 si.cb = sizeof(si);
109
113
114 free( buffer );
115
116 if (ret)
117 {
120 }
121
122 return ret;
123}
#define MAX_PATH
Definition: compat.h:34
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2331
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:4491
BOOL WINAPI Wow64RevertWow64FsRedirection(IN PVOID OldValue)
Definition: utils.c:836
BOOL WINAPI Wow64DisableWow64FsRedirection(IN PVOID *OldValue)
Definition: utils.c:813
return ret
Definition: mutex.c:147
unsigned int BOOL
Definition: ntddk_ex.h:94
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
static PROCESS_INFORMATION pi
Definition: debugger.c:2303
static SYSTEM_INFO si
Definition: virtual.c:39
long LONG
Definition: pedump.c:60
Definition: match.c:390
uint16_t * LPWSTR
Definition: typedefs.h:56
#define DETACHED_PROCESS
Definition: winbase.h:184

Referenced by StartLinkProcessor().

◆ StartLinkProcessor()

static BOOL StartLinkProcessor ( LPCOLESTR  szLink)
static

Definition at line 125 of file intshcut.c.

126{
127 static const WCHAR szFormat[] = { ' ','-','w',' ','-','u',' ','"','%','s','"',0 };
128 LONG len;
130 BOOL ret;
131
132 len = sizeof(szFormat) + lstrlenW( szLink ) * sizeof(WCHAR);
133 buffer = malloc( len );
134 if( !buffer )
135 return FALSE;
136
137 swprintf( buffer, len / sizeof(WCHAR), szFormat, szLink );
139 free( buffer );
140 return ret;
141}
static BOOL run_winemenubuilder(const WCHAR *args)
Definition: intshcut.c:83
#define swprintf
Definition: precomp.h:40

Referenced by PersistFile_Save().

◆ UniformResourceLocatorA_AddRef()

static ULONG WINAPI UniformResourceLocatorA_AddRef ( IUniformResourceLocatorA *  url)
static

Definition at line 310 of file intshcut.c.

311{
313 TRACE("(%p)\n", url);
314 return Unknown_AddRef(This);
315}
static InternetShortcut * impl_from_IUniformResourceLocatorA(IUniformResourceLocatorA *iface)
Definition: intshcut.c:63

◆ UniformResourceLocatorA_GetUrl()

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

Definition at line 343 of file intshcut.c.

344{
346
347 TRACE("(%p, %p)\n", url, ppszURL);
348
349 if (!This->url) {
350 *ppszURL = NULL;
351 return S_FALSE;
352
353 }
354
355 *ppszURL = co_strdupWtoA(This->url);
356 if (!*ppszURL)
357 return E_OUTOFMEMORY;
358
359 return S_OK;
360}
static LPSTR co_strdupWtoA(LPCWSTR str)
Definition: ieframe.h:369

◆ UniformResourceLocatorA_InvokeCommand()

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

Definition at line 362 of file intshcut.c.

363{
364 URLINVOKECOMMANDINFOW wideCommandInfo;
365 int len;
366 WCHAR *wideVerb;
367 HRESULT res;
369
370 wideCommandInfo.dwcbSize = sizeof wideCommandInfo;
371 wideCommandInfo.dwFlags = pCommandInfo->dwFlags;
372 wideCommandInfo.hwndParent = pCommandInfo->hwndParent;
373
374 len = MultiByteToWideChar(CP_ACP, 0, pCommandInfo->pcszVerb, -1, NULL, 0);
375 wideVerb = malloc(len * sizeof(WCHAR));
376 MultiByteToWideChar(CP_ACP, 0, pCommandInfo->pcszVerb, -1, wideVerb, len);
377
378 wideCommandInfo.pcszVerb = wideVerb;
379
380 res = UniformResourceLocatorW_InvokeCommand(&This->IUniformResourceLocatorW_iface, &wideCommandInfo);
381 free(wideVerb);
382
383 return res;
384}
GLuint res
Definition: glext.h:9613

◆ UniformResourceLocatorA_QueryInterface()

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

Definition at line 303 of file intshcut.c.

304{
306 TRACE("(%p, %s, %p)\n", url, debugstr_guid(riid), ppvObject);
307 return Unknown_QueryInterface(This, riid, ppvObject);
308}

◆ UniformResourceLocatorA_Release()

static ULONG WINAPI UniformResourceLocatorA_Release ( IUniformResourceLocatorA *  url)
static

Definition at line 317 of file intshcut.c.

318{
320 TRACE("(%p)\n", url);
321 return Unknown_Release(This);
322}

◆ UniformResourceLocatorA_SetUrl()

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

Definition at line 324 of file intshcut.c.

325{
326 WCHAR *newURL = NULL;
328 TRACE("(%p, %s, 0x%lx)\n", url, debugstr_a(pcszURL), dwInFlags);
329 if (dwInFlags != 0)
330 FIXME("ignoring unsupported flags 0x%lx\n", dwInFlags);
331 if (pcszURL != NULL)
332 {
333 newURL = co_strdupAtoW(pcszURL);
334 if (newURL == NULL)
335 return E_OUTOFMEMORY;
336 }
337 CoTaskMemFree(This->url);
338 This->url = newURL;
339 This->isDirty = TRUE;
340 return S_OK;
341}
#define TRUE
Definition: types.h:120
static LPWSTR co_strdupAtoW(LPCSTR str)
Definition: ieframe.h:358

◆ UniformResourceLocatorW_AddRef()

static ULONG WINAPI UniformResourceLocatorW_AddRef ( IUniformResourceLocatorW *  url)
static

Definition at line 207 of file intshcut.c.

208{
210 TRACE("(%p)\n", url);
211 return Unknown_AddRef(This);
212}
static InternetShortcut * impl_from_IUniformResourceLocatorW(IUniformResourceLocatorW *iface)
Definition: intshcut.c:68

◆ UniformResourceLocatorW_GetUrl()

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

Definition at line 240 of file intshcut.c.

241{
243
244 TRACE("(%p, %p)\n", url, ppszURL);
245
246 if (!This->url) {
247 *ppszURL = NULL;
248 return S_FALSE;
249 }
250
251 *ppszURL = co_strdupW(This->url);
252 if (!*ppszURL)
253 return E_OUTOFMEMORY;
254
255 return S_OK;
256}

◆ UniformResourceLocatorW_InvokeCommand()

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

Definition at line 258 of file intshcut.c.

259{
261 WCHAR app[64];
262 HKEY hkey;
263 static const WCHAR wszURLProtocol[] = {'U','R','L',' ','P','r','o','t','o','c','o','l',0};
265 DWORD res, type;
267
268 TRACE("%p %p\n", This, pCommandInfo );
269
270 if (pCommandInfo->dwcbSize < sizeof (URLINVOKECOMMANDINFOW))
271 return E_INVALIDARG;
272
274 {
275 FIXME("(%p, %p): non-default verbs not implemented\n", url, pCommandInfo);
276 return E_NOTIMPL;
277 }
278
279 hres = CoInternetParseUrl(This->url, PARSE_SCHEMA, 0, app, ARRAY_SIZE(app), NULL, 0);
280 if(FAILED(hres))
281 return E_FAIL;
282
283 res = RegOpenKeyW(HKEY_CLASSES_ROOT, app, &hkey);
284 if(res != ERROR_SUCCESS)
285 return E_FAIL;
286
287 res = RegQueryValueExW(hkey, wszURLProtocol, NULL, &type, NULL, NULL);
288 RegCloseKey(hkey);
289 if(res != ERROR_SUCCESS || type != REG_SZ)
290 return E_FAIL;
291
292 memset(&sei, 0, sizeof(sei));
293 sei.cbSize = sizeof(sei);
294 sei.lpFile = This->url;
295 sei.nShow = SW_SHOW;
296
297 if( ShellExecuteExW(&sei) )
298 return S_OK;
299 else
300 return E_FAIL;
301}
#define REG_SZ
Definition: layer.c:22
#define RegCloseKey(hKey)
Definition: registry.h:49
#define E_INVALIDARG
Definition: ddrawi.h:101
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3268
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
Definition: internet.c:325
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define SW_SHOW
Definition: winuser.h:786
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2732
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList

Referenced by OpenURL(), and UniformResourceLocatorA_InvokeCommand().

◆ UniformResourceLocatorW_QueryInterface()

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

Definition at line 200 of file intshcut.c.

201{
203 TRACE("(%p, %s, %p)\n", url, debugstr_guid(riid), ppvObject);
204 return Unknown_QueryInterface(This, riid, ppvObject);
205}

◆ UniformResourceLocatorW_Release()

static ULONG WINAPI UniformResourceLocatorW_Release ( IUniformResourceLocatorW *  url)
static

Definition at line 214 of file intshcut.c.

215{
217 TRACE("(%p)\n", url);
218 return Unknown_Release(This);
219}

◆ UniformResourceLocatorW_SetUrl()

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

Definition at line 221 of file intshcut.c.

222{
223 WCHAR *newURL = NULL;
225 TRACE("(%p, %s, 0x%lx)\n", url, debugstr_w(pcszURL), dwInFlags);
226 if (dwInFlags != 0)
227 FIXME("ignoring unsupported flags 0x%lx\n", dwInFlags);
228 if (pcszURL != NULL)
229 {
230 newURL = co_strdupW(pcszURL);
231 if (newURL == NULL)
232 return E_OUTOFMEMORY;
233 }
234 CoTaskMemFree(This->url);
235 This->url = newURL;
236 This->isDirty = TRUE;
237 return S_OK;
238}

◆ Unknown_AddRef()

static ULONG Unknown_AddRef ( InternetShortcut *  This)
static

Definition at line 178 of file intshcut.c.

179{
180 TRACE("(%p)\n", This);
181 return InterlockedIncrement(&This->refCount);
182}
#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 145 of file intshcut.c.

146{
147 TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppvObject);
148 *ppvObject = NULL;
150 *ppvObject = &This->IUniformResourceLocatorA_iface;
151 else if (IsEqualGUID(&IID_IUniformResourceLocatorA, riid))
152 *ppvObject = &This->IUniformResourceLocatorA_iface;
153 else if (IsEqualGUID(&IID_IUniformResourceLocatorW, riid))
154 *ppvObject = &This->IUniformResourceLocatorW_iface;
156 *ppvObject = &This->IPersistFile_iface;
157 else if (IsEqualGUID(&IID_IPropertySetStorage, riid))
158 *ppvObject = &This->IPropertySetStorage_iface;
159 else if (IsEqualGUID(&IID_IShellLinkA, riid))
160 {
161 FIXME("The IShellLinkA interface is not yet supported by InternetShortcut\n");
162 return E_NOINTERFACE;
163 }
164 else if (IsEqualGUID(&IID_IShellLinkW, riid))
165 {
166 FIXME("The IShellLinkW interface is not yet supported by InternetShortcut\n");
167 return E_NOINTERFACE;
168 }
169 else
170 {
171 FIXME("Interface with GUID %s not yet implemented by InternetShortcut\n", debugstr_guid(riid));
172 return E_NOINTERFACE;
173 }
174 IUnknown_AddRef((IUnknown*)*ppvObject);
175 return S_OK;
176}
const GUID IID_IUnknown
const GUID IID_IPersistFile
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:3479

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 184 of file intshcut.c.

185{
186 ULONG count;
187 TRACE("(%p)\n", This);
188 count = InterlockedDecrement(&This->refCount);
189 if (count == 0)
190 {
191 CoTaskMemFree(This->url);
192 CoTaskMemFree(This->currentFile);
193 IPropertySetStorage_Release(This->property_set_storage);
194 free(This);
196 }
197 return count;
198}
#define InterlockedDecrement
Definition: armddk.h:52
GLuint GLuint GLsizei count
Definition: gl.h:1545
static void unlock_module(void)
Definition: ieframe.h:346
uint32_t ULONG
Definition: typedefs.h:59

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_Save(IPersistFile *pFile, LPCOLESTR pszFileName, BOOL fRemember)
Definition: intshcut.c:537
static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR pszFileName, DWORD dwMode)
Definition: intshcut.c:455
static HRESULT WINAPI PersistFile_GetClassID(IPersistFile *pFile, CLSID *pClassID)
Definition: intshcut.c:407
static HRESULT WINAPI PersistFile_SaveCompleted(IPersistFile *pFile, LPCOLESTR pszFileName)
Definition: intshcut.c:651
static ULONG WINAPI PersistFile_AddRef(IPersistFile *pFile)
Definition: intshcut.c:393
static ULONG WINAPI PersistFile_Release(IPersistFile *pFile)
Definition: intshcut.c:400
static HRESULT WINAPI PersistFile_IsDirty(IPersistFile *pFile)
Definition: intshcut.c:414
static HRESULT WINAPI PersistFile_GetCurFile(IPersistFile *pFile, LPOLESTR *ppszFileName)
Definition: intshcut.c:657
static HRESULT WINAPI PersistFile_QueryInterface(IPersistFile *pFile, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:386

Definition at line 768 of file intshcut.c.

Referenced by create_shortcut().

◆ propertySetStorageVtbl

const IPropertySetStorageVtbl propertySetStorageVtbl
static
Initial value:
= {
}
static HRESULT WINAPI PropertySetStorage_QueryInterface(IPropertySetStorage *iface, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:673
static ULONG WINAPI PropertySetStorage_Release(IPropertySetStorage *iface)
Definition: intshcut.c:687
static ULONG WINAPI PropertySetStorage_AddRef(IPropertySetStorage *iface)
Definition: intshcut.c:680
static HRESULT WINAPI PropertySetStorage_Delete(IPropertySetStorage *iface, REFFMTID rfmtid)
Definition: intshcut.c:734
static HRESULT WINAPI PropertySetStorage_Enum(IPropertySetStorage *iface, IEnumSTATPROPSETSTG **ppenum)
Definition: intshcut.c:744
static HRESULT WINAPI PropertySetStorage_Create(IPropertySetStorage *iface, REFFMTID rfmtid, const CLSID *pclsid, DWORD grfFlags, DWORD grfMode, IPropertyStorage **ppprstg)
Definition: intshcut.c:694
static HRESULT WINAPI PropertySetStorage_Open(IPropertySetStorage *iface, REFFMTID rfmtid, DWORD grfMode, IPropertyStorage **ppprstg)
Definition: intshcut.c:713

Definition at line 780 of file intshcut.c.

Referenced by create_shortcut().

◆ uniformResourceLocatorAVtbl

const IUniformResourceLocatorAVtbl uniformResourceLocatorAVtbl
static
Initial value:
= {
}
static HRESULT WINAPI UniformResourceLocatorA_GetUrl(IUniformResourceLocatorA *url, LPSTR *ppszURL)
Definition: intshcut.c:343
static HRESULT WINAPI UniformResourceLocatorA_QueryInterface(IUniformResourceLocatorA *url, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:303
static HRESULT WINAPI UniformResourceLocatorA_InvokeCommand(IUniformResourceLocatorA *url, PURLINVOKECOMMANDINFOA pCommandInfo)
Definition: intshcut.c:362
static ULONG WINAPI UniformResourceLocatorA_Release(IUniformResourceLocatorA *url)
Definition: intshcut.c:317
static ULONG WINAPI UniformResourceLocatorA_AddRef(IUniformResourceLocatorA *url)
Definition: intshcut.c:310
static HRESULT WINAPI UniformResourceLocatorA_SetUrl(IUniformResourceLocatorA *url, LPCSTR pcszURL, DWORD dwInFlags)
Definition: intshcut.c:324

Definition at line 759 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:240
static ULONG WINAPI UniformResourceLocatorW_Release(IUniformResourceLocatorW *url)
Definition: intshcut.c:214
static ULONG WINAPI UniformResourceLocatorW_AddRef(IUniformResourceLocatorW *url)
Definition: intshcut.c:207
static HRESULT WINAPI UniformResourceLocatorW_SetUrl(IUniformResourceLocatorW *url, LPCWSTR pcszURL, DWORD dwInFlags)
Definition: intshcut.c:221
static HRESULT WINAPI UniformResourceLocatorW_QueryInterface(IUniformResourceLocatorW *url, REFIID riid, PVOID *ppvObject)
Definition: intshcut.c:200

Definition at line 750 of file intshcut.c.

Referenced by create_shortcut().