mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
Autosyncing with Wine
svn path=/trunk/; revision=22819
This commit is contained in:
parent
979f9f7d1a
commit
4b35b55e7a
7 changed files with 302 additions and 223 deletions
|
@ -15,7 +15,7 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
|
@ -1,18 +1,23 @@
|
||||||
<module name="mapi32" type="win32dll" baseaddress="${BASEADDRESS_MAPI32}" installbase="system32" installname="mapi32.dll">
|
<module name="mapi32" type="win32dll" baseaddress="${BASEADDRESS_MAPI32}" installbase="system32" installname="mapi32.dll" allowwarnings="true">
|
||||||
<importlibrary definition="mapi32.spec.def" />
|
<importlibrary definition="mapi32.spec.def" />
|
||||||
<include base="mapi32">.</include>
|
<include base="mapi32">.</include>
|
||||||
<include base="ReactOS">include/reactos/wine</include>
|
<include base="ReactOS">include/reactos/wine</include>
|
||||||
<define name="__USE_W32API" />
|
<define name="__REACTOS__" />
|
||||||
<define name="_WIN32_WINNT">0x501</define>
|
|
||||||
<define name="__WINESRC__" />
|
<define name="__WINESRC__" />
|
||||||
<library>ntdll</library>
|
<define name="__USE_W32API" />
|
||||||
<library>kernel32</library>
|
<define name="_WIN32_IE">0x600</define>
|
||||||
<library>shlwapi</library>
|
<define name="_WIN32_WINNT">0x501</define>
|
||||||
|
<define name="WINVER">0x501</define>
|
||||||
<library>wine</library>
|
<library>wine</library>
|
||||||
|
<library>shlwapi</library>
|
||||||
|
<library>shell32</library>
|
||||||
|
<library>ole32</library>
|
||||||
|
<library>user32</library>
|
||||||
|
<library>kernel32</library>
|
||||||
|
<library>ntdll</library>
|
||||||
<library>uuid</library>
|
<library>uuid</library>
|
||||||
<library>advapi32</library>
|
|
||||||
<file>mapi32_main.c</file>
|
|
||||||
<file>imalloc.c</file>
|
<file>imalloc.c</file>
|
||||||
|
<file>mapi32_main.c</file>
|
||||||
<file>prop.c</file>
|
<file>prop.c</file>
|
||||||
<file>sendmail.c</file>
|
<file>sendmail.c</file>
|
||||||
<file>util.c</file>
|
<file>util.c</file>
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
28 stdcall -private DllCanUnloadNow()
|
28 stdcall -private DllCanUnloadNow()
|
||||||
29 stub MAPIOpenFormMgr
|
29 stub MAPIOpenFormMgr
|
||||||
30 stub MAPIOpenFormMgr@8
|
30 stub MAPIOpenFormMgr@8
|
||||||
31 stub MAPIOpenLocalFormContainer
|
31 stdcall MAPIOpenLocalFormContainer(ptr)
|
||||||
32 stub MAPIOpenLocalFormContainer@4
|
32 stdcall MAPIOpenLocalFormContainer@4(ptr) MAPIOpenLocalFormContainer
|
||||||
33 stdcall ScInitMapiUtil@4(long) ScInitMapiUtil
|
33 stdcall ScInitMapiUtil@4(long) ScInitMapiUtil
|
||||||
34 stdcall DeinitMapiUtil@0() DeinitMapiUtil
|
34 stdcall DeinitMapiUtil@0() DeinitMapiUtil
|
||||||
35 stub ScGenerateMuid@4
|
35 stub ScGenerateMuid@4
|
||||||
|
@ -186,6 +186,5 @@
|
||||||
251 stub GetOutlookVersion@0
|
251 stub GetOutlookVersion@0
|
||||||
252 stub FixMAPI
|
252 stub FixMAPI
|
||||||
253 stub FixMAPI@0
|
253 stub FixMAPI@0
|
||||||
# This entry point is sometimes used to detect if the mapi dll came from Outlook
|
254 stdcall FGetComponentPath(str str ptr long long)
|
||||||
#254 stub FGetComponentPath
|
255 stdcall FGetComponentPath@20(str str ptr long long) FGetComponentPath
|
||||||
#255 stub FGetComponentPath@20
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -74,7 +74,7 @@ HRESULT WINAPI MAPIInitialize(LPVOID init)
|
||||||
return SUCCESS_SUCCESS;
|
return SUCCESS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG WINAPI MAPILogon(ULONG uiparam, LPSTR profile, LPSTR password,
|
ULONG WINAPI MAPILogon(ULONG_PTR uiparam, LPSTR profile, LPSTR password,
|
||||||
FLAGS flags, ULONG reserved, LPLHANDLE session)
|
FLAGS flags, ULONG reserved, LPLHANDLE session)
|
||||||
{
|
{
|
||||||
FIXME("(0x%08lx %s %p 0x%08lx 0x%08lx %p) Stub\n", uiparam,
|
FIXME("(0x%08lx %s %p 0x%08lx 0x%08lx %p) Stub\n", uiparam,
|
||||||
|
@ -84,7 +84,7 @@ ULONG WINAPI MAPILogon(ULONG uiparam, LPSTR profile, LPSTR password,
|
||||||
return SUCCESS_SUCCESS;
|
return SUCCESS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG WINAPI MAPILogoff(LHANDLE session, ULONG uiparam, FLAGS flags,
|
ULONG WINAPI MAPILogoff(LHANDLE session, ULONG_PTR uiparam, FLAGS flags,
|
||||||
ULONG reserved )
|
ULONG reserved )
|
||||||
{
|
{
|
||||||
FIXME("(0x%08lx 0x%08lx 0x%08lx 0x%08lx) Stub\n", session,
|
FIXME("(0x%08lx 0x%08lx 0x%08lx 0x%08lx) Stub\n", session,
|
||||||
|
@ -100,6 +100,12 @@ HRESULT WINAPI MAPILogonEx(ULONG_PTR uiparam, LPWSTR profile,
|
||||||
return SUCCESS_SUCCESS;
|
return SUCCESS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI MAPIOpenLocalFormContainer(LPVOID *ppfcnt)
|
||||||
|
{
|
||||||
|
FIXME("(%p) Stub\n", ppfcnt);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
VOID WINAPI MAPIUninitialize(void)
|
VOID WINAPI MAPIUninitialize(void)
|
||||||
{
|
{
|
||||||
FIXME("Stub\n");
|
FIXME("Stub\n");
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -1404,7 +1404,7 @@ typedef struct
|
||||||
ULONG ulObjAccess; /* Object access level */
|
ULONG ulObjAccess; /* Object access level */
|
||||||
ULONG ulNumValues; /* Number of items in values list */
|
ULONG ulNumValues; /* Number of items in values list */
|
||||||
struct list values; /* List of property values */
|
struct list values; /* List of property values */
|
||||||
RTL_CRITICAL_SECTION cs; /* Lock for thread safety */
|
CRITICAL_SECTION cs; /* Lock for thread safety */
|
||||||
} IPropDataImpl;
|
} IPropDataImpl;
|
||||||
|
|
||||||
/* Internal - Get a property value, assumes lock is held */
|
/* Internal - Get a property value, assumes lock is held */
|
||||||
|
@ -1461,13 +1461,13 @@ static IPropDataItem *IMAPIPROP_AddValue(IPropDataImpl *This,
|
||||||
/* Internal - Lock an IPropData object */
|
/* Internal - Lock an IPropData object */
|
||||||
static inline void IMAPIPROP_Lock(IPropDataImpl *This)
|
static inline void IMAPIPROP_Lock(IPropDataImpl *This)
|
||||||
{
|
{
|
||||||
RtlEnterCriticalSection(&This->cs);
|
EnterCriticalSection(&This->cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Internal - Unlock an IPropData object */
|
/* Internal - Unlock an IPropData object */
|
||||||
static inline void IMAPIPROP_Unlock(IPropDataImpl *This)
|
static inline void IMAPIPROP_Unlock(IPropDataImpl *This)
|
||||||
{
|
{
|
||||||
RtlLeaveCriticalSection(&This->cs);
|
LeaveCriticalSection(&This->cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This one seems to be missing from mapidefs.h */
|
/* This one seems to be missing from mapidefs.h */
|
||||||
|
@ -1553,7 +1553,7 @@ static inline ULONG WINAPI IMAPIProp_fnRelease(LPMAPIPROP iface)
|
||||||
This->lpFree(current->value);
|
This->lpFree(current->value);
|
||||||
This->lpFree(current);
|
This->lpFree(current);
|
||||||
}
|
}
|
||||||
RtlDeleteCriticalSection(&This->cs);
|
DeleteCriticalSection(&This->cs);
|
||||||
This->lpFree(This);
|
This->lpFree(This);
|
||||||
}
|
}
|
||||||
return (ULONG)lRef;
|
return (ULONG)lRef;
|
||||||
|
@ -2542,7 +2542,7 @@ SCODE WINAPI CreateIProp(LPCIID iid, ALLOCATEBUFFER *lpAlloc,
|
||||||
lpPropData->ulObjAccess = IPROP_READWRITE;
|
lpPropData->ulObjAccess = IPROP_READWRITE;
|
||||||
lpPropData->ulNumValues = 0;
|
lpPropData->ulNumValues = 0;
|
||||||
list_init(&lpPropData->values);
|
list_init(&lpPropData->values);
|
||||||
RtlInitializeCriticalSection(&lpPropData->cs);
|
InitializeCriticalSection(&lpPropData->cs);
|
||||||
*lppPropData = (LPPROPDATA)lpPropData;
|
*lppPropData = (LPPROPDATA)lpPropData;
|
||||||
}
|
}
|
||||||
return scode;
|
return scode;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
|
@ -15,10 +15,11 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with this library; if not, write to the Free Software
|
* License along with this library; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
#define NONAMELESSUNION
|
#define NONAMELESSUNION
|
||||||
|
@ -35,6 +36,7 @@
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
#include "mapival.h"
|
#include "mapival.h"
|
||||||
#include "xcmc.h"
|
#include "xcmc.h"
|
||||||
|
#include "msi.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(mapi);
|
WINE_DEFAULT_DEBUG_CHANNEL(mapi);
|
||||||
|
|
||||||
|
@ -821,3 +823,70 @@ CMC_return_code WINAPI cmc_query_configuration(
|
||||||
FIXME("stub");
|
FIXME("stub");
|
||||||
return CMC_E_NOT_SUPPORTED;
|
return CMC_E_NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* FGetComponentPath (MAPI32.254)
|
||||||
|
* FGetComponentPath@20 (MAPI32.255)
|
||||||
|
*
|
||||||
|
* Return the installed component path, usually to the private mapi32.dll.
|
||||||
|
*
|
||||||
|
* PARAMS
|
||||||
|
* component [I] Component ID
|
||||||
|
* qualifier [I] Application LCID
|
||||||
|
* dll_path [O] returned component path
|
||||||
|
* dll_path_length [I] component path length
|
||||||
|
* install [I] install mode
|
||||||
|
*
|
||||||
|
* RETURNS
|
||||||
|
* Success: TRUE.
|
||||||
|
* Failure: FALSE.
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* Previously documented in Q229700 "How to locate the correct path
|
||||||
|
* to the Mapisvc.inf file in Microsoft Outlook".
|
||||||
|
*/
|
||||||
|
BOOL WINAPI FGetComponentPath(LPCSTR component, LPCSTR qualifier, LPSTR dll_path,
|
||||||
|
DWORD dll_path_length, BOOL install)
|
||||||
|
{
|
||||||
|
BOOL ret = FALSE;
|
||||||
|
HMODULE hmsi;
|
||||||
|
|
||||||
|
TRACE("%s %s %p %lu %d\n", component, qualifier, dll_path, dll_path_length, install);
|
||||||
|
|
||||||
|
dll_path[0] = 0;
|
||||||
|
|
||||||
|
hmsi = LoadLibraryA("msi.dll");
|
||||||
|
if (hmsi)
|
||||||
|
{
|
||||||
|
FARPROC pMsiProvideQualifiedComponentA = GetProcAddress(hmsi, "MsiProvideQualifiedComponentA");
|
||||||
|
|
||||||
|
if (pMsiProvideQualifiedComponentA)
|
||||||
|
{
|
||||||
|
static const char * const fmt[] = { "%d\\NT", "%d\\95", "%d" };
|
||||||
|
char lcid_ver[20];
|
||||||
|
UINT i;
|
||||||
|
|
||||||
|
for (i = 0; i < sizeof(fmt)/sizeof(fmt[0]); i++)
|
||||||
|
{
|
||||||
|
/* FIXME: what's the correct behaviour here? */
|
||||||
|
if (!qualifier || qualifier == lcid_ver)
|
||||||
|
{
|
||||||
|
sprintf(lcid_ver, fmt[i], GetUserDefaultUILanguage());
|
||||||
|
qualifier = lcid_ver;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pMsiProvideQualifiedComponentA(component, qualifier,
|
||||||
|
install ? INSTALLMODE_DEFAULT : INSTALLMODE_EXISTING,
|
||||||
|
dll_path, &dll_path_length) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
ret = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (qualifier != lcid_ver) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FreeLibrary(hmsi);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue