Commit 5d0873a7 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

shdocvw: Implement IEWinMain using a simple window frame.

parent 11132d2c
......@@ -16,6 +16,7 @@ C_SRCS = \
events.c \
factory.c \
frame.c \
iexplore.c \
navigate.c \
oleobject.c \
persist.c \
......
......@@ -185,5 +185,8 @@ static inline void SHDOCVW_LockModule(void) { InterlockedIncrement( &SHDOCVW_ref
static inline void SHDOCVW_UnlockModule(void) { InterlockedDecrement( &SHDOCVW_refCount ); }
extern HINSTANCE shdocvw_hinstance;
extern void register_iewindow_class(void);
extern void unregister_iewindow_class(void);
extern BOOL create_ie_window(LPCWSTR url);
#endif /* __WINE_SHDOCVW_H */
......@@ -105,10 +105,12 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad)
{
case DLL_PROCESS_ATTACH:
shdocvw_hinstance = hinst;
register_iewindow_class();
break;
case DLL_PROCESS_DETACH:
if (SHDOCVW_hshell32) FreeLibrary(SHDOCVW_hshell32);
if (hMozCtl && hMozCtl != (HMODULE)~0UL) FreeLibrary(hMozCtl);
unregister_iewindow_class();
break;
}
return TRUE;
......@@ -664,7 +666,25 @@ DWORD WINAPI StopWatchAFORWARD(DWORD dwClass, LPCSTR lpszStr, DWORD dwUnknown,
*/
DWORD WINAPI IEWinMain(LPSTR szCommandLine, int nShowWindow)
{
LPWSTR url;
DWORD len;
FIXME("%s %d\n", debugstr_a(szCommandLine), nShowWindow);
CoInitialize(NULL);
/* FIXME: parse the command line properly, handle -Embedding */
len = MultiByteToWideChar(CP_ACP, 0, szCommandLine, -1, NULL, 0);
url = HeapAlloc(GetProcessHeap(),0,len*sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, szCommandLine, -1, url, len);
create_ie_window(url);
HeapFree(GetProcessHeap(), 0, url);
CoUninitialize();
ExitProcess(0);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment