85 static const WCHAR menubuilder[] = {
'\\',
'w',
'i',
'n',
'e',
'm',
'e',
'n',
'u',
'b',
'u',
'i',
'l',
'd',
'e',
'r',
'.',
'e',
'x',
'e',0};
127 static const WCHAR szFormat[] = {
' ',
'-',
'w',
' ',
'-',
'u',
' ',
'"',
'%',
's',
'"',0 };
150 *ppvObject = &
This->IUniformResourceLocatorA_iface;
152 *ppvObject = &
This->IUniformResourceLocatorA_iface;
154 *ppvObject = &
This->IUniformResourceLocatorW_iface;
156 *ppvObject = &
This->IPersistFile_iface;
158 *ppvObject = &
This->IPropertySetStorage_iface;
161 FIXME(
"The IShellLinkA interface is not yet supported by InternetShortcut\n");
166 FIXME(
"The IShellLinkW interface is not yet supported by InternetShortcut\n");
174 IUnknown_AddRef((
IUnknown*)*ppvObject);
193 IPropertySetStorage_Release(
This->property_set_storage);
227 FIXME(
"ignoring unsupported flags 0x%lx\n", dwInFlags);
263 static const WCHAR wszURLProtocol[] = {
'U',
'R',
'L',
' ',
'P',
'r',
'o',
't',
'o',
'c',
'o',
'l',0};
275 FIXME(
"(%p, %p): non-default verbs not implemented\n",
url, pCommandInfo);
292 memset(&sei, 0,
sizeof(sei));
330 FIXME(
"ignoring unsupported flags 0x%lx\n", dwInFlags);
370 wideCommandInfo.
dwcbSize =
sizeof wideCommandInfo;
378 wideCommandInfo.
pcszVerb = wideVerb;
410 *pClassID = CLSID_InternetShortcut;
441 if (realloc_buf ==
NULL)
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};
467 WCHAR *iconindexstring;
472 FIXME(
"ignoring unimplemented mode 0x%lx\n", dwMode);
484 hr = IPropertySetStorage_Open(
This->property_set_storage, &FMTID_Intshcut,
507 ps.ulKind = PRSPEC_PROPID;
510 pv.pwszVal = iconfile;
511 hr = IPropertyStorage_WriteMultiple(pPropStg, 1, &ps, &pv, 0);
513 TRACE(
"Failed to store the iconfile to our property storage. hr = 0x%lx\n",
hr);
522 iconindex =
wcstol(iconindexstring,
NULL, 10);
523 ps.ulKind = PRSPEC_PROPID;
527 hr = IPropertyStorage_WriteMultiple(pPropStg, 1, &ps, &pv, 0);
529 TRACE(
"Failed to store the iconindex to our property storage. hr = 0x%lx\n",
hr);
533 IPropertyStorage_Release(pPropStg);
548 LPOLESTR oldFile =
This->currentFile;
552 This->currentFile = oldFile;
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";
582 PROPVARIANT pvread[2];
583 ps[0].ulKind = PRSPEC_PROPID;
585 ps[1].ulKind = PRSPEC_PROPID;
597 hr = IPropertyStorage_ReadMultiple(pPropStgRead, 2, ps, pvread);
602 IPropertyStorage_Release(pPropStgRead);
606 char indexString[50];
609 if (iconfile !=
NULL)
618 sprintf(indexString,
"ICONINDEX=%d", pvread[1].iVal);
622 IPropertyStorage_Release(pPropStgRead);
628 TRACE(
"Unable to read properties.\n");
633 TRACE(
"Unable to get the IPropertyStorage.\n");
663 *ppszFileName =
NULL;
667 if (*ppszFileName ==
NULL)
676 TRACE(
"(%p)\n", iface);
683 TRACE(
"(%p)\n", iface);
690 TRACE(
"(%p)\n", iface);
703 TRACE(
"(%s, %p, 0x%lx, 0x%lx, %p)\n",
debugstr_guid(rfmtid), pclsid, grfFlags, grfMode, ppprstg);
705 return IPropertySetStorage_Create(
This->property_set_storage,
719 const DWORD STGM_ACCESS_MASK = 0x0000000f;
724 if ((grfMode & STGM_ACCESS_MASK) ==
STGM_WRITE)
728 return IPropertySetStorage_Open(
This->property_set_storage,
740 return IPropertySetStorage_Delete(
This->property_set_storage,
746 FIXME(
"(%p): stub\n", ppenum);
809 TRACE(
"Failed to create the storage object needed for the shortcut.\n");
817 TRACE(
"Failed to create the property object needed for the shortcut.\n");
822 IPropertyStorage_Release(
dummy);
871 memset( &ici, 0,
sizeof ici );
#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)
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
void *WINAPI CoTaskMemAlloc(SIZE_T size)
void *WINAPI CoTaskMemRealloc(void *ptr, SIZE_T size)
void WINAPI CoTaskMemFree(void *ptr)
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
#define WideCharToMultiByte
#define MultiByteToWideChar
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)
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
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)
_ACRTIMP __msvcrt_long __cdecl wcstol(const wchar_t *, wchar_t **, int)
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 count
GLuint GLuint GLsizei GLenum type
GLdouble GLdouble GLdouble r
GLenum GLsizei GLuint GLint * bytesWritten
static LPWSTR co_strdupAtoW(LPCSTR str)
static void unlock_module(void)
static LPSTR co_strdupWtoA(LPCWSTR str)
static LPWSTR co_strdupW(LPCWSTR str)
@ IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
static void OpenURL(void)
static PROCESS_INFORMATION pi
#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
#define CLASS_E_NOAGGREGATION
#define HKEY_CLASSES_ROOT
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList