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
4ed80f3b
Commit
4ed80f3b
authored
Jan 30, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Feb 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mapi32/tests: Invoke MAPIInitialize before performing the FPropContainsProp tests.
This avoids crashes with the native Outlook extended MAPI provider.
parent
2da6570c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
prop.c
dlls/mapi32/tests/prop.c
+21
-4
No files found.
dlls/mapi32/tests/prop.c
View file @
4ed80f3b
...
...
@@ -32,6 +32,7 @@
static
HMODULE
hMapi32
=
0
;
static
SCODE
(
WINAPI
*
pScInitMapiUtil
)(
ULONG
);
static
void
(
WINAPI
*
pDeinitMapiUtil
)(
void
);
static
SCODE
(
WINAPI
*
pPropCopyMore
)(
LPSPropValue
,
LPSPropValue
,
ALLOCATEMORE
*
,
LPVOID
);
static
ULONG
(
WINAPI
*
pUlPropSize
)(
LPSPropValue
);
static
BOOL
(
WINAPI
*
pFPropContainsProp
)(
LPSPropValue
,
LPSPropValue
,
ULONG
);
...
...
@@ -53,7 +54,9 @@ static SCODE (WINAPI *pCreateIProp)(LPCIID,ALLOCATEBUFFER*,ALLOCATEMORE*,
FREEBUFFER
*
,
LPVOID
,
LPPROPDATA
*
);
static
SCODE
(
WINAPI
*
pMAPIAllocateBuffer
)(
ULONG
,
LPVOID
);
static
SCODE
(
WINAPI
*
pMAPIAllocateMore
)(
ULONG
,
LPVOID
,
LPVOID
);
static
SCODE
(
WINAPI
*
pMAPIInitialize
)(
LPVOID
);
static
SCODE
(
WINAPI
*
pMAPIFreeBuffer
)(
LPVOID
);
static
void
(
WINAPI
*
pMAPIUninitialize
)(
void
);
static
BOOL
InitFuncPtrs
(
void
)
{
...
...
@@ -79,13 +82,15 @@ static BOOL InitFuncPtrs(void)
pCreateIProp
=
(
void
*
)
GetProcAddress
(
hMapi32
,
"CreateIProp@24"
);
pScInitMapiUtil
=
(
void
*
)
GetProcAddress
(
hMapi32
,
"ScInitMapiUtil@4"
);
pDeinitMapiUtil
=
(
void
*
)
GetProcAddress
(
hMapi32
,
"DeinitMapiUtil@0"
);
pMAPIAllocateBuffer
=
(
void
*
)
GetProcAddress
(
hMapi32
,
"MAPIAllocateBuffer"
);
pMAPIAllocateMore
=
(
void
*
)
GetProcAddress
(
hMapi32
,
"MAPIAllocateMore"
);
pMAPIFreeBuffer
=
(
void
*
)
GetProcAddress
(
hMapi32
,
"MAPIFreeBuffer"
);
if
(
pScInitMapiUtil
&&
pMAPIAllocateBuffer
&&
pMAPIAllocateMore
&&
pMAPIFreeBuffer
)
return
TRUE
;
else
return
FALSE
;
pMAPIInitialize
=
(
void
*
)
GetProcAddress
(
hMapi32
,
"MAPIInitialize"
);
pMAPIUninitialize
=
(
void
*
)
GetProcAddress
(
hMapi32
,
"MAPIUninitialize"
);
return
pMAPIAllocateBuffer
&&
pMAPIAllocateMore
&&
pMAPIFreeBuffer
&&
pScInitMapiUtil
&&
pDeinitMapiUtil
;
}
/* FIXME: Test PT_I2, PT_I4, PT_R4, PT_R8, PT_CURRENCY, PT_APPTIME, PT_SYSTIME,
...
...
@@ -1441,7 +1446,17 @@ START_TEST(prop)
test_PropCopyMore
();
test_UlPropSize
();
/* We call MAPIInitialize here for the benefit of native extended MAPI
* providers which crash in the FPropContainsProp tests when MAPIInitialize
* has not been called. Since MAPIInitialize is irrelevant for FPropContainsProp
* on Wine, we do not care whether MAPIInitialize succeeds. */
if
(
pMAPIInitialize
)
ret
=
pMAPIInitialize
(
NULL
);
test_FPropContainsProp
();
if
(
pMAPIUninitialize
&&
ret
==
S_OK
)
pMAPIUninitialize
();
test_FPropCompareProp
();
test_LPropCompareProp
();
test_PpropFindProp
();
...
...
@@ -1457,5 +1472,7 @@ START_TEST(prop)
test_FBadColumnSet
();
test_IProp
();
pDeinitMapiUtil
();
FreeLibrary
(
hMapi32
);
}
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