42#include "ieautomation.h"
50#define WM_UPDATEADDRBAR (WM_APP+1)
56 {
'W',
'i',
'n',
'e',
' ',
'I',
'n',
't',
'e',
'r',
'n',
'e',
't',
' ',
'E',
'x',
'p',
'l',
'o',
'r',
'e',
'r',0};
151 FIXME(
"Add support for more than %d Favorites\n", favcount);
178 IUniformResourceLocatorW* urlobj;
205 static const WCHAR ignore1[] = {
'.',
'.',0};
206 static const WCHAR ignore2[] = {
'.',0};
220 static const WCHAR urlext[] = {
'.',
'u',
'r',
'l',0};
227 if(
FAILED(IPersistFile_Load(urlfile,
path, 0)))
230 urlobj->lpVtbl->GetURL(urlobj, &
url);
243 IPersistFile_Release(urlfile);
246 IUnknown_Release((
IUnknown*)urlobj);
253 static const WCHAR toolbar_key[] = {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
254 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
255 'I',
'n',
't',
'e',
'r',
'n',
'e',
't',
' ',
256 'E',
'x',
'p',
'l',
'o',
'r',
'e',
'r',
'\\',
257 'T',
'o',
'o',
'l',
'b',
'a',
'r',0};
262 static const WCHAR classes_key[] = {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
263 'C',
'l',
'a',
's',
's',
'e',
's',
'\\',
'C',
'L',
'S',
'I',
'D',0};
309 item.dwTypeData = tb_name;
406static void ie_dialog_properties(
HWND hwnd)
461 rebarinf.
cbSize =
sizeof(rebarinf);
484 bandinf.
cbSize =
sizeof(bandinf);
534 if(
This->doc_host.hwnd)
573 if(
This->doc_host.hwnd)
603 if(
This->doc_host.document)
612 IOleCommandTarget_Release(
target);
617 IWebBrowser2_GoHome(&
This->IWebBrowser2_iface);
621 IWebBrowser2_GoBack(&
This->IWebBrowser2_iface);
625 IWebBrowser2_GoForward(&
This->IWebBrowser2_iface);
629 IWebBrowser2_Stop(&
This->IWebBrowser2_iface);
633 IWebBrowser2_Refresh(&
This->IWebBrowser2_iface);
642 ie_dialog_properties(
hwnd);
690 IWebBrowser2_AddRef(&
This->IWebBrowser2_iface);
694 IWebBrowser2_Release(&
This->IWebBrowser2_iface);
717 memset(&wc, 0,
sizeof wc);
761 return IWebBrowser2_AddRef(&
This->IWebBrowser2_iface);
767 return IWebBrowser2_Release(&
This->IWebBrowser2_iface);
787 case CSC_NAVIGATEBACK:
790 case CSC_NAVIGATEFORWARD:
848 hres = IWebBrowser2_QueryInterface(&
ret->IWebBrowser2_iface,
riid,
ppv);
849 IWebBrowser2_Release(&
ret->IWebBrowser2_iface);
875 IInternetExplorerManager_AddRef(iface);
890 TRACE(
"(%p) increasing refcount to %u\n", iface,
ref);
900 TRACE(
"(%p) decreasing refcount to %u\n", iface,
ref);
939 hr = IInternetExplorerManager_QueryInterface(&
ret->IInternetExplorerManager_iface,
riid,
ppv);
940 IInternetExplorerManager_Release(&
ret->IInternetExplorerManager_iface);
1006 FIXME(
"missing string terminator\n");
1020 IWebBrowser2_AddRef(&iter->IWebBrowser2_iface);
1055 TRACE(
"XTYP_CONNECT %p\n", hsz1);
1076 ERR(
"error during read\n");
1088 FIXME(
"XTYP_REQUEST\n");
1102 static const WCHAR iexploreW[] = {
'I',
'E',
'x',
'p',
'l',
'o',
'r',
'e',0};
1103 static const WCHAR openurlW[] = {
'W',
'W',
'W',
'_',
'O',
'p',
'e',
'n',
'U',
'R',
'L',0};
1107 WARN(
"DdeInitialize failed: %u\n",
res);
1120 WARN(
"DdeNameService failed\n");
1146 static const WCHAR embeddingW[] = {
'-',
'e',
'm',
'b',
'e',
'd',
'd',
'i',
'n',
'g',0};
1147 static const WCHAR nohomeW[] = {
'-',
'n',
'o',
'h',
'o',
'm',
'e',0};
1148 static const WCHAR startmanagerW[] = {
'-',
's',
't',
'a',
'r',
't',
'm',
'a',
'n',
'a',
'g',
'e',
'r',0};
1188 ERR(
"failed to register CLSID_InternetExplorer%s: %08x\n", manager ?
"Manager" :
"",
hres);
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
HWND WINAPI CreateStatusWindowW(LONG style, LPCWSTR text, HWND parent, UINT wid)
INT WINAPI DdeCmpStringHandles(HSZ, HSZ)
#define CBF_SKIP_ALLNOTIFICATIONS
BOOL WINAPI DdeUninitialize(DWORD)
UINT WINAPI DdeInitializeW(LPDWORD, PFNCALLBACK, DWORD, DWORD)
UINT WINAPI DdeGetLastError(DWORD)
HSZ WINAPI DdeCreateStringHandleW(DWORD, LPCWSTR, INT)
BOOL WINAPI DdeFreeStringHandle(DWORD, HSZ)
HDDEDATA WINAPI DdeNameService(DWORD, HSZ, HSZ, UINT)
DWORD WINAPI DdeGetData(HDDEDATA, LPBYTE, DWORD, DWORD)
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define IDC_BROWSE_OPEN_URL
#define IDC_BROWSE_TOOLBAR
#define ID_BROWSE_GOTOFAV_MAX
#define ID_BROWSE_FORWARD
#define IDC_BROWSE_STATUSBAR
#define ID_BROWSE_REFRESH
#define IDC_BROWSE_ADDRESSBAR
#define ID_BROWSE_GOTOFAV_FIRST
#define ID_BROWSE_PROPERTIES
#define IDR_BROWSE_MAIN_MENU
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
VOID WINAPI ExitProcess(IN UINT uExitCode)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD dwRegister)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
LONG WINAPI SHRegOpenUSKeyW(LPCWSTR Path, REGSAM AccessType, HUSKEY hRelativeUSKey, PHUSKEY phNewUSKey, BOOL fIgnoreHKCU)
LONG WINAPI SHRegCloseUSKey(HUSKEY hUSKey)
LONG WINAPI SHRegEnumUSValueW(HUSKEY hUSKey, DWORD dwIndex, LPWSTR pszValueName, LPDWORD pcchValueNameLen, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData, SHREGENUM_FLAGS enumRegFlags)
LONG WINAPI SHRegQueryUSValueW(HUSKEY hUSKey, LPCWSTR pszValue, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData, BOOL fIgnoreHKCU, LPVOID pvDefaultData, DWORD dwDefaultDataSize)
void DocHost_Init(DocHost *This, IWebBrowser2 *wb, const IDocHostContainerVtbl *container)
LRESULT process_dochost_tasks(DocHost *This)
void create_doc_view_hwnd(DocHost *This)
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLenum const GLvoid * addr
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 const GLfloat const GLdouble const GLfloat GLint i
DWORD release_extern_ref(InternetExplorer *This, BOOL last_closes)
void InternetExplorer_WebBrowser_Init(InternetExplorer *This)
void HlinkFrame_Init(HlinkFrame *, IUnknown *, DocHost *) DECLSPEC_HIDDEN
IClassFactory InternetExplorerFactory
IClassFactory InternetExplorerManagerFactory
HINSTANCE ieframe_instance
HRESULT WINAPI InternetExplorer_Create(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
static INT_PTR CALLBACK ie_dialog_open_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow)
static const IDocHostContainerVtbl DocHostContainerVtbl
static void init_dde(void)
static void release_dde(void)
void register_iewindow_class(void)
static HSZ ddestr_openurl
static ULONG WINAPI InternetExplorerManager_AddRef(IInternetExplorerManager *iface)
static InternetExplorer * impl_from_DocHost(DocHost *iface)
static const IInternetExplorerManagerVtbl InternetExplorerManager_vtbl
static ULONG IEDocHost_addref(DocHost *iface)
static HRESULT WINAPI InternetExplorerManager_CreateObject(IInternetExplorerManager *iface, DWORD config, LPCWSTR url, REFIID riid, void **ppv)
static void adjust_ie_docobj_rect(HWND frame, RECT *rc)
static LRESULT WINAPI ie_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir)
HRESULT update_ie_statustext(InternetExplorer *This, LPCWSTR text)
static void enable_toolbar_button(InternetExplorer *ie, int command, BOOL enable)
static void add_fav_to_menu(HMENU favmenu, HMENU menu, LPWSTR title, LPCWSTR url)
static HDDEDATA open_dde_url(WCHAR *dde_url)
static BOOL create_ie_window(BOOL nohome, const WCHAR *cmdline)
static HMENU get_fav_menu(HMENU menu)
static void add_tbs_to_menu(HMENU menu)
static InternetExplorerManager * impl_from_IInternetExplorerManager(IInternetExplorerManager *iface)
static HSZ ddestr_iexplore
static HRESULT WINAPI InternetExplorerManager_QueryInterface(IInternetExplorerManager *iface, REFIID riid, void **out)
static void DocHostContainer_get_docobj_rect(DocHost *This, RECT *rc)
static LRESULT iewnd_OnNotify(InternetExplorer *This, WPARAM wparam, LPARAM lparam)
static void create_rebar(InternetExplorer *ie)
static ULONG WINAPI InternetExplorerManager_Release(IInternetExplorerManager *iface)
static void add_tb_separator(InternetExplorer *ie)
static LRESULT iewnd_OnCreate(HWND hwnd, LPCREATESTRUCTW lpcs)
static LRESULT iewnd_OnSize(InternetExplorer *This, INT width, INT height)
static const WCHAR wszWineInternetExplorer[]
static HRESULT DocHostContainer_set_status_text(DocHost *iface, const WCHAR *text)
static LPWSTR get_fav_url_from_id(HMENU menu, UINT id)
static void add_tb_button(InternetExplorer *ie, int bmp, int cmd, int strId)
static HMENU get_tb_menu(HMENU menu)
void unregister_iewindow_class(void)
static int get_menu_item_count(HMENU menu)
static void ie_navigate(InternetExplorer *This, LPCWSTR url)
static void create_frame_hwnd(InternetExplorer *This)
static void free_fav_menu_data(HMENU menu)
HRESULT WINAPI InternetExplorerManager_Create(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
static void DocHostContainer_on_command_state_change(DocHost *iface, LONG command, BOOL enable)
static struct list ie_list
static void DocHostContainer_set_url(DocHost *iface, const WCHAR *url)
static LRESULT iewnd_OnCommand(InternetExplorer *This, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static ULONG IEDocHost_release(DocHost *iface)
static LRESULT iewnd_OnDestroy(InternetExplorer *This)
static void ie_dialog_about(HWND hwnd)
static LRESULT update_addrbar(InternetExplorer *This, LPARAM lparam)
static HMENU create_ie_menu(void)
static HDDEDATA WINAPI dde_proc(UINT type, UINT uFmt, HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA data, ULONG_PTR dwData1, ULONG_PTR dwData2)
static HRESULT create_ie(InternetExplorer **ret_obj)
static const WCHAR szIEWinFrame[]
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
static short search(int val, const short *table, int size)
#define FILE_ATTRIBUTE_DIRECTORY
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
const GUID IID_IPersistFile
#define TBSTYLE_EX_MIXEDBUTTONS
struct _IMAGELIST * HIMAGELIST
#define TB_BUTTONSTRUCTSIZE
#define TOOLBARCLASSNAMEW
#define CBEM_GETEDITCONTROL
#define IsEqualGUID(rguid1, rguid2)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
#define CSIDL_COMMON_FAVORITES
IInternetExplorerManager IInternetExplorerManager_iface
IWebBrowser2 IWebBrowser2_iface
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define CONTAINING_RECORD(address, type, field)
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
HMENU WINAPI CreatePopupMenu(void)
#define GetWindowLongPtrW
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define LR_CREATEDIBSECTION
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
int WINAPI GetWindowTextLengthW(_In_ HWND)
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
#define MAKEINTRESOURCEW(i)
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define SetWindowLongPtrW
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI IsWindowVisible(_In_ HWND)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)