Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
64152a75
Commit
64152a75
authored
May 25, 2006
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
May 25, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mapi32: Implement FGetComponentPath.
parent
0d13a99e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
3 deletions
+68
-3
mapi32.spec
dlls/mapi32/mapi32.spec
+2
-3
util.c
dlls/mapi32/util.c
+66
-0
No files found.
dlls/mapi32/mapi32.spec
View file @
64152a75
...
...
@@ -186,6 +186,5 @@
251 stub GetOutlookVersion@0
252 stub FixMAPI
253 stub FixMAPI@0
# This entry point is sometimes used to detect if the mapi dll came from Outlook
#254 stub FGetComponentPath
#255 stub FGetComponentPath@20
254 stdcall FGetComponentPath(str str ptr long long)
255 stdcall FGetComponentPath@20(str str ptr long long) FGetComponentPath
dlls/mapi32/util.c
View file @
64152a75
...
...
@@ -19,6 +19,7 @@
*/
#include <stdarg.h>
#include <stdio.h>
#define COBJMACROS
#define NONAMELESSUNION
...
...
@@ -35,6 +36,7 @@
#include "wine/unicode.h"
#include "mapival.h"
#include "xcmc.h"
#include "msi.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mapi
);
...
...
@@ -821,3 +823,67 @@ CMC_return_code WINAPI cmc_query_configuration(
FIXME
(
"stub"
);
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
;
if
(
qualifier
!=
lcid_ver
)
break
;
}
}
FreeLibrary
(
hmsi
);
}
return
ret
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment