diff --git a/dll/win32/inetcomm/CMakeLists.txt b/dll/win32/inetcomm/CMakeLists.txt index 6476528383e..6770e77302d 100644 --- a/dll/win32/inetcomm/CMakeLists.txt +++ b/dll/win32/inetcomm/CMakeLists.txt @@ -22,8 +22,9 @@ add_library(inetcomm MODULE ${CMAKE_CURRENT_BINARY_DIR}/inetcomm.def) set_module_type(inetcomm win32dll) -target_link_libraries(inetcomm uuid wine) -add_importlibs(inetcomm ole32 oleaut32 ws2_32 user32 propsys urlmon msvcrt kernel32 ntdll) +add_idl_reg_scripts(inetcomm registry inetcomm.idl) +target_link_libraries(inetcomm oldnames uuid wine wine_dll_register wine_dll_canunload) +add_importlibs(inetcomm ole32 oleaut32 ws2_32 user32 propsys urlmon msvcrt kernel32_vista kernel32 ntdll) add_pch(inetcomm precomp.h "${PCH_SKIP_SOURCE}") add_cd_file(TARGET inetcomm DESTINATION reactos/system32 FOR all) set_wine_module_FIXME(inetcomm) # CORE-5743: No ARRAY_SIZE and CONST_VTABLE diff --git a/dll/win32/inetcomm/imaptransport.c b/dll/win32/inetcomm/imaptransport.c index 0da456eac8f..27ed5b37f36 100644 --- a/dll/win32/inetcomm/imaptransport.c +++ b/dll/win32/inetcomm/imaptransport.c @@ -191,35 +191,35 @@ static HRESULT WINAPI IMAPTransport_Capability(IIMAPTransport *iface, static HRESULT WINAPI IMAPTransport_Select(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, LPSTR lpszMailboxName) { - FIXME("(%ld, %ld, %p, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName)); + FIXME("(%Id, %Id, %p, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName)); return E_NOTIMPL; } static HRESULT WINAPI IMAPTransport_Examine(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, LPSTR lpszMailboxName) { - FIXME("(%ld, %ld, %p, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName)); + FIXME("(%Id, %Id, %p, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName)); return E_NOTIMPL; } static HRESULT WINAPI IMAPTransport_Create(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, LPSTR lpszMailboxName) { - FIXME("(%ld, %ld, %p, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName)); + FIXME("(%Id, %Id, %p, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName)); return E_NOTIMPL; } static HRESULT WINAPI IMAPTransport_Delete(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, LPSTR lpszMailboxName) { - FIXME("(%ld, %ld, %p, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName)); + FIXME("(%Id, %Id, %p, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName)); return E_NOTIMPL; } static HRESULT WINAPI IMAPTransport_Rename(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, LPSTR lpszMailboxName, LPSTR lpszNewMailboxName) { - FIXME("(%ld, %ld, %p, %s, %s): stub\n", wParam, lParam, pCBHandler, + FIXME("(%Id, %Id, %p, %s, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName), debugstr_a(lpszNewMailboxName)); return E_NOTIMPL; } @@ -227,21 +227,21 @@ static HRESULT WINAPI IMAPTransport_Rename(IIMAPTransport *iface, WPARAM wParam, static HRESULT WINAPI IMAPTransport_Subscribe(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, LPSTR lpszMailboxName) { - FIXME("(%ld, %ld, %p, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName)); + FIXME("(%Id, %Id, %p, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName)); return E_NOTIMPL; } static HRESULT WINAPI IMAPTransport_Unsubscribe(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, LPSTR lpszMailboxName) { - FIXME("(%ld, %ld, %p, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName)); + FIXME("(%Id, %Id, %p, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName)); return E_NOTIMPL; } static HRESULT WINAPI IMAPTransport_List(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, LPSTR lpszMailboxNameReference, LPSTR lpszMailboxNamePattern) { - FIXME("(%ld, %ld, %p, %s, %s): stub\n", wParam, lParam, pCBHandler, + FIXME("(%Id, %Id, %p, %s, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxNameReference), debugstr_a(lpszMailboxNamePattern)); return E_NOTIMPL; } @@ -249,7 +249,7 @@ static HRESULT WINAPI IMAPTransport_List(IIMAPTransport *iface, WPARAM wParam, L static HRESULT WINAPI IMAPTransport_Lsub(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, LPSTR lpszMailboxNameReference, LPSTR lpszMailboxNamePattern) { - FIXME("(%ld, %ld, %p, %s, %s): stub\n", wParam, lParam, pCBHandler, + FIXME("(%Id, %Id, %p, %s, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxNameReference), debugstr_a(lpszMailboxNamePattern)); return E_NOTIMPL; } @@ -258,7 +258,7 @@ static HRESULT WINAPI IMAPTransport_Append(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, LPSTR lpszMailboxName, LPSTR lpszMessageFlags, FILETIME ftMessageDateTime, LPSTREAM lpstmMessageToSave) { - FIXME("(%ld, %ld, %p, %s, %s, %p): stub\n", wParam, lParam, pCBHandler, + FIXME("(%Id, %Id, %p, %s, %s, %p): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszMailboxName), debugstr_a(lpszMessageFlags), lpstmMessageToSave); return E_NOTIMPL; } @@ -266,14 +266,14 @@ static HRESULT WINAPI IMAPTransport_Append(IIMAPTransport *iface, static HRESULT WINAPI IMAPTransport_Close(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler) { - FIXME("(%ld, %ld, %p): stub\n", wParam, lParam, pCBHandler); + FIXME("(%Id, %Id, %p): stub\n", wParam, lParam, pCBHandler); return E_NOTIMPL; } static HRESULT WINAPI IMAPTransport_Expunge(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler) { - FIXME("(%ld, %ld, %p): stub\n", wParam, lParam, pCBHandler); + FIXME("(%Id, %Id, %p): stub\n", wParam, lParam, pCBHandler); return E_NOTIMPL; } @@ -281,7 +281,7 @@ static HRESULT WINAPI IMAPTransport_Search(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, LPSTR lpszSearchCriteria, boolean bReturnUIDs, IRangeList *pMsgRange, boolean bUIDRangeList) { - FIXME("(%ld, %ld, %p, %s, %d, %p, %d): stub\n", wParam, lParam, pCBHandler, + FIXME("(%Id, %Id, %p, %s, %d, %p, %d): stub\n", wParam, lParam, pCBHandler, debugstr_a(lpszSearchCriteria), bReturnUIDs, pMsgRange, bUIDRangeList); return E_NOTIMPL; } @@ -289,7 +289,7 @@ static HRESULT WINAPI IMAPTransport_Search(IIMAPTransport *iface, static HRESULT WINAPI IMAPTransport_Fetch(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, IRangeList *pMsgRange, boolean bUIDMsgRange, LPSTR lpszFetchArgs) { - FIXME("(%ld, %ld, %p, %p, %d, %s): stub\n", wParam, lParam, pCBHandler, pMsgRange, + FIXME("(%Id, %Id, %p, %p, %d, %s): stub\n", wParam, lParam, pCBHandler, pMsgRange, bUIDMsgRange, debugstr_a(lpszFetchArgs)); return E_NOTIMPL; } @@ -297,7 +297,7 @@ static HRESULT WINAPI IMAPTransport_Fetch(IIMAPTransport *iface, WPARAM wParam, static HRESULT WINAPI IMAPTransport_Store(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, IRangeList *pMsgRange, boolean bUIDRangeList, LPSTR lpszStoreArgs) { - FIXME("(%ld, %ld, %p, %p, %d, %s): stub\n", wParam, lParam, pCBHandler, pMsgRange, + FIXME("(%Id, %Id, %p, %p, %d, %s): stub\n", wParam, lParam, pCBHandler, pMsgRange, bUIDRangeList, debugstr_a(lpszStoreArgs)); return E_NOTIMPL; } @@ -305,7 +305,7 @@ static HRESULT WINAPI IMAPTransport_Store(IIMAPTransport *iface, WPARAM wParam, static HRESULT WINAPI IMAPTransport_Copy(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, IRangeList *pMsgRange, boolean bUIDRangeList, LPSTR lpszMailboxName) { - FIXME("(%ld, %ld, %p, %p, %d, %s): stub\n", wParam, lParam, pCBHandler, pMsgRange, + FIXME("(%Id, %Id, %p, %p, %d, %s): stub\n", wParam, lParam, pCBHandler, pMsgRange, bUIDRangeList, debugstr_a(lpszMailboxName)); return E_NOTIMPL; } @@ -313,33 +313,33 @@ static HRESULT WINAPI IMAPTransport_Copy(IIMAPTransport *iface, WPARAM wParam, L static HRESULT WINAPI IMAPTransport_Noop(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler) { - FIXME("(%ld, %ld, %p): stub\n", wParam, lParam, pCBHandler); + FIXME("(%Id, %Id, %p): stub\n", wParam, lParam, pCBHandler); return E_NOTIMPL; } static HRESULT WINAPI IMAPTransport_ResizeMsgSeqNumTable(IIMAPTransport *iface, DWORD dwSizeOfMbox) { - FIXME("(%u): stub\n", dwSizeOfMbox); + FIXME("(%lu): stub\n", dwSizeOfMbox); return E_NOTIMPL; } static HRESULT WINAPI IMAPTransport_UpdateSeqNumToUID(IIMAPTransport *iface, DWORD dwMsgSeqNum, DWORD dwUID) { - FIXME("(%u, %u): stub\n", dwMsgSeqNum, dwUID); + FIXME("(%lu, %lu): stub\n", dwMsgSeqNum, dwUID); return E_NOTIMPL; } static HRESULT WINAPI IMAPTransport_RemoveSequenceNum(IIMAPTransport *iface, DWORD dwDeletedMsgSeqNum) { - FIXME("(%u): stub\n", dwDeletedMsgSeqNum); + FIXME("(%lu): stub\n", dwDeletedMsgSeqNum); return E_NOTIMPL; } static HRESULT WINAPI IMAPTransport_MsgSeqNumToUID(IIMAPTransport *iface, DWORD dwMsgSeqNum, DWORD *pdwUID) { - FIXME("(%u, %p): stub\n", dwMsgSeqNum, pdwUID); + FIXME("(%lu, %p): stub\n", dwMsgSeqNum, pdwUID); return E_NOTIMPL; } @@ -371,7 +371,7 @@ static HRESULT WINAPI IMAPTransport_SetDefaultCBHandler(IIMAPTransport *iface, I static HRESULT WINAPI IMAPTransport_Status(IIMAPTransport *iface, WPARAM wParam, LPARAM lParam, IIMAPCallback *pCBHandler, LPSTR pszMailboxName, LPSTR pszStatusCmdArgs) { - FIXME("(%ld, %ld, %p, %s, %s): stub\n", wParam, lParam, pCBHandler, + FIXME("(%Id, %Id, %p, %s, %s): stub\n", wParam, lParam, pCBHandler, debugstr_a(pszMailboxName), debugstr_a(pszStatusCmdArgs)); return E_NOTIMPL; } diff --git a/dll/win32/inetcomm/inetcomm.rc b/dll/win32/inetcomm/inetcomm.rc index f42fe0d5c0b..94f51ce529b 100644 --- a/dll/win32/inetcomm/inetcomm.rc +++ b/dll/win32/inetcomm/inetcomm.rc @@ -18,5 +18,3 @@ /* @makedep: inetcomm.rgs */ 1 WINE_REGISTRY inetcomm.rgs - -2 WINE_REGISTRY inetcomm_r.rgs diff --git a/dll/win32/inetcomm/inetcomm_main.c b/dll/win32/inetcomm/inetcomm_main.c index c916ea18d74..ad02f210d9a 100644 --- a/dll/win32/inetcomm/inetcomm_main.c +++ b/dll/win32/inetcomm/inetcomm_main.c @@ -38,23 +38,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(inetcomm); -static HINSTANCE instance; - BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { static IMimeInternational *international; - TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); + TRACE("(%p, %ld, %p)\n", hinstDLL, fdwReason, lpvReserved); switch (fdwReason) { -#ifndef __REACTOS__ - case DLL_WINE_PREATTACH: - return FALSE; -#endif case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hinstDLL); - instance = hinstDLL; if (!InternetTransport_RegisterClass(hinstDLL)) return FALSE; MimeInternational_Construct(&international); @@ -212,27 +205,3 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) return IClassFactory_QueryInterface( cf, iid, ppv ); } - -/*********************************************************************** - * DllCanUnloadNow (INETCOMM.@) - */ -HRESULT WINAPI DllCanUnloadNow(void) -{ - return S_FALSE; -} - -/*********************************************************************** - * DllRegisterServer (INETCOMM.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - return __wine_register_resources( instance ); -} - -/*********************************************************************** - * DllUnregisterServer (INETCOMM.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - return __wine_unregister_resources( instance ); -} diff --git a/dll/win32/inetcomm/inetcomm_private.h b/dll/win32/inetcomm/inetcomm_private.h index fa40a340393..f59f7e9bd9e 100644 --- a/dll/win32/inetcomm/inetcomm_private.h +++ b/dll/win32/inetcomm/inetcomm_private.h @@ -52,36 +52,36 @@ struct InternetTransport HWND hwnd; }; -HRESULT InternetTransport_Init(InternetTransport *This) DECLSPEC_HIDDEN; -HRESULT InternetTransport_GetServerInfo(InternetTransport *This, LPINETSERVER pInetServer) DECLSPEC_HIDDEN; +HRESULT InternetTransport_Init(InternetTransport *This); +HRESULT InternetTransport_GetServerInfo(InternetTransport *This, LPINETSERVER pInetServer); HRESULT InternetTransport_InetServerFromAccount(InternetTransport *This, - IImnAccount *pAccount, LPINETSERVER pInetServer) DECLSPEC_HIDDEN; + IImnAccount *pAccount, LPINETSERVER pInetServer); HRESULT InternetTransport_Connect(InternetTransport *This, - LPINETSERVER pInetServer, boolean fAuthenticate, boolean fCommandLogging) DECLSPEC_HIDDEN; -HRESULT InternetTransport_HandsOffCallback(InternetTransport *This) DECLSPEC_HIDDEN; -HRESULT InternetTransport_DropConnection(InternetTransport *This) DECLSPEC_HIDDEN; + LPINETSERVER pInetServer, boolean fAuthenticate, boolean fCommandLogging); +HRESULT InternetTransport_HandsOffCallback(InternetTransport *This); +HRESULT InternetTransport_DropConnection(InternetTransport *This); HRESULT InternetTransport_GetStatus(InternetTransport *This, - IXPSTATUS *pCurrentStatus) DECLSPEC_HIDDEN; -HRESULT InternetTransport_ChangeStatus(InternetTransport *This, IXPSTATUS Status) DECLSPEC_HIDDEN; + IXPSTATUS *pCurrentStatus); +HRESULT InternetTransport_ChangeStatus(InternetTransport *This, IXPSTATUS Status); HRESULT InternetTransport_ReadLine(InternetTransport *This, - INETXPORT_COMPLETION_FUNCTION fnCompletion) DECLSPEC_HIDDEN; + INETXPORT_COMPLETION_FUNCTION fnCompletion); HRESULT InternetTransport_Write(InternetTransport *This, const char *pvData, - int cbSize, INETXPORT_COMPLETION_FUNCTION fnCompletion) DECLSPEC_HIDDEN; + int cbSize, INETXPORT_COMPLETION_FUNCTION fnCompletion); HRESULT InternetTransport_DoCommand(InternetTransport *This, - LPCSTR pszCommand, INETXPORT_COMPLETION_FUNCTION fnCompletion) DECLSPEC_HIDDEN; + LPCSTR pszCommand, INETXPORT_COMPLETION_FUNCTION fnCompletion); -BOOL InternetTransport_RegisterClass(HINSTANCE hInstance) DECLSPEC_HIDDEN; -void InternetTransport_UnregisterClass(HINSTANCE hInstance) DECLSPEC_HIDDEN; +BOOL InternetTransport_RegisterClass(HINSTANCE hInstance); +void InternetTransport_UnregisterClass(HINSTANCE hInstance); -HRESULT MimeBody_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN; -HRESULT MimeAllocator_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN; -HRESULT MimeMessage_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN; -HRESULT MimeSecurity_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN; -HRESULT VirtualStream_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN; -HRESULT MimeHtmlProtocol_create(IUnknown *outer, void **obj) DECLSPEC_HIDDEN; +HRESULT MimeBody_create(IUnknown *outer, void **obj); +HRESULT MimeAllocator_create(IUnknown *outer, void **obj); +HRESULT MimeMessage_create(IUnknown *outer, void **obj); +HRESULT MimeSecurity_create(IUnknown *outer, void **obj); +HRESULT VirtualStream_create(IUnknown *outer, void **obj); +HRESULT MimeHtmlProtocol_create(IUnknown *outer, void **obj); -HRESULT MimeInternational_Construct(IMimeInternational **internat) DECLSPEC_HIDDEN; +HRESULT MimeInternational_Construct(IMimeInternational **internat); -HRESULT SMTPTransportCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN; -HRESULT IMAPTransportCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN; -HRESULT POP3TransportCF_Create(REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN; +HRESULT SMTPTransportCF_Create(REFIID riid, LPVOID *ppv); +HRESULT IMAPTransportCF_Create(REFIID riid, LPVOID *ppv); +HRESULT POP3TransportCF_Create(REFIID riid, LPVOID *ppv); diff --git a/dll/win32/inetcomm/inetcomm_r.rgs b/dll/win32/inetcomm/inetcomm_r.rgs deleted file mode 100644 index 116ba35195c..00000000000 --- a/dll/win32/inetcomm/inetcomm_r.rgs +++ /dev/null @@ -1,73 +0,0 @@ -HKCR -{ - NoRemove Interface - { - } - NoRemove CLSID - { - '{FD853CDB-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IMimeBody' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{FD853CDD-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IMimeAllocator' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{FD853CDE-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IMimeSecurity' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{FD853CDF-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IVirtualStream' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{FD853CE3-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IMimeMessage' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{FD853CE6-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_ISMTPTransport' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{FD853CE7-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IPOP3Transport' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{FD853CE8-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_INNTPTransport' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{FD853CE9-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IRASTransport' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{FD853CEA-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IRangeList' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{FD853CEB-7F86-11D0-8252-00C04FD85AB4}' = s 'CLSID_IIMAPTransport' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{5A580C11-E5EB-11D1-A86E-0000F8084F96}' = s 'CLSID_IHTTPMailTransport' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{0DF2C7EC-3435-11D0-81D0-00C04FD85AB4}' = s 'CLSID_ISMTPTransport2' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{BB847B8A-054A-11D2-A894-0000F8084F96}' = s 'CLSID_IPropFindRequest' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{EA678830-235D-11D2-A8B6-0000F8084F96}' = s 'CLSID_IPropPatchRequest' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - '{05300401-BCBC-11D0-85E3-00C04FD85AB4}' = s 'MHTML Asynchronous Pluggable Protocol Handler' - { - InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } - } - } -} diff --git a/dll/win32/inetcomm/internettransport.c b/dll/win32/inetcomm/internettransport.c index dcce0d9df17..f7060abe9e7 100644 --- a/dll/win32/inetcomm/internettransport.c +++ b/dll/win32/inetcomm/internettransport.c @@ -35,7 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(inetcomm); -static const WCHAR wszClassName[] = {'T','h','o','r','C','o','n','n','W','n','d','C','l','a','s','s',0}; +static const WCHAR wszClassName[] = L"ThorConnWndClass"; #define IX_READ (WM_USER + 0) #define IX_READLINE (WM_USER + 1) diff --git a/dll/win32/inetcomm/mimeintl.c b/dll/win32/inetcomm/mimeintl.c index ec7d34028eb..9a4c610d996 100644 --- a/dll/win32/inetcomm/mimeintl.c +++ b/dll/win32/inetcomm/mimeintl.c @@ -19,7 +19,6 @@ */ #define COBJMACROS -#define NONAMELESSUNION #include #include @@ -166,7 +165,7 @@ static HRESULT WINAPI MimeInternat_GetCodePageCharset(IMimeInternational *iface, HRESULT hr; MIMECPINFO mlang_cp_info; - TRACE("(%p)->(%d, %d, %p)\n", iface, cpiCodePage, ctCsetType, phCharset); + TRACE("(%p)->(%ld, %d, %p)\n", iface, cpiCodePage, ctCsetType, phCharset); *phCharset = NULL; @@ -315,7 +314,7 @@ static HRESULT WINAPI MimeInternat_CanConvertCodePages(IMimeInternational *iface HRESULT hr; IMultiLanguage *ml; - TRACE("(%p)->(%d, %d)\n", iface, cpiSource, cpiDest); + TRACE("(%p)->(%ld, %ld)\n", iface, cpiSource, cpiDest); /* Could call mlang.IsConvertINetStringAvailable() to avoid the COM overhead if need be. */ @@ -354,7 +353,7 @@ static HRESULT WINAPI MimeInternat_ConvertBuffer(IMimeInternational *iface, CODE HRESULT hr; IMultiLanguage *ml; - TRACE("(%p)->(%d, %d, %p, %p, %p)\n", iface, cpiSource, cpiDest, pIn, pOut, pcbRead); + TRACE("(%p)->(%ld, %ld, %p, %p, %p)\n", iface, cpiSource, cpiDest, pIn, pOut, pcbRead); *pcbRead = 0; pOut->cbSize = 0; @@ -404,17 +403,17 @@ static HRESULT WINAPI MimeInternat_ConvertString(IMimeInternational *iface, CODE int src_len; IMultiLanguage *ml; - TRACE("(%p)->(%d, %d, %p %p)\n", iface, cpiSource, cpiDest, pIn, pOut); + TRACE("(%p)->(%ld, %ld, %p %p)\n", iface, cpiSource, cpiDest, pIn, pOut); switch(pIn->vt) { case VT_LPSTR: if(cpiSource == CP_UNICODE) cpiSource = GetACP(); - src_len = strlen(pIn->u.pszVal); + src_len = strlen(pIn->pszVal); break; case VT_LPWSTR: cpiSource = CP_UNICODE; - src_len = lstrlenW(pIn->u.pwszVal) * sizeof(WCHAR); + src_len = lstrlenW(pIn->pwszVal) * sizeof(WCHAR); break; default: return E_INVALIDARG; @@ -426,37 +425,37 @@ static HRESULT WINAPI MimeInternat_ConvertString(IMimeInternational *iface, CODE DWORD mode = 0; UINT in_size = src_len, out_size; - hr = IMultiLanguage_ConvertString(ml, &mode, cpiSource, cpiDest, (BYTE*)pIn->u.pszVal, &in_size, + hr = IMultiLanguage_ConvertString(ml, &mode, cpiSource, cpiDest, (BYTE*)pIn->pszVal, &in_size, NULL, &out_size); if(hr == S_OK) /* S_FALSE means the conversion could not be performed */ { out_size += (cpiDest == CP_UNICODE) ? sizeof(WCHAR) : sizeof(char); - pOut->u.pszVal = CoTaskMemAlloc(out_size); - if(!pOut->u.pszVal) + pOut->pszVal = CoTaskMemAlloc(out_size); + if(!pOut->pszVal) hr = E_OUTOFMEMORY; else { mode = 0; in_size = src_len; - hr = IMultiLanguage_ConvertString(ml, &mode, cpiSource, cpiDest, (BYTE*)pIn->u.pszVal, &in_size, - (BYTE*)pOut->u.pszVal, &out_size); + hr = IMultiLanguage_ConvertString(ml, &mode, cpiSource, cpiDest, (BYTE*)pIn->pszVal, &in_size, + (BYTE*)pOut->pszVal, &out_size); if(hr == S_OK) { if(cpiDest == CP_UNICODE) { - pOut->u.pwszVal[out_size / sizeof(WCHAR)] = 0; + pOut->pwszVal[out_size / sizeof(WCHAR)] = 0; pOut->vt = VT_LPWSTR; } else { - pOut->u.pszVal[out_size] = '\0'; + pOut->pszVal[out_size] = '\0'; pOut->vt = VT_LPSTR; } } else - CoTaskMemFree(pOut->u.pszVal); + CoTaskMemFree(pOut->pszVal); } } IMultiLanguage_Release(ml); @@ -527,7 +526,7 @@ HRESULT MimeInternational_Construct(IMimeInternational **internat) global_internat = HeapAlloc(GetProcessHeap(), 0, sizeof(*global_internat)); global_internat->IMimeInternational_iface.lpVtbl = &mime_internat_vtbl; global_internat->refs = 0; - InitializeCriticalSection(&global_internat->cs); + InitializeCriticalSectionEx(&global_internat->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO); global_internat->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": global_internat.cs"); list_init(&global_internat->charsets); diff --git a/dll/win32/inetcomm/mimeole.c b/dll/win32/inetcomm/mimeole.c index d69c40c8464..5a2225b2fdf 100644 --- a/dll/win32/inetcomm/mimeole.c +++ b/dll/win32/inetcomm/mimeole.c @@ -20,24 +20,19 @@ */ #define COBJMACROS -#define NONAMELESSUNION #include #include #include "windef.h" #include "winbase.h" -#include "wine/winternl.h" +#include "winternl.h" #include "winuser.h" #include "objbase.h" #include "ole2.h" #include "mimeole.h" -#ifdef __REACTOS__ -#include -#endif #include "propvarutil.h" -#include "wine/heap.h" #include "wine/list.h" #include "wine/debug.h" @@ -207,7 +202,7 @@ static ULONG WINAPI sub_stream_AddRef(IStream *iface) sub_stream_t *This = impl_from_IStream(iface); LONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); return ref; } @@ -217,12 +212,12 @@ static ULONG WINAPI sub_stream_Release(IStream *iface) sub_stream_t *This = impl_from_IStream(iface); LONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); if(!ref) { IStream_Release(This->base); - HeapFree(GetProcessHeap(), 0, This); + free(This); } return ref; } @@ -237,7 +232,7 @@ static HRESULT WINAPI sub_stream_Read( HRESULT hr; LARGE_INTEGER tmp_pos; - TRACE("(%p, %d, %p)\n", pv, cb, pcbRead); + TRACE("(%p, %ld, %p)\n", pv, cb, pcbRead); tmp_pos.QuadPart = This->pos.QuadPart + This->start.QuadPart; IStream_Seek(This->base, tmp_pos, STREAM_SEEK_SET, NULL); @@ -271,7 +266,7 @@ static HRESULT WINAPI sub_stream_Seek( sub_stream_t *This = impl_from_IStream(iface); LARGE_INTEGER new_pos; - TRACE("(%08x.%08x, %x, %p)\n", dlibMove.u.HighPart, dlibMove.u.LowPart, dwOrigin, plibNewPosition); + TRACE("(%08lx.%08lx, %lx, %p)\n", dlibMove.HighPart, dlibMove.LowPart, dwOrigin, plibNewPosition); switch(dwOrigin) { @@ -318,7 +313,7 @@ static HRESULT WINAPI sub_stream_CopyTo( ULARGE_INTEGER totalBytesRead; ULARGE_INTEGER totalBytesWritten; - TRACE("(%p)->(%p, %d, %p, %p)\n", iface, pstm, cb.u.LowPart, pcbRead, pcbWritten); + TRACE("(%p)->(%p, %ld, %p, %p)\n", iface, pstm, cb.LowPart, pcbRead, pcbWritten); totalBytesRead.QuadPart = 0; totalBytesWritten.QuadPart = 0; @@ -328,7 +323,7 @@ static HRESULT WINAPI sub_stream_CopyTo( if ( cb.QuadPart >= sizeof(tmpBuffer) ) copySize = sizeof(tmpBuffer); else - copySize = cb.u.LowPart; + copySize = cb.LowPart; hr = IStream_Read(iface, tmpBuffer, copySize, &bytesRead); if (FAILED(hr)) break; @@ -395,7 +390,7 @@ static HRESULT WINAPI sub_stream_Stat( DWORD grfStatFlag) { sub_stream_t *This = impl_from_IStream(iface); - FIXME("(%p)->(%p, %08x)\n", This, pstatstg, grfStatFlag); + FIXME("(%p)->(%p, %08lx)\n", This, pstatstg, grfStatFlag); memset(pstatstg, 0, sizeof(*pstatstg)); pstatstg->cbSize = This->length; return S_OK; @@ -432,7 +427,7 @@ static HRESULT create_sub_stream(IStream *stream, ULARGE_INTEGER start, ULARGE_I sub_stream_t *This; *out = NULL; - This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + This = malloc(sizeof(*This)); if(!This) return E_OUTOFMEMORY; This->IStream_iface.lpVtbl = &sub_stream_vtbl; @@ -479,15 +474,6 @@ static inline propschema *impl_from_IMimePropertySchema(IMimePropertySchema *ifa return CONTAINING_RECORD(iface, propschema, IMimePropertySchema_iface); } -static LPSTR strdupA(LPCSTR str) -{ - char *ret; - int len = strlen(str); - ret = HeapAlloc(GetProcessHeap(), 0, len + 1); - memcpy(ret, str, len + 1); - return ret; -} - #define PARSER_BUF_SIZE 1024 /***************************************************** @@ -498,7 +484,7 @@ static LPSTR strdupA(LPCSTR str) */ static HRESULT copy_headers_to_buf(IStream *stm, char **ptr) { - char *buf = NULL; + char *buf = NULL, *new_buf; DWORD size = PARSER_BUF_SIZE, offset = 0, last_end = 0; HRESULT hr; BOOL done = FALSE; @@ -510,18 +496,14 @@ static HRESULT copy_headers_to_buf(IStream *stm, char **ptr) char *end; DWORD read; - if(!buf) - buf = HeapAlloc(GetProcessHeap(), 0, size + 1); - else - { - size *= 2; - buf = HeapReAlloc(GetProcessHeap(), 0, buf, size + 1); - } - if(!buf) + if(buf) size *= 2; + new_buf = realloc(buf, size + 1); + if(!new_buf) { hr = E_OUTOFMEMORY; goto fail; } + buf = new_buf; hr = IStream_Read(stm, buf + offset, size - offset, &read); if(FAILED(hr)) goto fail; @@ -551,7 +533,7 @@ static HRESULT copy_headers_to_buf(IStream *stm, char **ptr) return S_OK; fail: - HeapFree(GetProcessHeap(), 0, buf); + free(buf); return hr; } @@ -569,7 +551,7 @@ static header_t *read_prop(MimeBody *body, char **ptr) { if(!lstrcmpiA(*ptr, prop->name)) { - TRACE("%s: found match with default property id %d\n", *ptr, prop->id); + TRACE("%s: found match with default property id %ld\n", *ptr, prop->id); break; } } @@ -581,25 +563,25 @@ static header_t *read_prop(MimeBody *body, char **ptr) { if(!lstrcmpiA(*ptr, prop_entry->prop.name)) { - TRACE("%s: found match with already added new property id %d\n", *ptr, prop_entry->prop.id); + TRACE("%s: found match with already added new property id %ld\n", *ptr, prop_entry->prop.id); prop = &prop_entry->prop; break; } } if(!prop->name) { - prop_entry = HeapAlloc(GetProcessHeap(), 0, sizeof(*prop_entry)); - prop_entry->prop.name = strdupA(*ptr); + prop_entry = malloc(sizeof(*prop_entry)); + prop_entry->prop.name = strdup(*ptr); prop_entry->prop.id = body->next_prop_id++; prop_entry->prop.flags = 0; prop_entry->prop.default_vt = VT_LPSTR; list_add_tail(&body->new_props, &prop_entry->entry); prop = &prop_entry->prop; - TRACE("%s: allocating new prop id %d\n", *ptr, prop_entry->prop.id); + TRACE("%s: allocating new prop id %ld\n", *ptr, prop_entry->prop.id); } } - ret = HeapAlloc(GetProcessHeap(), 0, sizeof(*ret)); + ret = malloc(sizeof(*ret)); ret->prop = prop; PropVariantInit(&ret->value); list_init(&ret->params); @@ -645,7 +627,7 @@ static char *unquote_string(const char *str) quoted = TRUE; str++; } - ret = strdupA(str); + ret = strdup(str); for(cp = ret; *cp; cp++) { if(*cp == '\\') @@ -683,13 +665,13 @@ static void add_param(header_t *header, const char *p) return; } - name = HeapAlloc(GetProcessHeap(), 0, cp - key + 1); + name = malloc(cp - key + 1); memcpy(name, key, cp - key); name[cp - key] = '\0'; value = cp + 1; - param = HeapAlloc(GetProcessHeap(), 0, sizeof(*param)); + param = malloc(sizeof(*param)); param->name = name; param->value = unquote_string(value); list_add_tail(&header->params, ¶m->entry); @@ -727,7 +709,7 @@ static void read_value(header_t *header, char **cur) } while(*end == ' ' || *end == '\t'); len = end - *cur; - value = HeapAlloc(GetProcessHeap(), 0, len + 1); + value = CoTaskMemAlloc(len + 1); memcpy(value, *cur, len); value[len] = '\0'; @@ -741,7 +723,7 @@ static void read_value(header_t *header, char **cur) } header->value.vt = VT_LPSTR; - header->value.u.pszVal = value; + header->value.pszVal = value; *cur = end; } @@ -751,30 +733,30 @@ static void init_content_type(MimeBody *body, header_t *header) char *slash; DWORD len; - slash = strchr(header->value.u.pszVal, '/'); + slash = strchr(header->value.pszVal, '/'); if(!slash) { WARN("malformed context type value\n"); return; } - len = slash - header->value.u.pszVal; - body->content_pri_type = HeapAlloc(GetProcessHeap(), 0, len + 1); - memcpy(body->content_pri_type, header->value.u.pszVal, len); + len = slash - header->value.pszVal; + body->content_pri_type = malloc(len + 1); + memcpy(body->content_pri_type, header->value.pszVal, len); body->content_pri_type[len] = '\0'; - body->content_sub_type = strdupA(slash + 1); + body->content_sub_type = strdup(slash + 1); } static void init_content_encoding(MimeBody *body, header_t *header) { - const char *encoding = header->value.u.pszVal; + const char *encoding = header->value.pszVal; - if(!_strnicmp(encoding, "base64", -1)) + if(!stricmp(encoding, "base64")) body->encoding = IET_BASE64; - else if(!_strnicmp(encoding, "quoted-printable", -1)) + else if(!stricmp(encoding, "quoted-printable")) body->encoding = IET_QP; - else if(!_strnicmp(encoding, "7bit", -1)) + else if(!stricmp(encoding, "7bit")) body->encoding = IET_7BIT; - else if(!_strnicmp(encoding, "8bit", -1)) + else if(!stricmp(encoding, "8bit")) body->encoding = IET_8BIT; else FIXME("unknown encoding %s\n", debugstr_a(encoding)); @@ -805,7 +787,7 @@ static HRESULT parse_headers(MimeBody *body, IStream *stm) } } - HeapFree(GetProcessHeap(), 0, header_buf); + free(header_buf); return hr; } @@ -816,9 +798,9 @@ static void empty_param_list(struct list *list) LIST_FOR_EACH_ENTRY_SAFE(param, cursor2, list, param_t, entry) { list_remove(¶m->entry); - HeapFree(GetProcessHeap(), 0, param->name); - HeapFree(GetProcessHeap(), 0, param->value); - HeapFree(GetProcessHeap(), 0, param); + free(param->name); + free(param->value); + free(param); } } @@ -827,7 +809,7 @@ static void free_header(header_t *header) list_remove(&header->entry); PropVariantClear(&header->value); empty_param_list(&header->params); - heap_free(header); + free(header); } static void empty_header_list(struct list *list) @@ -847,8 +829,8 @@ static void empty_new_prop_list(struct list *list) LIST_FOR_EACH_ENTRY_SAFE(prop, cursor2, list, property_list_entry_t, entry) { list_remove(&prop->entry); - HeapFree(GetProcessHeap(), 0, (char *)prop->prop.name); - HeapFree(GetProcessHeap(), 0, prop); + free((char *)prop->prop.name); + free(prop); } } @@ -908,7 +890,7 @@ static const property_t *find_default_prop(const char *name) } if(prop_def->id) - TRACE("%s: found match with default property id %d\n", prop_def->name, prop_def->id); + TRACE("%s: found match with default property id %ld\n", prop_def->name, prop_def->id); else prop_def = NULL; @@ -947,7 +929,7 @@ static ULONG WINAPI MimeBody_AddRef(IMimeBody *iface) MimeBody *This = impl_from_IMimeBody(iface); LONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); return ref; } @@ -957,19 +939,19 @@ static ULONG WINAPI MimeBody_Release(IMimeBody *iface) MimeBody *This = impl_from_IMimeBody(iface); LONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); if (!ref) { empty_header_list(&This->headers); empty_new_prop_list(&This->new_props); - HeapFree(GetProcessHeap(), 0, This->content_pri_type); - HeapFree(GetProcessHeap(), 0, This->content_sub_type); + free(This->content_pri_type); + free(This->content_sub_type); release_data(&This->data_iid, This->data); - HeapFree(GetProcessHeap(), 0, This); + free(This); } return ref; @@ -1044,10 +1026,10 @@ static HRESULT WINAPI MimeBody_GetPropInfo( if(!pszName || !pInfo) return E_INVALIDARG; - TRACE("mask 0x%04x\n", pInfo->dwMask); + TRACE("mask 0x%04lx\n", pInfo->dwMask); if(pInfo->dwMask & ~supported) - FIXME("Unsupported mask flags 0x%04x\n", pInfo->dwMask & ~supported); + FIXME("Unsupported mask flags 0x%04lx\n", pInfo->dwMask & ~supported); hr = find_prop(This, pszName, &header); if(hr == S_OK) @@ -1093,7 +1075,7 @@ static HRESULT WINAPI MimeBody_GetProp( header_t *header; HRESULT hr; - TRACE("(%p)->(%s, 0x%x, %p)\n", This, debugstr_a(pszName), dwFlags, pValue); + TRACE("(%p)->(%s, 0x%lx, %p)\n", This, debugstr_a(pszName), dwFlags, pValue); if(!pszName || !pValue) return E_INVALIDARG; @@ -1102,7 +1084,8 @@ static HRESULT WINAPI MimeBody_GetProp( { PropVariantClear(pValue); pValue->vt = VT_LPSTR; - pValue->u.pszVal = strdupA(This->content_pri_type); + pValue->pszVal = CoTaskMemAlloc(strlen(This->content_pri_type) + 1); + strcpy(pValue->pszVal, This->content_pri_type); return S_OK; } @@ -1129,7 +1112,7 @@ static HRESULT WINAPI MimeBody_SetProp( header_t *header; HRESULT hr; - TRACE("(%p)->(%s, 0x%x, %p)\n", This, debugstr_a(pszName), dwFlags, pValue); + TRACE("(%p)->(%s, 0x%lx, %p)\n", This, debugstr_a(pszName), dwFlags, pValue); if(!pszName || !pValue) return E_INVALIDARG; @@ -1146,49 +1129,49 @@ static HRESULT WINAPI MimeBody_SetProp( { if(STRTOPID(pszName) == prop_entry->prop.id) { - TRACE("Found match with already added new property id %d\n", prop_entry->prop.id); + TRACE("Found match with already added new property id %ld\n", prop_entry->prop.id); prop = &prop_entry->prop; break; } } else if(!lstrcmpiA(pszName, prop_entry->prop.name)) { - TRACE("Found match with already added new property id %d\n", prop_entry->prop.id); + TRACE("Found match with already added new property id %ld\n", prop_entry->prop.id); prop = &prop_entry->prop; break; } } - header = HeapAlloc(GetProcessHeap(), 0, sizeof(*header)); + header = malloc(sizeof(*header)); if(!header) return E_OUTOFMEMORY; if(!prop) { const property_t *prop_def = NULL; - prop_entry = HeapAlloc(GetProcessHeap(), 0, sizeof(*prop_entry)); + prop_entry = malloc(sizeof(*prop_entry)); if(!prop_entry) { - HeapFree(GetProcessHeap(), 0, header); + free(header); return E_OUTOFMEMORY; } prop_def = find_default_prop(pszName); if(prop_def) { - prop_entry->prop.name = strdupA(prop_def->name); + prop_entry->prop.name = strdup(prop_def->name); prop_entry->prop.id = prop_def->id; } else { if(ISPIDSTR(pszName)) { - HeapFree(GetProcessHeap(), 0, prop_entry); - HeapFree(GetProcessHeap(), 0, header); + free(prop_entry); + free(header); return MIME_E_NOT_FOUND; } - prop_entry->prop.name = strdupA(pszName); + prop_entry->prop.name = strdup(pszName); prop_entry->prop.id = This->next_prop_id++; } @@ -1196,7 +1179,7 @@ static HRESULT WINAPI MimeBody_SetProp( prop_entry->prop.default_vt = pValue->vt; list_add_tail(&This->new_props, &prop_entry->entry); prop = &prop_entry->prop; - TRACE("Allocating new prop id %d\n", prop_entry->prop.id); + TRACE("Allocating new prop id %ld\n", prop_entry->prop.id); } header->prop = prop; @@ -1217,7 +1200,7 @@ static HRESULT WINAPI MimeBody_AppendProp( LPPROPVARIANT pValue) { MimeBody *This = impl_from_IMimeBody(iface); - FIXME("(%p)->(%s, 0x%x, %p) stub\n", This, debugstr_a(pszName), dwFlags, pValue); + FIXME("(%p)->(%s, 0x%lx, %p) stub\n", This, debugstr_a(pszName), dwFlags, pValue); return E_NOTIMPL; } @@ -1255,7 +1238,7 @@ static HRESULT WINAPI MimeBody_CopyProps( IMimePropertySet* pPropertySet) { MimeBody *This = impl_from_IMimeBody(iface); - FIXME("(%p)->(%d, %p, %p) stub\n", This, cNames, prgszName, pPropertySet); + FIXME("(%p)->(%ld, %p, %p) stub\n", This, cNames, prgszName, pPropertySet); return E_NOTIMPL; } @@ -1266,7 +1249,7 @@ static HRESULT WINAPI MimeBody_MoveProps( IMimePropertySet* pPropertySet) { MimeBody *This = impl_from_IMimeBody(iface); - FIXME("(%p)->(%d, %p, %p) stub\n", This, cNames, prgszName, pPropertySet); + FIXME("(%p)->(%ld, %p, %p) stub\n", This, cNames, prgszName, pPropertySet); return E_NOTIMPL; } @@ -1276,7 +1259,7 @@ static HRESULT WINAPI MimeBody_DeleteExcept( LPCSTR* prgszName) { MimeBody *This = impl_from_IMimeBody(iface); - FIXME("(%p)->(%d, %p) stub\n", This, cNames, prgszName); + FIXME("(%p)->(%ld, %p) stub\n", This, cNames, prgszName); return E_NOTIMPL; } @@ -1408,26 +1391,26 @@ static HRESULT WINAPI MimeBody_SetOption( { MimeBody *This = impl_from_IMimeBody(iface); HRESULT hr = E_NOTIMPL; - TRACE("(%p)->(%08x, %p)\n", This, oid, pValue); + TRACE("(%p)->(%08lx, %p)\n", This, oid, pValue); if(pValue->vt != TYPEDID_TYPE(oid)) { - WARN("Called with vartype %04x and oid %08x\n", pValue->vt, oid); + WARN("Called with vartype %04x and oid %08lx\n", pValue->vt, oid); return E_INVALIDARG; } switch(oid) { case OID_SECURITY_HWND_OWNER: - FIXME("OID_SECURITY_HWND_OWNER (value %08x): ignoring\n", pValue->u.ulVal); + FIXME("OID_SECURITY_HWND_OWNER (value %08lx): ignoring\n", pValue->ulVal); hr = S_OK; break; case OID_TRANSMIT_BODY_ENCODING: - FIXME("OID_TRANSMIT_BODY_ENCODING (value %08x): ignoring\n", pValue->u.ulVal); + FIXME("OID_TRANSMIT_BODY_ENCODING (value %08lx): ignoring\n", pValue->ulVal); hr = S_OK; break; default: - FIXME("Unhandled oid %08x\n", oid); + FIXME("Unhandled oid %08lx\n", oid); } return hr; @@ -1439,7 +1422,7 @@ static HRESULT WINAPI MimeBody_GetOption( LPPROPVARIANT pValue) { MimeBody *This = impl_from_IMimeBody(iface); - FIXME("(%p)->(%08x, %p): stub\n", This, oid, pValue); + FIXME("(%p)->(%08lx, %p): stub\n", This, oid, pValue); return E_NOTIMPL; } @@ -1449,7 +1432,7 @@ static HRESULT WINAPI MimeBody_EnumProps( IMimeEnumProperties** ppEnum) { MimeBody *This = impl_from_IMimeBody(iface); - FIXME("(%p)->(0x%x, %p) stub\n", This, dwFlags, ppEnum); + FIXME("(%p)->(0x%lx, %p) stub\n", This, dwFlags, ppEnum); return E_NOTIMPL; } @@ -1880,7 +1863,7 @@ static IMimeBodyVtbl body_vtbl = static HRESULT MimeBody_set_offsets(MimeBody *body, const BODYOFFSETS *offsets) { - TRACE("setting offsets to %d, %d, %d, %d\n", offsets->cbBoundaryStart, + TRACE("setting offsets to %ld, %ld, %ld, %ld\n", offsets->cbBoundaryStart, offsets->cbHeaderStart, offsets->cbBodyStart, offsets->cbBodyEnd); body->body_offsets = *offsets; @@ -1894,7 +1877,7 @@ static MimeBody *mimebody_create(void) MimeBody *This; BODYOFFSETS body_offsets; - This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + This = malloc(sizeof(*This)); if (!This) return NULL; @@ -1986,7 +1969,7 @@ static ULONG WINAPI MimeMessage_AddRef(IMimeMessage *iface) MimeMessage *This = impl_from_IMimeMessage(iface); ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); return ref; } @@ -1999,7 +1982,7 @@ static void empty_body_list(struct list *list) empty_body_list(&body->children); list_remove(&body->entry); IMimeBody_Release(&body->mime_body->IMimeBody_iface); - HeapFree(GetProcessHeap(), 0, body); + free(body); } } @@ -2008,14 +1991,14 @@ static ULONG WINAPI MimeMessage_Release(IMimeMessage *iface) MimeMessage *This = impl_from_IMimeMessage(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); if (!ref) { empty_body_list(&This->body_tree); if(This->stream) IStream_Release(This->stream); - HeapFree(GetProcessHeap(), 0, This); + free(This); } return ref; @@ -2040,7 +2023,7 @@ static HRESULT WINAPI MimeMessage_IsDirty( static body_t *new_body_entry(MimeBody *mime_body, DWORD index, body_t *parent) { - body_t *body = HeapAlloc(GetProcessHeap(), 0, sizeof(*body)); + body_t *body = malloc(sizeof(*body)); if(body) { body->mime_body = mime_body; @@ -2075,11 +2058,11 @@ static HRESULT create_body_offset_list(IStream *stm, const char *boundary, struc overlap_no = boundary_len + 5; - overlap = buf = HeapAlloc(GetProcessHeap(), 0, overlap_no + PARSER_BUF_SIZE + 1); + overlap = buf = malloc(overlap_no + PARSER_BUF_SIZE + 1); zero.QuadPart = 0; hr = IStream_Seek(stm, zero, STREAM_SEEK_CUR, &cur); - start = cur.u.LowPart; + start = cur.LowPart; do { hr = IStream_Read(stm, overlap, PARSER_BUF_SIZE, &read); @@ -2111,7 +2094,7 @@ static HRESULT create_body_offset_list(IStream *stm, const char *boundary, struc cur_body->offsets.cbBodyEnd = boundary_start - 2; list_add_tail(body_offsets, &cur_body->entry); } - cur_body = HeapAlloc(GetProcessHeap(), 0, sizeof(*cur_body)); + cur_body = malloc(sizeof(*cur_body)); cur_body->offsets.cbBoundaryStart = boundary_start; cur_body->offsets.cbHeaderStart = start + ptr - buf; } @@ -2141,7 +2124,7 @@ static HRESULT create_body_offset_list(IStream *stm, const char *boundary, struc } while(1); end: - HeapFree(GetProcessHeap(), 0, buf); + free(buf); return hr; } @@ -2196,7 +2179,7 @@ static body_t *create_sub_body(MimeMessage *msg, IStream *pStm, BODYOFFSETS *off sub_body = create_sub_body(msg, pStm, &cur->offsets, body); list_add_tail(&body->children, &sub_body->entry); list_remove(&cur->entry); - HeapFree(GetProcessHeap(), 0, cur); + free(cur); } break; } @@ -2234,7 +2217,7 @@ static HRESULT WINAPI MimeMessage_Load(IMimeMessage *iface, IStream *pStm) zero.QuadPart = 0; IStream_Seek(pStm, zero, STREAM_SEEK_END, &cur); - offsets.cbBodyEnd = cur.u.LowPart; + offsets.cbBodyEnd = cur.LowPart; MimeBody_set_offsets(root_body->mime_body, &offsets); list_add_head(&This->body_tree, &root_body->entry); @@ -2269,7 +2252,7 @@ static HRESULT WINAPI MimeMessage_GetMessageSource(IMimeMessage *iface, IStream { MimeMessage *This = impl_from_IMimeMessage(iface); - FIXME("(%p)->(%p, 0x%x)\n", iface, ppStream, dwFlags); + FIXME("(%p)->(%p, 0x%lx)\n", iface, ppStream, dwFlags); IStream_AddRef(This->stream); *ppStream = This->stream; @@ -2281,7 +2264,7 @@ static HRESULT WINAPI MimeMessage_GetMessageSize( ULONG *pcbSize, DWORD dwFlags) { - FIXME("(%p)->(%p, 0x%x)\n", iface, pcbSize, dwFlags); + FIXME("(%p)->(%p, 0x%lx)\n", iface, pcbSize, dwFlags); return E_NOTIMPL; } @@ -2298,7 +2281,7 @@ static HRESULT WINAPI MimeMessage_SaveOffsetTable( IStream *pStream, DWORD dwFlags) { - FIXME("(%p)->(%p, 0x%x)\n", iface, pStream, dwFlags); + FIXME("(%p)->(%p, 0x%lx)\n", iface, pStream, dwFlags); return E_NOTIMPL; } @@ -2315,7 +2298,7 @@ static HRESULT WINAPI MimeMessage_Commit( IMimeMessage *iface, DWORD dwFlags) { - FIXME("(%p)->(0x%x)\n", iface, dwFlags); + FIXME("(%p)->(0x%lx)\n", iface, dwFlags); return S_OK; } @@ -2380,7 +2363,7 @@ static HRESULT WINAPI MimeMessage_SaveBody( DWORD dwFlags, IStream *pStream) { - FIXME("(%p)->(%p, 0x%x, %p)\n", iface, hBody, dwFlags, pStream); + FIXME("(%p)->(%p, 0x%lx, %p)\n", iface, hBody, dwFlags, pStream); return E_NOTIMPL; } @@ -2488,7 +2471,7 @@ static HRESULT WINAPI MimeMessage_DeleteBody( HBODY hBody, DWORD dwFlags) { - FIXME("(%p)->(%p, %08x)\n", iface, hBody, dwFlags); + FIXME("(%p)->(%p, %08lx)\n", iface, hBody, dwFlags); return E_NOTIMPL; } @@ -2592,7 +2575,7 @@ static HRESULT WINAPI MimeMessage_ResolveURL( DWORD dwFlags, LPHBODY phBody) { - FIXME("(%p)->(%p, %s, %s, 0x%x, %p)\n", iface, hRelated, pszBase, pszURL, dwFlags, phBody); + FIXME("(%p)->(%p, %s, %s, 0x%lx, %p)\n", iface, hRelated, pszBase, pszURL, dwFlags, phBody); return E_NOTIMPL; } @@ -2691,7 +2674,7 @@ static HRESULT WINAPI MimeMessage_GetBodyProp( HRESULT hr; IMimeBody *mime_body; - TRACE("(%p)->(%p, %s, 0x%x, %p)\n", iface, hBody, pszName, dwFlags, pValue); + TRACE("(%p)->(%p, %s, 0x%lx, %p)\n", iface, hBody, pszName, dwFlags, pValue); hr = IMimeMessage_BindToObject(iface, hBody, &IID_IMimeBody, (void**)&mime_body); if(hr != S_OK) return hr; @@ -2709,7 +2692,7 @@ static HRESULT WINAPI MimeMessage_SetBodyProp( DWORD dwFlags, LPCPROPVARIANT pValue) { - FIXME("(%p)->(%p, %s, 0x%x, %p)\n", iface, hBody, pszName, dwFlags, pValue); + FIXME("(%p)->(%p, %s, 0x%lx, %p)\n", iface, hBody, pszName, dwFlags, pValue); return E_NOTIMPL; } @@ -2728,39 +2711,39 @@ static HRESULT WINAPI MimeMessage_SetOption( LPCPROPVARIANT pValue) { HRESULT hr = S_OK; - TRACE("(%p)->(%08x, %p)\n", iface, oid, pValue); + TRACE("(%p)->(%08lx, %p)\n", iface, oid, pValue); /* Message ID is checked before type. * OID 0x4D -> 0x56 and 0x58 aren't defined but will filtered out later. */ if(TYPEDID_ID(oid) < TYPEDID_ID(OID_ALLOW_8BIT_HEADER) || TYPEDID_ID(oid) > TYPEDID_ID(OID_SECURITY_2KEY_CERT_BAG_64)) { - WARN("oid (%08x) out of range\n", oid); + WARN("oid (%08lx) out of range\n", oid); return MIME_E_INVALID_OPTION_ID; } if(pValue->vt != TYPEDID_TYPE(oid)) { - WARN("Called with vartype %04x and oid %08x\n", pValue->vt, oid); + WARN("Called with vartype %04x and oid %08lx\n", pValue->vt, oid); return S_OK; } switch(oid) { case OID_HIDE_TNEF_ATTACHMENTS: - FIXME("OID_HIDE_TNEF_ATTACHMENTS (value %d): ignoring\n", pValue->u.boolVal); + FIXME("OID_HIDE_TNEF_ATTACHMENTS (value %d): ignoring\n", pValue->boolVal); break; case OID_SHOW_MACBINARY: - FIXME("OID_SHOW_MACBINARY (value %d): ignoring\n", pValue->u.boolVal); + FIXME("OID_SHOW_MACBINARY (value %d): ignoring\n", pValue->boolVal); break; case OID_SAVEBODY_KEEPBOUNDARY: - FIXME("OID_SAVEBODY_KEEPBOUNDARY (value %d): ignoring\n", pValue->u.boolVal); + FIXME("OID_SAVEBODY_KEEPBOUNDARY (value %d): ignoring\n", pValue->boolVal); break; case OID_CLEANUP_TREE_ON_SAVE: - FIXME("OID_CLEANUP_TREE_ON_SAVE (value %d): ignoring\n", pValue->u.boolVal); + FIXME("OID_CLEANUP_TREE_ON_SAVE (value %d): ignoring\n", pValue->boolVal); break; default: - FIXME("Unhandled oid %08x\n", oid); + FIXME("Unhandled oid %08lx\n", oid); hr = MIME_E_INVALID_OPTION_ID; } @@ -2772,7 +2755,7 @@ static HRESULT WINAPI MimeMessage_GetOption( const TYPEDID oid, LPPROPVARIANT pValue) { - FIXME("(%p)->(%08x, %p)\n", iface, oid, pValue); + FIXME("(%p)->(%08lx, %p)\n", iface, oid, pValue); return E_NOTIMPL; } @@ -2795,7 +2778,7 @@ static HRESULT WINAPI MimeMessage_GetProp( DWORD dwFlags, LPPROPVARIANT pValue) { - FIXME("(%p)->(%s, 0x%x, %p)\n", iface, pszName, dwFlags, pValue); + FIXME("(%p)->(%s, 0x%lx, %p)\n", iface, pszName, dwFlags, pValue); return E_NOTIMPL; } @@ -2805,7 +2788,7 @@ static HRESULT WINAPI MimeMessage_SetProp( DWORD dwFlags, LPCPROPVARIANT pValue) { - FIXME("(%p)->(%s, 0x%x, %p)\n", iface, pszName, dwFlags, pValue); + FIXME("(%p)->(%s, 0x%lx, %p)\n", iface, pszName, dwFlags, pValue); return E_NOTIMPL; } @@ -2843,7 +2826,7 @@ static HRESULT WINAPI MimeMessage_GetTextBody( static char plain[] = "plain"; static char html[] = "html"; - TRACE("(%p)->(%d, %d, %p, %p)\n", iface, dwTxtType, ietEncoding, pStream, phBody); + TRACE("(%p)->(%ld, %d, %p, %p)\n", iface, dwTxtType, ietEncoding, pStream, phBody); find_struct.pszPriType = text; @@ -2862,7 +2845,7 @@ static HRESULT WINAPI MimeMessage_GetTextBody( hr = IMimeMessage_FindFirst(iface, &find_struct, &hbody); if(hr != S_OK) { - TRACE("not found hr %08x\n", hr); + TRACE("not found hr %08lx\n", hr); *phBody = NULL; return hr; } @@ -2883,7 +2866,7 @@ static HRESULT WINAPI MimeMessage_SetTextBody( IStream *pStream, LPHBODY phBody) { - FIXME("(%p)->(%d, %d, %p, %p, %p)\n", iface, dwTxtType, ietEncoding, hAlternative, pStream, phBody); + FIXME("(%p)->(%ld, %d, %p, %p, %p)\n", iface, dwTxtType, ietEncoding, hAlternative, pStream, phBody); return E_NOTIMPL; } @@ -2916,7 +2899,7 @@ static HRESULT WINAPI MimeMessage_AttachURL( LPSTR *ppszCIDURL, LPHBODY phBody) { - FIXME("(%p)->(%s, %s, 0x%x, %p, %p, %p)\n", iface, pszBase, pszURL, dwFlags, pstmURL, ppszCIDURL, phBody); + FIXME("(%p)->(%s, %s, 0x%lx, %p, %p, %p)\n", iface, pszBase, pszURL, dwFlags, pstmURL, ppszCIDURL, phBody); return E_NOTIMPL; } @@ -2941,7 +2924,7 @@ static HRESULT WINAPI MimeMessage_GetAttachments( while(hr == S_OK) { hr = IMimeMessage_IsContentType(iface, hbody, "multipart", NULL); - TRACE("IsCT rets %08x %d\n", hr, *pcAttach); + TRACE("IsCT rets %08lx %ld\n", hr, *pcAttach); if(hr != S_OK) { if(*pcAttach + 1 > size) @@ -2981,7 +2964,7 @@ static HRESULT WINAPI MimeMessage_GetAddressTypes( DWORD dwProps, LPADDRESSLIST pList) { - FIXME("(%p)->(%d, %d, %p)\n", iface, dwAdrTypes, dwProps, pList); + FIXME("(%p)->(%ld, %ld, %p)\n", iface, dwAdrTypes, dwProps, pList); return E_NOTIMPL; } @@ -2991,7 +2974,7 @@ static HRESULT WINAPI MimeMessage_GetAddressFormat( ADDRESSFORMAT format, LPSTR *ppszFormat) { - FIXME("(%p)->(%d, %d, %p)\n", iface, dwAdrTypes, format, ppszFormat); + FIXME("(%p)->(%ld, %d, %p)\n", iface, dwAdrTypes, format, ppszFormat); return E_NOTIMPL; } @@ -3001,7 +2984,7 @@ static HRESULT WINAPI MimeMessage_EnumAddressTypes( DWORD dwProps, IMimeEnumAddressTypes **ppEnum) { - FIXME("(%p)->(%d, %d, %p)\n", iface, dwAdrTypes, dwProps, ppEnum); + FIXME("(%p)->(%ld, %ld, %p)\n", iface, dwAdrTypes, dwProps, ppEnum); return E_NOTIMPL; } @@ -3010,7 +2993,7 @@ static HRESULT WINAPI MimeMessage_SplitMessage( ULONG cbMaxPart, IMimeMessageParts **ppParts) { - FIXME("(%p)->(%d, %p)\n", iface, cbMaxPart, ppParts); + FIXME("(%p)->(%ld, %p)\n", iface, cbMaxPart, ppParts); return E_NOTIMPL; } @@ -3098,7 +3081,7 @@ HRESULT MimeMessage_create(IUnknown *outer, void **obj) *obj = NULL; - This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + This = malloc(sizeof(*This)); if (!This) return E_OUTOFMEMORY; This->IMimeMessage_iface.lpVtbl = &MimeMessageVtbl; @@ -3129,7 +3112,7 @@ HRESULT WINAPI MimeOleCreateMessage(IUnknown *pUnkOuter, IMimeMessage **ppMessag */ HRESULT WINAPI MimeOleSetCompatMode(DWORD dwMode) { - FIXME("(0x%x)\n", dwMode); + FIXME("(0x%lx)\n", dwMode); return S_OK; } @@ -3178,7 +3161,7 @@ static ULONG WINAPI MimeSecurity_AddRef(IMimeSecurity *iface) MimeSecurity *This = impl_from_IMimeSecurity(iface); LONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); return ref; } @@ -3188,10 +3171,10 @@ static ULONG WINAPI MimeSecurity_Release(IMimeSecurity *iface) MimeSecurity *This = impl_from_IMimeSecurity(iface); LONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); if (!ref) - HeapFree(GetProcessHeap(), 0, This); + free(This); return ref; } @@ -3215,7 +3198,7 @@ static HRESULT WINAPI MimeSecurity_EncodeMessage( IMimeMessageTree* pTree, DWORD dwFlags) { - FIXME("(%p)->(%p, %08x): stub\n", iface, pTree, dwFlags); + FIXME("(%p)->(%p, %08lx): stub\n", iface, pTree, dwFlags); return E_NOTIMPL; } @@ -3225,7 +3208,7 @@ static HRESULT WINAPI MimeSecurity_EncodeBody( HBODY hEncodeRoot, DWORD dwFlags) { - FIXME("(%p)->(%p, %p, %08x): stub\n", iface, pTree, hEncodeRoot, dwFlags); + FIXME("(%p)->(%p, %p, %08lx): stub\n", iface, pTree, hEncodeRoot, dwFlags); return E_NOTIMPL; } @@ -3234,7 +3217,7 @@ static HRESULT WINAPI MimeSecurity_DecodeMessage( IMimeMessageTree* pTree, DWORD dwFlags) { - FIXME("(%p)->(%p, %08x): stub\n", iface, pTree, dwFlags); + FIXME("(%p)->(%p, %08lx): stub\n", iface, pTree, dwFlags); return E_NOTIMPL; } @@ -3244,7 +3227,7 @@ static HRESULT WINAPI MimeSecurity_DecodeBody( HBODY hDecodeRoot, DWORD dwFlags) { - FIXME("(%p)->(%p, %p, %08x): stub\n", iface, pTree, hDecodeRoot, dwFlags); + FIXME("(%p)->(%p, %p, %08lx): stub\n", iface, pTree, hDecodeRoot, dwFlags); return E_NOTIMPL; } @@ -3255,7 +3238,7 @@ static HRESULT WINAPI MimeSecurity_EnumCertificates( PCX509CERT pPrev, PCX509CERT* ppCert) { - FIXME("(%p)->(%p, %08x, %p, %p): stub\n", iface, hc, dwUsage, pPrev, ppCert); + FIXME("(%p)->(%p, %08lx, %p, %p): stub\n", iface, hc, dwUsage, pPrev, ppCert); return E_NOTIMPL; } @@ -3315,7 +3298,7 @@ HRESULT MimeSecurity_create(IUnknown *outer, void **obj) if (outer) return CLASS_E_NOAGGREGATION; - This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + This = malloc(sizeof(*This)); if (!This) return E_OUTOFMEMORY; This->IMimeSecurity_iface.lpVtbl = &MimeSecurityVtbl; @@ -3418,7 +3401,7 @@ static HRESULT WINAPI MimeAlloc_FreeParamInfoArray( boolean fFreeArray) { ULONG i; - TRACE("(%p)->(%d, %p, %d)\n", iface, cParams, prgParam, fFreeArray); + TRACE("(%p)->(%ld, %p, %d)\n", iface, cParams, prgParam, fFreeArray); for(i = 0; i < cParams; i++) { @@ -3570,7 +3553,7 @@ static ULONG WINAPI propschema_AddRef(IMimePropertySchema *iface) propschema *This = impl_from_IMimePropertySchema(iface); LONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); return ref; } @@ -3580,11 +3563,11 @@ static ULONG WINAPI propschema_Release(IMimePropertySchema *iface) propschema *This = impl_from_IMimePropertySchema(iface); LONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); if (!ref) { - HeapFree(GetProcessHeap(), 0, This); + free(This); } return ref; @@ -3594,7 +3577,7 @@ static HRESULT WINAPI propschema_RegisterProperty(IMimePropertySchema *iface, co DWORD rownumber, VARTYPE vtdefault, DWORD *propid) { propschema *This = impl_from_IMimePropertySchema(iface); - FIXME("(%p)->(%s, %x, %d, %d, %p) stub\n", This, debugstr_a(name), flags, rownumber, vtdefault, propid); + FIXME("(%p)->(%s, %lx, %ld, %d, %p) stub\n", This, debugstr_a(name), flags, rownumber, vtdefault, propid); return E_NOTIMPL; } @@ -3602,7 +3585,7 @@ static HRESULT WINAPI propschema_ModifyProperty(IMimePropertySchema *iface, cons DWORD rownumber, VARTYPE vtdefault) { propschema *This = impl_from_IMimePropertySchema(iface); - FIXME("(%p)->(%s, %x, %d, %d) stub\n", This, debugstr_a(name), flags, rownumber, vtdefault); + FIXME("(%p)->(%s, %lx, %ld, %d) stub\n", This, debugstr_a(name), flags, rownumber, vtdefault); return S_OK; } @@ -3616,7 +3599,7 @@ static HRESULT WINAPI propschema_GetPropertyId(IMimePropertySchema *iface, const static HRESULT WINAPI propschema_GetPropertyName(IMimePropertySchema *iface, DWORD propid, char **name) { propschema *This = impl_from_IMimePropertySchema(iface); - FIXME("(%p)->(%d, %p) stub\n", This, propid, name); + FIXME("(%p)->(%ld, %p) stub\n", This, propid, name); return E_NOTIMPL; } @@ -3646,7 +3629,7 @@ HRESULT WINAPI MimeOleGetPropertySchema(IMimePropertySchema **schema) TRACE("(%p) stub\n", schema); - This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + This = malloc(sizeof(*This)); if (!This) return E_OUTOFMEMORY; @@ -3661,7 +3644,7 @@ HRESULT WINAPI MimeOleGetPropertySchema(IMimePropertySchema **schema) HRESULT WINAPI MimeGetAddressFormatW(REFIID riid, void *object, DWORD addr_type, ADDRESSFORMAT addr_format, WCHAR **address) { - FIXME("(%s, %p, %d, %d, %p) stub\n", debugstr_guid(riid), object, addr_type, addr_format, address); + FIXME("(%s, %p, %ld, %d, %p) stub\n", debugstr_guid(riid), object, addr_type, addr_format, address); return E_NOTIMPL; } @@ -3700,8 +3683,6 @@ HRESULT WINAPI MimeOleObjectFromMoniker(BINDF bindf, IMoniker *moniker, IBindCtx size_t len; HRESULT hres; - static const WCHAR mhtml_prefixW[] = {'m','h','t','m','l',':'}; - WARN("(0x%08x, %p, %p, %s, %p, %p) semi-stub\n", bindf, moniker, binding, debugstr_guid(riid), out, moniker_new); if(!IsEqualGUID(&IID_IUnknown, riid)) { @@ -3716,16 +3697,16 @@ HRESULT WINAPI MimeOleObjectFromMoniker(BINDF bindf, IMoniker *moniker, IBindCtx TRACE("display name %s\n", debugstr_w(display_name)); len = lstrlenW(display_name); - mhtml_url = heap_alloc((len+1)*sizeof(WCHAR) + sizeof(mhtml_prefixW)); + mhtml_url = malloc(len * sizeof(WCHAR) + sizeof(L"mhtml:")); if(!mhtml_url) return E_OUTOFMEMORY; - memcpy(mhtml_url, mhtml_prefixW, sizeof(mhtml_prefixW)); - lstrcpyW(mhtml_url + ARRAY_SIZE(mhtml_prefixW), display_name); - HeapFree(GetProcessHeap(), 0, display_name); + lstrcpyW(mhtml_url, L"mhtml:"); + lstrcatW(mhtml_url, display_name); + CoTaskMemFree(display_name); hres = CreateURLMoniker(NULL, mhtml_url, moniker_new); - heap_free(mhtml_url); + free(mhtml_url); if(FAILED(hres)) return hres; diff --git a/dll/win32/inetcomm/pop3transport.c b/dll/win32/inetcomm/pop3transport.c index 1c8bc91bb00..6dbbab1fa3f 100644 --- a/dll/win32/inetcomm/pop3transport.c +++ b/dll/win32/inetcomm/pop3transport.c @@ -19,7 +19,6 @@ */ #define COBJMACROS -#define NONAMELESSUNION #include #include @@ -96,7 +95,7 @@ static HRESULT parse_uidl_response(POP3Transport *This, POP3UIDL *uidl) if ((p = strchr(This->ptr, ' '))) { while (*p == ' ') p++; - sscanf(p, "%u", &uidl->dwPopId); + sscanf(p, "%lu", &uidl->dwPopId); if ((p = strchr(p, ' '))) { while (*p == ' ') p++; @@ -117,7 +116,7 @@ static HRESULT parse_uidl_response(POP3Transport *This, POP3UIDL *uidl) This->state = STATE_DONE; return S_OK; } - sscanf(This->response, "%u", &uidl->dwPopId); + sscanf(This->response, "%lu", &uidl->dwPopId); if ((p = strchr(This->response, ' '))) { while (*p == ' ') p++; @@ -145,7 +144,7 @@ static HRESULT parse_stat_response(POP3Transport *This, POP3STAT *stat) if ((p = strchr(This->ptr, ' '))) { while (*p == ' ') p++; - sscanf(p, "%u %u", &stat->cMessages, &stat->cbMessages); + sscanf(p, "%lu %lu", &stat->cMessages, &stat->cbMessages); This->valid_info = TRUE; This->state = STATE_DONE; return S_OK; @@ -172,7 +171,7 @@ static HRESULT parse_list_response(POP3Transport *This, POP3LIST *list) if ((p = strchr(This->ptr, ' '))) { while (*p == ' ') p++; - sscanf(p, "%u %u", &list->dwPopId, &list->cbSize); + sscanf(p, "%lu %lu", &list->dwPopId, &list->cbSize); This->valid_info = TRUE; } This->state = STATE_DONE; @@ -188,11 +187,11 @@ static HRESULT parse_list_response(POP3Transport *This, POP3LIST *list) This->state = STATE_DONE; return S_OK; } - sscanf(This->response, "%u", &list->dwPopId); + sscanf(This->response, "%lu", &list->dwPopId); if ((p = strchr(This->response, ' '))) { while (*p == ' ') p++; - sscanf(p, "%u", &list->cbSize); + sscanf(p, "%lu", &list->cbSize); This->valid_info = TRUE; return S_OK; } @@ -331,12 +330,12 @@ static HRESULT POP3Transport_ParseResponse(POP3Transport *This, char *pszRespons { switch (This->command) { - case POP3_UIDL: hr = parse_uidl_response(This, &pResponse->u.rUidlInfo); break; - case POP3_STAT: hr = parse_stat_response(This, &pResponse->u.rStatInfo); break; - case POP3_LIST: hr = parse_list_response(This, &pResponse->u.rListInfo); break; - case POP3_DELE: hr = parse_dele_response(This, &pResponse->u.dwPopId); break; - case POP3_RETR: hr = parse_retr_response(This, &pResponse->u.rRetrInfo); break; - case POP3_TOP: hr = parse_top_response(This, &pResponse->u.rTopInfo); break; + case POP3_UIDL: hr = parse_uidl_response(This, &pResponse->rUidlInfo); break; + case POP3_STAT: hr = parse_stat_response(This, &pResponse->rStatInfo); break; + case POP3_LIST: hr = parse_list_response(This, &pResponse->rListInfo); break; + case POP3_DELE: hr = parse_dele_response(This, &pResponse->dwPopId); break; + case POP3_RETR: hr = parse_retr_response(This, &pResponse->rRetrInfo); break; + case POP3_TOP: hr = parse_top_response(This, &pResponse->rTopInfo); break; default: This->state = STATE_DONE; break; @@ -858,7 +857,7 @@ static HRESULT WINAPI POP3Transport_InitNew(IPOP3Transport *iface, static HRESULT WINAPI POP3Transport_MarkItem(IPOP3Transport *iface, POP3MARKTYPE marktype, DWORD dwPopId, boolean fMarked) { - FIXME("(%u, %u, %d)\n", marktype, dwPopId, fMarked); + FIXME("(%u, %lu, %d)\n", marktype, dwPopId, fMarked); return E_NOTIMPL; } @@ -917,13 +916,13 @@ static HRESULT WINAPI POP3Transport_CommandPASS(IPOP3Transport *iface, LPSTR pas static HRESULT WINAPI POP3Transport_CommandLIST( IPOP3Transport *iface, POP3CMDTYPE cmdtype, DWORD dwPopId) { - static const char list[] = "LIST %u\r\n"; + static const char list[] = "LIST %lu\r\n"; static char list_all[] = "LIST\r\n"; POP3Transport *This = (POP3Transport *)iface; char *command; int len; - TRACE("(%u, %u)\n", cmdtype, dwPopId); + TRACE("(%u, %lu)\n", cmdtype, dwPopId); if (dwPopId) { @@ -944,12 +943,12 @@ static HRESULT WINAPI POP3Transport_CommandLIST( static HRESULT WINAPI POP3Transport_CommandTOP( IPOP3Transport *iface, POP3CMDTYPE cmdtype, DWORD dwPopId, DWORD cPreviewLines) { - static const char top[] = "TOP %u %u\r\n"; + static const char top[] = "TOP %lu %lu\r\n"; POP3Transport *This = (POP3Transport *)iface; char *command; int len; - TRACE("(%u, %u, %u)\n", cmdtype, dwPopId, cPreviewLines); + TRACE("(%u, %lu, %lu)\n", cmdtype, dwPopId, cPreviewLines); len = sizeof(top) + 20 + 2; /* 2 * "4294967296" + "\r\n" */ if (!(command = HeapAlloc(GetProcessHeap(), 0, len))) return S_FALSE; @@ -1016,13 +1015,13 @@ static HRESULT WINAPI POP3Transport_CommandRSET(IPOP3Transport *iface) static HRESULT WINAPI POP3Transport_CommandUIDL( IPOP3Transport *iface, POP3CMDTYPE cmdtype, DWORD dwPopId) { - static const char uidl[] = "UIDL %u\r\n"; + static const char uidl[] = "UIDL %lu\r\n"; static char uidl_all[] = "UIDL\r\n"; POP3Transport *This = (POP3Transport *)iface; char *command; int len; - TRACE("(%u, %u)\n", cmdtype, dwPopId); + TRACE("(%u, %lu)\n", cmdtype, dwPopId); if (dwPopId) { @@ -1043,12 +1042,12 @@ static HRESULT WINAPI POP3Transport_CommandUIDL( static HRESULT WINAPI POP3Transport_CommandDELE( IPOP3Transport *iface, POP3CMDTYPE cmdtype, DWORD dwPopId) { - static const char dele[] = "DELE %u\r\n"; + static const char dele[] = "DELE %lu\r\n"; POP3Transport *This = (POP3Transport *)iface; char *command; int len; - TRACE("(%u, %u)\n", cmdtype, dwPopId); + TRACE("(%u, %lu)\n", cmdtype, dwPopId); len = sizeof(dele) + 10 + 2; /* "4294967296" + "\r\n" */ if (!(command = HeapAlloc(GetProcessHeap(), 0, len))) return S_FALSE; @@ -1065,12 +1064,12 @@ static HRESULT WINAPI POP3Transport_CommandDELE( static HRESULT WINAPI POP3Transport_CommandRETR( IPOP3Transport *iface, POP3CMDTYPE cmdtype, DWORD dwPopId) { - static const char retr[] = "RETR %u\r\n"; + static const char retr[] = "RETR %lu\r\n"; POP3Transport *This = (POP3Transport *)iface; char *command; int len; - TRACE("(%u, %u)\n", cmdtype, dwPopId); + TRACE("(%u, %lu)\n", cmdtype, dwPopId); len = sizeof(retr) + 10 + 2; /* "4294967296" + "\r\n" */ if (!(command = HeapAlloc(GetProcessHeap(), 0, len))) return S_FALSE; diff --git a/dll/win32/inetcomm/precomp.h b/dll/win32/inetcomm/precomp.h index 657c4e1f6be..0696283ec92 100644 --- a/dll/win32/inetcomm/precomp.h +++ b/dll/win32/inetcomm/precomp.h @@ -9,10 +9,10 @@ #define COM_NO_WINDOWS_H #define COBJMACROS -#define NONAMELESSUNION #include #include +#include #include #include diff --git a/dll/win32/inetcomm/protocol.c b/dll/win32/inetcomm/protocol.c index 25b364ec16d..155adace482 100644 --- a/dll/win32/inetcomm/protocol.c +++ b/dll/win32/inetcomm/protocol.c @@ -17,7 +17,6 @@ */ #define COBJMACROS -#define NONAMELESSUNION #include @@ -25,7 +24,6 @@ #include "inetcomm_private.h" #include "wine/debug.h" -#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(inetcomm); @@ -59,39 +57,23 @@ typedef struct { WCHAR url[1]; } MimeHtmlBinding; -static const WCHAR mhtml_prefixW[] = {'m','h','t','m','l',':'}; -static const WCHAR mhtml_separatorW[] = {'!','x','-','u','s','c',':'}; - -static inline LPWSTR heap_strdupW(LPCWSTR str) -{ - LPWSTR ret = NULL; - - if(str) { - DWORD size; - - size = (lstrlenW(str)+1)*sizeof(WCHAR); - ret = heap_alloc(size); - if(ret) - memcpy(ret, str, size); - } - - return ret; -} +static const WCHAR mhtml_prefixW[] = L"mhtml:"; +static const WCHAR mhtml_separatorW[] = L"!x-usc:"; static HRESULT parse_mhtml_url(const WCHAR *url, mhtml_url_t *r) { const WCHAR *p; - if(_wcsnicmp(url, mhtml_prefixW, ARRAY_SIZE(mhtml_prefixW))) + if(wcsnicmp(url, mhtml_prefixW, lstrlenW(mhtml_prefixW))) return E_FAIL; - r->mhtml = url + ARRAY_SIZE(mhtml_prefixW); + r->mhtml = url + lstrlenW(mhtml_prefixW); p = wcschr(r->mhtml, '!'); if(p) { r->mhtml_len = p - r->mhtml; /* FIXME: We handle '!' and '!x-usc:' in URLs as the same thing. Those should not be the same. */ - if(!wcsncmp(p, mhtml_separatorW, ARRAY_SIZE(mhtml_separatorW))) - p += ARRAY_SIZE(mhtml_separatorW); + if(!wcsncmp(p, mhtml_separatorW, lstrlenW(mhtml_separatorW))) + p += lstrlenW(mhtml_separatorW); else p++; }else { @@ -141,7 +123,7 @@ static HRESULT on_mime_message_available(MimeHtmlProtocol *protocol, IMimeMessag if(FAILED(hres)) return report_result(protocol, hres); - found = !lstrcmpW(protocol->location, value.u.pwszVal); + found = !lstrcmpW(protocol->location, value.pwszVal); PropVariantClear(&value); }while(!found); }else { @@ -159,7 +141,7 @@ static HRESULT on_mime_message_available(MimeHtmlProtocol *protocol, IMimeMessag value.vt = VT_LPWSTR; hres = IMimeBody_GetProp(mime_body, "content-type", 0, &value); if(SUCCEEDED(hres)) { - hres = IInternetProtocolSink_ReportProgress(protocol->sink, BINDSTATUS_MIMETYPEAVAILABLE, value.u.pwszVal); + hres = IInternetProtocolSink_ReportProgress(protocol->sink, BINDSTATUS_MIMETYPEAVAILABLE, value.pwszVal); PropVariantClear(&value); } @@ -230,7 +212,7 @@ static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallback *iface) MimeHtmlBinding *This = impl_from_IBindStatusCallback(iface); LONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); return ref; } @@ -240,14 +222,14 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface) MimeHtmlBinding *This = impl_from_IBindStatusCallback(iface); LONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); if(!ref) { if(This->protocol) IInternetProtocol_Release(&This->protocol->IInternetProtocol_iface); if(This->stream) IStream_Release(This->stream); - heap_free(This); + free(This); } return ref; @@ -258,7 +240,7 @@ static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *ifa { MimeHtmlBinding *This = impl_from_IBindStatusCallback(iface); - TRACE("(%p)->(%x %p)\n", This, dwReserved, pib); + TRACE("(%p)->(%lx %p)\n", This, dwReserved, pib); assert(!This->stream); return CreateStreamOnHGlobal(NULL, TRUE, &This->stream); @@ -278,7 +260,7 @@ static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText) { MimeHtmlBinding *This = impl_from_IBindStatusCallback(iface); - TRACE("(%p)->(%u/%u %u %s)\n", This, ulProgress, ulProgressMax, ulStatusCode, debugstr_w(szStatusText)); + TRACE("(%p)->(%lu/%lu %lu %s)\n", This, ulProgress, ulProgressMax, ulStatusCode, debugstr_w(szStatusText)); return S_OK; } @@ -287,7 +269,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac MimeHtmlBinding *This = impl_from_IBindStatusCallback(iface); IMimeMessage *mime_message = NULL; - TRACE("(%p)->(%x %s)\n", This, hresult, debugstr_w(szError)); + TRACE("(%p)->(%lx %s)\n", This, hresult, debugstr_w(szError)); if(SUCCEEDED(hresult)) { hresult = load_mime_message(This->stream, &mime_message); @@ -333,7 +315,7 @@ static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallback *if assert(pstgmed->tymed == TYMED_ISTREAM); while(1) { - hres = IStream_Read(pstgmed->u.pstm, buf, sizeof(buf), &read); + hres = IStream_Read(pstgmed->pstm, buf, sizeof(buf), &read); if(FAILED(hres)) return hres; if(!read) @@ -402,7 +384,7 @@ static ULONG WINAPI MimeHtmlProtocol_AddRef(IUnknown *iface) MimeHtmlProtocol *This = impl_from_IUnknown(iface); ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p) ref=%d\n", This, ref); + TRACE("(%p) ref=%ld\n", This, ref); return ref; } @@ -412,15 +394,15 @@ static ULONG WINAPI MimeHtmlProtocol_Release(IUnknown *iface) MimeHtmlProtocol *This = impl_from_IUnknown(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p) ref=%x\n", This, ref); + TRACE("(%p) ref=%lx\n", This, ref); if(!ref) { if(This->sink) IInternetProtocolSink_Release(This->sink); if(This->stream) IStream_Release(This->stream); - heap_free(This->location); - heap_free(This); + free(This->location); + free(This); } return ref; @@ -469,26 +451,26 @@ static HRESULT WINAPI MimeHtmlProtocol_Start(IInternetProtocol *iface, const WCH IMoniker *mon; HRESULT hres; - TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink, pOIBindInfo, grfPI, dwReserved); + TRACE("(%p)->(%s %p %p %08lx %Ix)\n", This, debugstr_w(szUrl), pOIProtSink, pOIBindInfo, grfPI, dwReserved); hres = parse_mhtml_url(szUrl, &url); if(FAILED(hres)) return hres; - if(url.location && !(This->location = heap_strdupW(url.location))) + if(url.location && !(This->location = wcsdup(url.location))) return E_OUTOFMEMORY; hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bindf, &bindinfo); if(FAILED(hres)) { - WARN("GetBindInfo failed: %08x\n", hres); + WARN("GetBindInfo failed: %08lx\n", hres); return hres; } if((bindf & (BINDF_ASYNCHRONOUS|BINDF_FROMURLMON|BINDF_NEEDFILE)) != (BINDF_ASYNCHRONOUS|BINDF_FROMURLMON|BINDF_NEEDFILE)) - FIXME("unsupported bindf %x\n", bindf); + FIXME("unsupported bindf %lx\n", bindf); IInternetProtocolSink_AddRef(This->sink = pOIProtSink); - binding = heap_alloc(FIELD_OFFSET(MimeHtmlBinding, url[url.mhtml_len+1])); + binding = malloc(FIELD_OFFSET(MimeHtmlBinding, url[url.mhtml_len+1])); if(!binding) return E_OUTOFMEMORY; memcpy(binding->url, url.mhtml, url.mhtml_len*sizeof(WCHAR)); @@ -496,7 +478,7 @@ static HRESULT WINAPI MimeHtmlProtocol_Start(IInternetProtocol *iface, const WCH hres = CreateURLMoniker(NULL, binding->url, &mon); if(FAILED(hres)) { - heap_free(binding); + free(binding); return hres; } @@ -538,14 +520,14 @@ static HRESULT WINAPI MimeHtmlProtocol_Continue(IInternetProtocol *iface, PROTOC static HRESULT WINAPI MimeHtmlProtocol_Abort(IInternetProtocol *iface, HRESULT hrReason, DWORD dwOptions) { MimeHtmlProtocol *This = impl_from_IInternetProtocol(iface); - FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions); + FIXME("(%p)->(%08lx %08lx)\n", This, hrReason, dwOptions); return E_NOTIMPL; } static HRESULT WINAPI MimeHtmlProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions) { MimeHtmlProtocol *This = impl_from_IInternetProtocol(iface); - TRACE("(%p)->(%08x)\n", This, dwOptions); + TRACE("(%p)->(%08lx)\n", This, dwOptions); return S_OK; } @@ -569,7 +551,7 @@ static HRESULT WINAPI MimeHtmlProtocol_Read(IInternetProtocol *iface, void* pv, ULONG read = 0; HRESULT hres; - TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead); + TRACE("(%p)->(%p %lu %p)\n", This, pv, cb, pcbRead); hres = IStream_Read(This->stream, pv, cb, &read); if(pcbRead) @@ -584,14 +566,14 @@ static HRESULT WINAPI MimeHtmlProtocol_Seek(IInternetProtocol *iface, LARGE_INTE DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition) { MimeHtmlProtocol *This = impl_from_IInternetProtocol(iface); - FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition); + FIXME("(%p)->(%ld %ld %p)\n", This, dlibMove.LowPart, dwOrigin, plibNewPosition); return E_NOTIMPL; } static HRESULT WINAPI MimeHtmlProtocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions) { MimeHtmlProtocol *This = impl_from_IInternetProtocol(iface); - FIXME("(%p)->(%d)\n", This, dwOptions); + FIXME("(%p)->(%ld)\n", This, dwOptions); return S_OK; } @@ -646,7 +628,7 @@ static HRESULT WINAPI MimeHtmlProtocolInfo_ParseUrl(IInternetProtocolInfo *iface DWORD* pcchResult, DWORD dwReserved) { MimeHtmlProtocol *This = impl_from_IInternetProtocolInfo(iface); - FIXME("(%p)->(%s %d %x %p %d %p %d)\n", This, debugstr_w(pwzUrl), ParseAction, + FIXME("(%p)->(%s %d %lx %p %ld %p %ld)\n", This, debugstr_w(pwzUrl), ParseAction, dwParseFlags, pwzResult, cchResult, pcchResult, dwReserved); return INET_E_DEFAULT_ACTION; } @@ -656,12 +638,12 @@ static HRESULT WINAPI MimeHtmlProtocolInfo_CombineUrl(IInternetProtocolInfo *ifa DWORD cchResult, DWORD* pcchResult, DWORD dwReserved) { MimeHtmlProtocol *This = impl_from_IInternetProtocolInfo(iface); - size_t len = ARRAY_SIZE(mhtml_prefixW); + size_t len = lstrlenW(mhtml_prefixW); mhtml_url_t url; WCHAR *p; HRESULT hres; - TRACE("(%p)->(%s %s %08x %p %d %p %d)\n", This, debugstr_w(pwzBaseUrl), + TRACE("(%p)->(%s %s %08lx %p %ld %p %ld)\n", This, debugstr_w(pwzBaseUrl), debugstr_w(pwzRelativeUrl), dwCombineFlags, pwzResult, cchResult, pcchResult, dwReserved); @@ -669,27 +651,26 @@ static HRESULT WINAPI MimeHtmlProtocolInfo_CombineUrl(IInternetProtocolInfo *ifa if(FAILED(hres)) return hres; - if(!_wcsnicmp(pwzRelativeUrl, mhtml_prefixW, ARRAY_SIZE(mhtml_prefixW))) { + if(!wcsnicmp(pwzRelativeUrl, mhtml_prefixW, len)) { FIXME("Relative URL is mhtml protocol\n"); return INET_E_USE_DEFAULT_PROTOCOLHANDLER; } len += url.mhtml_len; if(*pwzRelativeUrl) - len += lstrlenW(pwzRelativeUrl) + ARRAY_SIZE(mhtml_separatorW); + len += lstrlenW(pwzRelativeUrl) + lstrlenW(mhtml_separatorW); if(len >= cchResult) { *pcchResult = 0; return E_FAIL; } - memcpy(pwzResult, mhtml_prefixW, sizeof(mhtml_prefixW)); - p = pwzResult + ARRAY_SIZE(mhtml_prefixW); + lstrcpyW(pwzResult, mhtml_prefixW); + p = pwzResult + lstrlenW(mhtml_prefixW); memcpy(p, url.mhtml, url.mhtml_len*sizeof(WCHAR)); p += url.mhtml_len; if(*pwzRelativeUrl) { - memcpy(p, mhtml_separatorW, sizeof(mhtml_separatorW)); - p += ARRAY_SIZE(mhtml_separatorW); - lstrcpyW(p, pwzRelativeUrl); + lstrcpyW(p, mhtml_separatorW); + lstrcatW(p, pwzRelativeUrl); }else { *p = 0; } @@ -702,7 +683,7 @@ static HRESULT WINAPI MimeHtmlProtocolInfo_CompareUrl(IInternetProtocolInfo *ifa LPCWSTR pwzUrl2, DWORD dwCompareFlags) { MimeHtmlProtocol *This = impl_from_IInternetProtocolInfo(iface); - FIXME("(%p)->(%s %s %08x)\n", This, debugstr_w(pwzUrl1), debugstr_w(pwzUrl2), dwCompareFlags); + FIXME("(%p)->(%s %s %08lx)\n", This, debugstr_w(pwzUrl1), debugstr_w(pwzUrl2), dwCompareFlags); return E_NOTIMPL; } @@ -711,7 +692,7 @@ static HRESULT WINAPI MimeHtmlProtocolInfo_QueryInfo(IInternetProtocolInfo *ifac DWORD dwReserved) { MimeHtmlProtocol *This = impl_from_IInternetProtocolInfo(iface); - FIXME("(%p)->(%s %08x %08x %p %d %p %d)\n", This, debugstr_w(pwzUrl), QueryOption, dwQueryFlags, pBuffer, + FIXME("(%p)->(%s %08x %08lx %p %ld %p %ld)\n", This, debugstr_w(pwzUrl), QueryOption, dwQueryFlags, pBuffer, cbBuffer, pcbBuf, dwReserved); return INET_E_USE_DEFAULT_PROTOCOLHANDLER; } @@ -730,7 +711,7 @@ HRESULT MimeHtmlProtocol_create(IUnknown *outer, void **obj) { MimeHtmlProtocol *protocol; - protocol = heap_alloc(sizeof(*protocol)); + protocol = malloc(sizeof(*protocol)); if(!protocol) return E_OUTOFMEMORY; diff --git a/dll/win32/inetcomm/smtptransport.c b/dll/win32/inetcomm/smtptransport.c index d71061ed6b2..88659c4541c 100644 --- a/dll/win32/inetcomm/smtptransport.c +++ b/dll/win32/inetcomm/smtptransport.c @@ -478,7 +478,7 @@ static void SMTPTransport_CallbackMessageSendTo(IInternetTransport *iface, char for (; This->ulCurrentAddressIndex < This->pending_message.rAddressList.cAddress; This->ulCurrentAddressIndex++) { - TRACE("address[%d]: %s\n", This->ulCurrentAddressIndex, + TRACE("address[%ld]: %s\n", This->ulCurrentAddressIndex, This->pending_message.rAddressList.prgAddress[This->ulCurrentAddressIndex].szEmail); if ((This->pending_message.rAddressList.prgAddress[This->ulCurrentAddressIndex].addrtype & ADDR_TOFROM_MASK) == ADDR_TO) @@ -685,13 +685,13 @@ static HRESULT WINAPI SMTPTransport_SendMessage(ISMTPTransport2 *iface, { if ((pMessage->rAddressList.prgAddress[i].addrtype & ADDR_TOFROM_MASK) == ADDR_FROM) { - TRACE("address[%d]: ADDR_FROM, %s\n", i, + TRACE("address[%ld]: ADDR_FROM, %s\n", i, pMessage->rAddressList.prgAddress[i].szEmail); pszFromAddress = pMessage->rAddressList.prgAddress[i].szEmail; } else if ((pMessage->rAddressList.prgAddress[i].addrtype & ADDR_TOFROM_MASK) == ADDR_TO) { - TRACE("address[%d]: ADDR_TO, %s\n", i, + TRACE("address[%ld]: ADDR_TO, %s\n", i, pMessage->rAddressList.prgAddress[i].szEmail); } } @@ -891,7 +891,7 @@ static HRESULT WINAPI SMTPTransport_CommandDOT(ISMTPTransport2 *iface) static HRESULT WINAPI SMTPTransport_SendDataStream(ISMTPTransport2 *iface, IStream *pStream, ULONG cbSize) { - FIXME("(%p, %d)\n", pStream, cbSize); + FIXME("(%p, %ld)\n", pStream, cbSize); return E_NOTIMPL; } diff --git a/media/doc/WINESYNC.txt b/media/doc/WINESYNC.txt index 269ab432767..8aa62a161dd 100644 --- a/media/doc/WINESYNC.txt +++ b/media/doc/WINESYNC.txt @@ -91,7 +91,7 @@ dll/win32/iccvid # Synced to WineStaging-4.0 dll/win32/ieframe # Synced to WineStaging-4.18 dll/win32/imaadp32.acm # Synced to WineStaging-4.0 dll/win32/imagehlp # Synced to WineStaging-4.18 -dll/win32/inetcomm # Synced to WineStaging-4.18 +dll/win32/inetcomm # Synced to Wine-10.0 dll/win32/inetmib1 # Synced to WineStaging-4.18 dll/win32/initpki # Synced to WineStaging-4.18 dll/win32/inseng # Synced to WineStaging-4.18