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 );
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 InternetShortcut * impl_from_IPersistFile(IPersistFile *iface)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
BOOL WINAPI Wow64RevertWow64FsRedirection(IN PVOID OldValue)
static HRESULT WINAPI PersistFile_SaveCompleted(IPersistFile *pFile, LPCOLESTR pszFileName)
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
static ULONG Unknown_Release(InternetShortcut *This)
static ULONG WINAPI PersistFile_AddRef(IPersistFile *pFile)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
IPropertySetStorage IPropertySetStorage_iface
#define WideCharToMultiByte
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
#define STGM_SHARE_EXCLUSIVE
static BOOL run_winemenubuilder(const WCHAR *args)
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
GLdouble GLdouble GLdouble r
static HRESULT WINAPI PersistFile_QueryInterface(IPersistFile *pFile, REFIID riid, PVOID *ppvObject)
static InternetShortcut * create_shortcut(void)
static HRESULT WINAPI UniformResourceLocatorA_QueryInterface(IUniformResourceLocatorA *url, REFIID riid, PVOID *ppvObject)
GLuint GLuint GLsizei count
static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR pszFileName, DWORD dwMode)
HRESULT WINAPI StgCreateStorageEx(const WCHAR *pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS *pStgOptions, void *reserved, REFIID riid, void **ppObjectOpen)
static HRESULT WINAPI PropertySetStorage_Create(IPropertySetStorage *iface, REFFMTID rfmtid, const CLSID *pclsid, DWORD grfFlags, DWORD grfMode, IPropertyStorage **ppprstg)
static HRESULT get_profile_string(LPCWSTR lpAppName, LPCWSTR lpKeyName, LPCWSTR lpFileName, WCHAR **rString)
#define INVALID_HANDLE_VALUE
void WINAPI OpenURL(HWND hWnd, HINSTANCE hInst, LPCSTR lpcstrUrl, int nShowCmd)
WINE_DEFAULT_DEBUG_CHANNEL(ieframe)
HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
static HRESULT WINAPI UniformResourceLocatorW_GetUrl(IUniformResourceLocatorW *url, LPWSTR *ppszURL)
_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_QueryInterface(IUniformResourceLocatorW *url, REFIID riid, PVOID *ppvObject)
HRESULT WINAPI InternetShortcut_Create(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
static void * heap_alloc(size_t len)
static HRESULT WINAPI PersistFile_GetClassID(IPersistFile *pFile, CLSID *pClassID)
static ULONG WINAPI UniformResourceLocatorW_Release(IUniformResourceLocatorW *url)
#define sprintf(buf, format,...)
static InternetShortcut * impl_from_IUniformResourceLocatorW(IUniformResourceLocatorW *iface)
static HRESULT WINAPI PropertySetStorage_Delete(IPropertySetStorage *iface, REFFMTID rfmtid)
IUniformResourceLocatorW IUniformResourceLocatorW_iface
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
WORD WORD PSZ PSZ pszFileName
static ULONG WINAPI PropertySetStorage_AddRef(IPropertySetStorage *iface)
#define STGM_DELETEONRELEASE
static LPWSTR co_strdupAtoW(LPCSTR str)
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
static ULONG WINAPI PropertySetStorage_Release(IPropertySetStorage *iface)
static HRESULT Unknown_QueryInterface(InternetShortcut *This, REFIID riid, PVOID *ppvObject)
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)
IUniformResourceLocatorA IUniformResourceLocatorA_iface
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)
static HRESULT WINAPI PersistFile_GetCurFile(IPersistFile *pFile, LPOLESTR *ppszFileName)
static HRESULT WINAPI UniformResourceLocatorW_SetUrl(IUniformResourceLocatorW *url, LPCWSTR pcszURL, DWORD dwInFlags)
static ULONG WINAPI UniformResourceLocatorA_AddRef(IUniformResourceLocatorA *url)
static ULONG Unknown_AddRef(InternetShortcut *This)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
static const IPersistFileVtbl persistFileVtbl
static ULONG WINAPI UniformResourceLocatorW_AddRef(IUniformResourceLocatorW *url)
static HRESULT WINAPI PropertySetStorage_Open(IPropertySetStorage *iface, REFFMTID rfmtid, DWORD grfMode, IPropertyStorage **ppprstg)
static void unlock_module(void)
static const IUniformResourceLocatorAVtbl uniformResourceLocatorAVtbl
static HRESULT WINAPI PropertySetStorage_QueryInterface(IPropertySetStorage *iface, REFIID riid, PVOID *ppvObject)
static InternetShortcut * impl_from_IPropertySetStorage(IPropertySetStorage *iface)
#define FILE_ATTRIBUTE_NORMAL
static InternetShortcut * impl_from_IUniformResourceLocatorA(IUniformResourceLocatorA *iface)
#define InterlockedDecrement
REFIID LPVOID * ppvObject
#define CLASS_E_NOAGGREGATION
int _cdecl swprintf(const WCHAR *,...)
GLenum GLsizei GLuint GLint * bytesWritten
static ULONG WINAPI PersistFile_Release(IPersistFile *pFile)
static HRESULT WINAPI PropertySetStorage_Enum(IPropertySetStorage *iface, IEnumSTATPROPSETSTG **ppenum)
IPersistFile IPersistFile_iface
static HRESULT WINAPI PersistFile_Save(IPersistFile *pFile, LPCOLESTR pszFileName, BOOL fRemember)
int WINAPI lstrlenA(LPCSTR lpString)
#define InterlockedIncrement
static HRESULT WINAPI UniformResourceLocatorW_InvokeCommand(IUniformResourceLocatorW *url, PURLINVOKECOMMANDINFOW pCommandInfo)
static HRESULT WINAPI PersistFile_IsDirty(IPersistFile *pFile)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
#define MultiByteToWideChar
static HRESULT WINAPI UniformResourceLocatorA_GetUrl(IUniformResourceLocatorA *url, LPSTR *ppszURL)
static LPWSTR co_strdupW(LPCWSTR str)
const GUID IID_IPersistFile
static BOOL StartLinkProcessor(LPCOLESTR szLink)
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
#define HKEY_CLASSES_ROOT
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
GLuint GLuint GLsizei GLenum type
static const IUniformResourceLocatorWVtbl uniformResourceLocatorWVtbl
IPropertySetStorage * property_set_storage
static const IPropertySetStorageVtbl propertySetStorageVtbl
static LPSTR co_strdupWtoA(LPCWSTR str)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
#define RegCloseKey(hKey)
static ULONG WINAPI UniformResourceLocatorA_Release(IUniformResourceLocatorA *url)
static HRESULT WINAPI UniformResourceLocatorA_InvokeCommand(IUniformResourceLocatorA *url, PURLINVOKECOMMANDINFOA pCommandInfo)
static BOOL heap_free(void *mem)
BOOL WINAPI Wow64DisableWow64FsRedirection(IN PVOID *OldValue)
static HRESULT WINAPI UniformResourceLocatorA_SetUrl(IUniformResourceLocatorA *url, LPCSTR pcszURL, DWORD dwInFlags)