32#define NONAMELESSUNION
87 static const WCHAR menubuilder[] = {
'\\',
'w',
'i',
'n',
'e',
'm',
'e',
'n',
'u',
'b',
'u',
'i',
'l',
'd',
'e',
'r',
'.',
'e',
'x',
'e',0};
109 memset(&si, 0,
sizeof(si));
129 static const WCHAR szFormat[] = {
' ',
'-',
'w',
' ',
'-',
'u',
' ',
'"',
'%',
's',
'"',0 };
163 FIXME(
"The IShellLinkA interface is not yet supported by InternetShortcut\n");
168 FIXME(
"The IShellLinkW interface is not yet supported by InternetShortcut\n");
195 IPropertySetStorage_Release(
This->property_set_storage);
229 FIXME(
"ignoring unsupported flags 0x%x\n", dwInFlags);
265 static const WCHAR wszURLProtocol[] = {
'U',
'R',
'L',
' ',
'P',
'r',
'o',
't',
'o',
'c',
'o',
'l',0};
277 FIXME(
"(%p, %p): non-default verbs not implemented\n",
url, pCommandInfo);
294 memset(&sei, 0,
sizeof(sei));
332 FIXME(
"ignoring unsupported flags 0x%x\n", dwInFlags);
372 wideCommandInfo.
dwcbSize =
sizeof wideCommandInfo;
380 wideCommandInfo.
pcszVerb = wideVerb;
412 *pClassID = CLSID_InternetShortcut;
443 if (realloc_buf ==
NULL)
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};
469 WCHAR *iconindexstring;
474 FIXME(
"ignoring unimplemented mode 0x%x\n", dwMode);
486 hr = IPropertySetStorage_Open(
This->property_set_storage, &FMTID_Intshcut,
509 ps.ulKind = PRSPEC_PROPID;
512 pv.u.pwszVal = iconfile;
513 hr = IPropertyStorage_WriteMultiple(pPropStg, 1, &ps, &pv, 0);
515 TRACE(
"Failed to store the iconfile to our property storage. hr = 0x%x\n",
hr);
524 iconindex =
wcstol(iconindexstring,
NULL, 10);
525 ps.ulKind = PRSPEC_PROPID;
528 pv.u.iVal = iconindex;
529 hr = IPropertyStorage_WriteMultiple(pPropStg, 1, &ps, &pv, 0);
531 TRACE(
"Failed to store the iconindex to our property storage. hr = 0x%x\n",
hr);
535 IPropertyStorage_Release(pPropStg);
554 This->currentFile = oldFile;
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";
584 PROPVARIANT pvread[2];
585 ps[0].ulKind = PRSPEC_PROPID;
587 ps[1].ulKind = PRSPEC_PROPID;
599 hr = IPropertyStorage_ReadMultiple(pPropStgRead, 2, ps, pvread);
604 IPropertyStorage_Release(pPropStgRead);
608 char indexString[50];
611 if (iconfile !=
NULL)
619 sprintf(indexString,
"ICONINDEX=%d", pvread[1].
u.iVal);
623 IPropertyStorage_Release(pPropStgRead);
629 TRACE(
"Unable to read properties.\n");
634 TRACE(
"Unable to get the IPropertyStorage.\n");
664 *ppszFileName =
NULL;
668 if (*ppszFileName ==
NULL)
677 TRACE(
"(%p)\n", iface);
684 TRACE(
"(%p)\n", iface);
691 TRACE(
"(%p)\n", iface);
704 TRACE(
"(%s, %p, 0x%x, 0x%x, %p)\n",
debugstr_guid(rfmtid), pclsid, grfFlags, grfMode, ppprstg);
706 return IPropertySetStorage_Create(
This->property_set_storage,
724 return IPropertySetStorage_Open(
This->property_set_storage,
736 return IPropertySetStorage_Delete(
This->property_set_storage,
742 FIXME(
"(%p): stub\n", ppenum);
805 TRACE(
"Failed to create the storage object needed for the shortcut.\n");
813 TRACE(
"Failed to create the property object needed for the shortcut.\n");
818 IPropertyStorage_Release(
dummy);
867 memset( &ici, 0,
sizeof ici );
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define RegCloseKey(hKey)
IPersistFile IPersistFile_iface
IUniformResourceLocatorA IUniformResourceLocatorA_iface
IUniformResourceLocatorW IUniformResourceLocatorW_iface
IPropertySetStorage IPropertySetStorage_iface
IPropertySetStorage * property_set_storage
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
#define MultiByteToWideChar
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
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)
BOOL WINAPI Wow64RevertWow64FsRedirection(IN PVOID OldValue)
BOOL WINAPI Wow64DisableWow64FsRedirection(IN PVOID *OldValue)
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
HRESULT WINAPI StgCreateStorageEx(const WCHAR *pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS *pStgOptions, void *reserved, REFIID riid, void **ppObjectOpen)
HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLenum GLsizei GLuint GLint * bytesWritten
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
static LPWSTR co_strdupAtoW(LPCSTR str)
static void unlock_module(void)
static LPSTR co_strdupWtoA(LPCWSTR str)
static LPWSTR co_strdupW(LPCWSTR str)
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
static HRESULT WINAPI UniformResourceLocatorW_GetUrl(IUniformResourceLocatorW *url, LPWSTR *ppszURL)
static HRESULT WINAPI PersistFile_Save(IPersistFile *pFile, LPCOLESTR pszFileName, BOOL fRemember)
static HRESULT WINAPI UniformResourceLocatorA_GetUrl(IUniformResourceLocatorA *url, LPSTR *ppszURL)
static HRESULT WINAPI PropertySetStorage_QueryInterface(IPropertySetStorage *iface, REFIID riid, PVOID *ppvObject)
static ULONG WINAPI PropertySetStorage_Release(IPropertySetStorage *iface)
static HRESULT WINAPI UniformResourceLocatorA_QueryInterface(IUniformResourceLocatorA *url, REFIID riid, PVOID *ppvObject)
static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR pszFileName, DWORD dwMode)
static const IUniformResourceLocatorWVtbl uniformResourceLocatorWVtbl
static HRESULT WINAPI UniformResourceLocatorA_InvokeCommand(IUniformResourceLocatorA *url, PURLINVOKECOMMANDINFOA pCommandInfo)
static ULONG WINAPI UniformResourceLocatorW_Release(IUniformResourceLocatorW *url)
static ULONG WINAPI UniformResourceLocatorW_AddRef(IUniformResourceLocatorW *url)
static HRESULT WINAPI PersistFile_GetClassID(IPersistFile *pFile, CLSID *pClassID)
static ULONG Unknown_Release(InternetShortcut *This)
static const IPersistFileVtbl persistFileVtbl
static ULONG WINAPI PropertySetStorage_AddRef(IPropertySetStorage *iface)
static BOOL run_winemenubuilder(const WCHAR *args)
static HRESULT get_profile_string(LPCWSTR lpAppName, LPCWSTR lpKeyName, LPCWSTR lpFileName, WCHAR **rString)
static InternetShortcut * impl_from_IPersistFile(IPersistFile *iface)
static HRESULT WINAPI PropertySetStorage_Delete(IPropertySetStorage *iface, REFFMTID rfmtid)
static ULONG WINAPI UniformResourceLocatorA_Release(IUniformResourceLocatorA *url)
static ULONG WINAPI UniformResourceLocatorA_AddRef(IUniformResourceLocatorA *url)
static HRESULT WINAPI PersistFile_SaveCompleted(IPersistFile *pFile, LPCOLESTR pszFileName)
static HRESULT WINAPI PropertySetStorage_Enum(IPropertySetStorage *iface, IEnumSTATPROPSETSTG **ppenum)
static ULONG WINAPI PersistFile_AddRef(IPersistFile *pFile)
static InternetShortcut * create_shortcut(void)
static InternetShortcut * impl_from_IPropertySetStorage(IPropertySetStorage *iface)
static ULONG WINAPI PersistFile_Release(IPersistFile *pFile)
static HRESULT WINAPI UniformResourceLocatorA_SetUrl(IUniformResourceLocatorA *url, LPCSTR pcszURL, DWORD dwInFlags)
static HRESULT WINAPI PersistFile_IsDirty(IPersistFile *pFile)
static const IUniformResourceLocatorAVtbl uniformResourceLocatorAVtbl
static InternetShortcut * impl_from_IUniformResourceLocatorW(IUniformResourceLocatorW *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 const IPropertySetStorageVtbl propertySetStorageVtbl
static HRESULT WINAPI UniformResourceLocatorW_SetUrl(IUniformResourceLocatorW *url, LPCWSTR pcszURL, DWORD dwInFlags)
static HRESULT WINAPI UniformResourceLocatorW_QueryInterface(IUniformResourceLocatorW *url, REFIID riid, PVOID *ppvObject)
static HRESULT WINAPI UniformResourceLocatorW_InvokeCommand(IUniformResourceLocatorW *url, PURLINVOKECOMMANDINFOW pCommandInfo)
static HRESULT Unknown_QueryInterface(InternetShortcut *This, REFIID riid, PVOID *ppvObject)
static HRESULT WINAPI PersistFile_GetCurFile(IPersistFile *pFile, LPOLESTR *ppszFileName)
static ULONG Unknown_AddRef(InternetShortcut *This)
static BOOL StartLinkProcessor(LPCOLESTR szLink)
static InternetShortcut * impl_from_IUniformResourceLocatorA(IUniformResourceLocatorA *iface)
static HRESULT WINAPI PersistFile_QueryInterface(IPersistFile *pFile, REFIID riid, PVOID *ppvObject)
HRESULT WINAPI InternetShortcut_Create(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
@ IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
static void OpenURL(void)
#define sprintf(buf, format,...)
#define STGM_SHARE_EXCLUSIVE
#define STGM_DELETEONRELEASE
const GUID IID_IPersistFile
#define IsEqualGUID(rguid1, rguid2)
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
#define CONTAINING_RECORD(address, type, field)
WORD WORD PSZ PSZ pszFileName
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
#define CLASS_E_NOAGGREGATION
#define HKEY_CLASSES_ROOT
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList