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
69156f5a
Commit
69156f5a
authored
Sep 18, 2009
by
Owen Rudge
Committed by
Alexandre Julliard
Sep 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mapi32: Load and store MAPI function pointers after loading MAPI providers.
parent
b6e5ee60
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
0 deletions
+51
-0
util.c
dlls/mapi32/util.c
+29
-0
util.h
dlls/mapi32/util.h
+22
-0
No files found.
dlls/mapi32/util.c
View file @
69156f5a
...
...
@@ -48,6 +48,8 @@ static const BYTE digitsToHex[] = {
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
10
,
11
,
12
,
13
,
14
,
15
};
MAPI_FUNCTIONS
mapiFunctions
;
/**************************************************************************
* ScInitMapiUtil (MAPI32.33)
*
...
...
@@ -1029,6 +1031,33 @@ void load_mapi_providers(void)
load_mapi_provider
(
hkeyMail
,
regkey_dllpath
,
&
mapi_provider
);
load_mapi_provider
(
hkeyMail
,
regkey_dllpath_ex
,
&
mapi_ex_provider
);
/* Now try to load our function pointers */
ZeroMemory
(
&
mapiFunctions
,
sizeof
(
mapiFunctions
));
/* Simple MAPI functions */
if
(
mapi_provider
)
{
mapiFunctions
.
MAPIAddress
=
(
void
*
)
GetProcAddress
(
mapi_provider
,
"MAPIAddress"
);
mapiFunctions
.
MAPIDeleteMail
=
(
void
*
)
GetProcAddress
(
mapi_provider
,
"MAPIDeleteMail"
);
mapiFunctions
.
MAPIDetails
=
(
void
*
)
GetProcAddress
(
mapi_provider
,
"MAPIDetails"
);
mapiFunctions
.
MAPIFindNext
=
(
void
*
)
GetProcAddress
(
mapi_provider
,
"MAPIFindNext"
);
mapiFunctions
.
MAPILogoff
=
(
void
*
)
GetProcAddress
(
mapi_provider
,
"MAPILogoff"
);
mapiFunctions
.
MAPILogon
=
(
void
*
)
GetProcAddress
(
mapi_provider
,
"MAPILogon"
);
mapiFunctions
.
MAPIReadMail
=
(
void
*
)
GetProcAddress
(
mapi_provider
,
"MAPIReadMail"
);
mapiFunctions
.
MAPIResolveName
=
(
void
*
)
GetProcAddress
(
mapi_provider
,
"MAPIResolveName"
);
mapiFunctions
.
MAPISaveMail
=
(
void
*
)
GetProcAddress
(
mapi_provider
,
"MAPISaveMail"
);
mapiFunctions
.
MAPISendDocuments
=
(
void
*
)
GetProcAddress
(
mapi_provider
,
"MAPISendDocuments"
);
mapiFunctions
.
MAPISendMail
=
(
void
*
)
GetProcAddress
(
mapi_provider
,
"MAPISendMail"
);
}
/* Extended MAPI functions */
if
(
mapi_ex_provider
)
{
mapiFunctions
.
MAPIInitialize
=
(
void
*
)
GetProcAddress
(
mapi_ex_provider
,
"MAPIInitialize"
);
mapiFunctions
.
MAPILogonEx
=
(
void
*
)
GetProcAddress
(
mapi_ex_provider
,
"MAPILogonEx"
);
mapiFunctions
.
MAPIUninitialize
=
(
void
*
)
GetProcAddress
(
mapi_ex_provider
,
"MAPIUninitialize"
);
}
cleanUp:
RegCloseKey
(
hkeyMail
);
HeapFree
(
GetProcessHeap
(),
0
,
appKey
);
...
...
dlls/mapi32/util.h
View file @
69156f5a
...
...
@@ -22,7 +22,29 @@
#define _MAPI_UTIL_H
#include <mapi.h>
#include <mapix.h>
extern
void
load_mapi_providers
(
void
);
extern
void
unload_mapi_providers
(
void
);
typedef
struct
MAPI_FUNCTIONS
{
LPMAPIADDRESS
MAPIAddress
;
LPMAPIDELETEMAIL
MAPIDeleteMail
;
LPMAPIDETAILS
MAPIDetails
;
LPMAPIFINDNEXT
MAPIFindNext
;
LPMAPIINITIALIZE
MAPIInitialize
;
LPMAPILOGOFF
MAPILogoff
;
LPMAPILOGON
MAPILogon
;
LPMAPILOGONEX
MAPILogonEx
;
LPMAPIREADMAIL
MAPIReadMail
;
LPMAPIRESOLVENAME
MAPIResolveName
;
LPMAPISAVEMAIL
MAPISaveMail
;
LPMAPISENDMAIL
MAPISendMail
;
LPMAPISENDDOCUMENTS
MAPISendDocuments
;
LPMAPIUNINITIALIZE
MAPIUninitialize
;
}
MAPI_FUNCTIONS
;
extern
MAPI_FUNCTIONS
mapiFunctions
;
#endif
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