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;
406 static void ie_dialog_properties(
HWND hwnd)
461 rebarinf.
cbSize =
sizeof(rebarinf);
484 bandinf.
cbSize =
sizeof(bandinf);
498 bandinf.lpText =
addr;
499 bandinf.cxMinChild = 100;
500 bandinf.cyMinChild = 20;
501 bandinf.hwndChild = hwndAddress;
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);
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);
HRESULT WINAPI InternetExplorerManager_Create(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
LONG WINAPI SHRegEnumUSValueW(HUSKEY hUSKey, DWORD dwIndex, LPWSTR pszValueName, LPDWORD pcchValueNameLen, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData, SHREGENUM_FLAGS enumRegFlags)
static short search(int val, const short *table, int size)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
IClassFactory InternetExplorerManagerFactory
GLint GLint GLsizei width
static void add_tb_button(InternetExplorer *ie, int bmp, int cmd, int strId)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define TB_BUTTONSTRUCTSIZE
static int get_menu_item_count(HMENU menu)
static LRESULT iewnd_OnCommand(InternetExplorer *This, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
static HMENU get_fav_menu(HMENU menu)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
void unregister_iewindow_class(void)
static void ie_dialog_about(HWND hwnd)
UINT WINAPI DdeGetLastError(DWORD)
BOOL WINAPI DestroyIcon(_In_ HICON)
static LRESULT update_addrbar(InternetExplorer *This, LPARAM lparam)
#define CSIDL_COMMON_FAVORITES
static HRESULT create_ie(InternetExplorer **ret_obj)
static LRESULT iewnd_OnDestroy(InternetExplorer *This)
LRESULT process_dochost_tasks(DocHost *This)
static void adjust_ie_docobj_rect(HWND frame, RECT *rc)
HRESULT WINAPI InternetExplorer_Create(IClassFactory *iface, IUnknown *pOuter, REFIID riid, void **ppv)
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
GLuint GLuint GLsizei count
TW_UINT32 TW_UINT16 TW_UINT16 MSG
void HlinkFrame_Init(HlinkFrame *, IUnknown *, DocHost *) DECLSPEC_HIDDEN
static struct list ie_list
#define ID_BROWSE_REFRESH
IInternetExplorerManager IInternetExplorerManager_iface
_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)
static const IInternetExplorerManagerVtbl InternetExplorerManager_vtbl
#define TOOLBARCLASSNAMEW
#define INVALID_HANDLE_VALUE
VOID WINAPI ExitProcess(IN UINT uExitCode)
static HMENU create_ie_menu(void)
HINSTANCE ieframe_instance
static INT_PTR CALLBACK ie_dialog_open_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
void DocHost_Init(DocHost *This, IWebBrowser2 *wb, const IDocHostContainerVtbl *container)
LONG WINAPI SHRegOpenUSKeyW(LPCWSTR Path, REGSAM AccessType, HUSKEY hRelativeUSKey, PHUSKEY phNewUSKey, BOOL fIgnoreHKCU)
#define GetWindowLongPtrW
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
static void * heap_alloc(size_t len)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static InternetExplorerManager * impl_from_IInternetExplorerManager(IInternetExplorerManager *iface)
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
IWebBrowser2 IWebBrowser2_iface
#define ID_BROWSE_GOTOFAV_MAX
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
static void create_frame_hwnd(InternetExplorer *This)
GLenum GLuint GLenum GLsizei const GLchar * buf
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
static HRESULT DocHostContainer_set_status_text(DocHost *iface, const WCHAR *text)
static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
static BOOL create_ie_window(BOOL nohome, const WCHAR *cmdline)
static ULONG IEDocHost_release(DocHost *iface)
static UINT WPARAM LPARAM lparam
HWND WINAPI CreateStatusWindowW(LONG style, LPCWSTR text, HWND parent, UINT wid)
static InternetExplorer * impl_from_DocHost(DocHost *iface)
GLenum GLuint GLenum GLsizei length
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
static void ie_navigate(InternetExplorer *This, LPCWSTR url)
static void DocHostContainer_get_docobj_rect(DocHost *This, RECT *rc)
static HDDEDATA open_dde_url(WCHAR *dde_url)
BOOL WINAPI DdeUninitialize(DWORD)
BSTR WINAPI SysAllocString(LPCOLESTR str)
static void add_fav_to_menu(HMENU favmenu, HMENU menu, LPWSTR title, LPCWSTR url)
#define CBEM_GETEDITCONTROL
static LPWSTR get_fav_url_from_id(HMENU menu, UINT id)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
SHDocVw::uuid CSC_NAVIGATEBACK
static LRESULT WINAPI ie_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
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)
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD dwRegister)
static HSZ ddestr_openurl
static HRESULT WINAPI InternetExplorerManager_QueryInterface(IInternetExplorerManager *iface, REFIID riid, void **out)
#define FILE_ATTRIBUTE_DIRECTORY
static HSZ ddestr_iexplore
INT WINAPI DdeCmpStringHandles(HSZ, HSZ)
static const WCHAR szIEWinFrame[]
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
BOOL WINAPI DdeFreeStringHandle(DWORD, HSZ)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDR_BROWSE_MAIN_MENU
static HRESULT WINAPI InternetExplorerManager_CreateObject(IInternetExplorerManager *iface, DWORD config, LPCWSTR url, REFIID riid, void **ppv)
int WINAPI GetWindowTextLengthW(_In_ HWND)
int WINAPI GetSystemMetrics(_In_ int)
static void add_tb_separator(InternetExplorer *ie)
void create_doc_view_hwnd(DocHost *This)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define ID_BROWSE_PROPERTIES
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
GLenum const GLvoid * addr
#define InterlockedDecrement
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)
LONG WINAPI SHRegQueryUSValueW(HUSKEY hUSKey, LPCWSTR pszValue, LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData, BOOL fIgnoreHKCU, LPVOID pvDefaultData, DWORD dwDefaultDataSize)
struct _IMAGELIST * HIMAGELIST
static void add_tbs_to_menu(HMENU menu)
static ULONG WINAPI InternetExplorerManager_AddRef(IInternetExplorerManager *iface)
DWORD release_extern_ref(InternetExplorer *This, BOOL last_closes)
static const IDocHostContainerVtbl DocHostContainerVtbl
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
DWORD WINAPI IEWinMain(const WCHAR *cmdline, int nShowWindow)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
WINE_DEFAULT_DEBUG_CHANNEL(ieframe)
HRESULT update_ie_statustext(InternetExplorer *This, LPCWSTR text)
GLint GLint GLsizei GLsizei height
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
IClassFactory InternetExplorerFactory
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
static void DocHostContainer_set_url(DocHost *iface, const WCHAR *url)
#define InterlockedIncrement
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
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
#define ID_BROWSE_FORWARD
LONG WINAPI SHRegCloseUSKey(HUSKEY hUSKey)
#define IDC_BROWSE_OPEN_URL
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static void enable_toolbar_button(InternetExplorer *ie, int command, BOOL enable)
#define LR_CREATEDIBSECTION
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
DWORD WINAPI DdeGetData(HDDEDATA, LPBYTE, DWORD, DWORD)
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
HDDEDATA WINAPI DdeNameService(DWORD, HSZ, HSZ, UINT)
static void release_dde(void)
SHDocVw::uuid CSC_NAVIGATEFORWARD
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
#define ID_BROWSE_GOTOFAV_FIRST
HMENU WINAPI CreatePopupMenu(void)
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
#define CBF_SKIP_ALLNOTIFICATIONS
static LRESULT iewnd_OnNotify(InternetExplorer *This, WPARAM wparam, LPARAM lparam)
static void init_dde(void)
const GUID IID_IPersistFile
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
#define IDC_BROWSE_ADDRESSBAR
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
static const WCHAR wszWineInternetExplorer[]
BOOL WINAPI IsWindowVisible(_In_ HWND)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
#define TBSTYLE_EX_MIXEDBUTTONS
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
static LRESULT iewnd_OnSize(InternetExplorer *This, INT width, INT height)
static HMENU get_tb_menu(HMENU menu)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SetWindowLongPtrW
#define MAKEINTRESOURCEW(i)
void InternetExplorer_WebBrowser_Init(InternetExplorer *This)
GLuint GLuint GLsizei GLenum type
#define IDC_BROWSE_STATUSBAR
HSZ WINAPI DdeCreateStringHandleW(DWORD, LPCWSTR, INT)
void register_iewindow_class(void)
UINT WINAPI DdeInitializeW(LPDWORD, PFNCALLBACK, DWORD, DWORD)
static ULONG IEDocHost_addref(DocHost *iface)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define HeapFree(x, y, z)
#define IDC_BROWSE_TOOLBAR
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
static void create_rebar(InternetExplorer *ie)
static HDDEDATA WINAPI dde_proc(UINT type, UINT uFmt, HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA data, ULONG_PTR dwData1, ULONG_PTR dwData2)
static UINT WPARAM wparam
static LRESULT iewnd_OnCreate(HWND hwnd, LPCREATESTRUCTW lpcs)
static void DocHostContainer_on_command_state_change(DocHost *iface, LONG command, BOOL enable)
static BOOL heap_free(void *mem)
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
static ULONG WINAPI InternetExplorerManager_Release(IInternetExplorerManager *iface)
static void free_fav_menu_data(HMENU menu)
BOOL WINAPI FindClose(HANDLE hFindFile)