Andrew Nguyen : mapi32/tests: Centralize property function pointer initialization.
Alexandre Julliard
julliard at winehq.org
Mon Jan 18 10:58:57 CST 2010
Module: wine
Branch: master
Commit: aef39f3d9fc63a8d9ec08438a76a6bd2d361505a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=aef39f3d9fc63a8d9ec08438a76a6bd2d361505a
Author: Andrew Nguyen <arethusa26 at gmail.com>
Date: Mon Jan 18 07:00:09 2010 -0600
mapi32/tests: Centralize property function pointer initialization.
---
dlls/mapi32/tests/prop.c | 47 ++++++++++++++++++---------------------------
1 files changed, 19 insertions(+), 28 deletions(-)
diff --git a/dlls/mapi32/tests/prop.c b/dlls/mapi32/tests/prop.c
index ce6fbd5..8c64245 100644
--- a/dlls/mapi32/tests/prop.c
+++ b/dlls/mapi32/tests/prop.c
@@ -59,6 +59,25 @@ static BOOL InitFuncPtrs(void)
{
hMapi32 = LoadLibraryA("mapi32.dll");
+ pPropCopyMore = (void*)GetProcAddress(hMapi32, "PropCopyMore at 16");
+ pUlPropSize = (void*)GetProcAddress(hMapi32, "UlPropSize at 4");
+ pFPropContainsProp = (void*)GetProcAddress(hMapi32, "FPropContainsProp at 12");
+ pFPropCompareProp = (void*)GetProcAddress(hMapi32, "FPropCompareProp at 12");
+ pLPropCompareProp = (void*)GetProcAddress(hMapi32, "LPropCompareProp at 8");
+ pPpropFindProp = (void*)GetProcAddress(hMapi32, "PpropFindProp at 12");
+ pScCountProps = (void*)GetProcAddress(hMapi32, "ScCountProps at 12");
+ pScCopyProps = (void*)GetProcAddress(hMapi32, "ScCopyProps at 16");
+ pScRelocProps = (void*)GetProcAddress(hMapi32, "ScRelocProps at 20");
+ pLpValFindProp = (void*)GetProcAddress(hMapi32, "LpValFindProp at 12");
+ pFBadRglpszA = (void*)GetProcAddress(hMapi32, "FBadRglpszA at 8");
+ pFBadRglpszW = (void*)GetProcAddress(hMapi32, "FBadRglpszW at 8");
+ pFBadRowSet = (void*)GetProcAddress(hMapi32, "FBadRowSet at 4");
+ pFBadPropTag = (void*)GetProcAddress(hMapi32, "FBadPropTag at 4");
+ pFBadRow = (void*)GetProcAddress(hMapi32, "FBadRow at 4");
+ pFBadProp = (void*)GetProcAddress(hMapi32, "FBadProp at 4");
+ pFBadColumnSet = (void*)GetProcAddress(hMapi32, "FBadColumnSet at 4");
+ pCreateIProp = (void*)GetProcAddress(hMapi32, "CreateIProp at 24");
+
pScInitMapiUtil = (void*)GetProcAddress(hMapi32, "ScInitMapiUtil at 4");
pMAPIAllocateBuffer = (void*)GetProcAddress(hMapi32, "MAPIAllocateBuffer");
pMAPIAllocateMore = (void*)GetProcAddress(hMapi32, "MAPIAllocateMore");
@@ -89,8 +108,6 @@ static void test_PropCopyMore(void)
ULONG i;
SCODE scode;
- pPropCopyMore = (void*)GetProcAddress(hMapi32, "PropCopyMore at 16");
-
if (!pPropCopyMore)
{
win_skip("PropCopyMore is not available\n");
@@ -172,8 +189,6 @@ static void test_UlPropSize(void)
SBinary buffbin[2];
ULONG pt, exp, res;
- pUlPropSize = (void*)GetProcAddress(hMapi32, "UlPropSize at 4");
-
if (!pUlPropSize)
{
win_skip("UlPropSize is not available\n");
@@ -272,8 +287,6 @@ static void test_FPropContainsProp(void)
ULONG pt;
BOOL bRet;
- pFPropContainsProp = (void*)GetProcAddress(hMapi32, "FPropContainsProp at 12");
-
if (!pFPropContainsProp)
{
win_skip("FPropContainsProp is not available\n");
@@ -424,8 +437,6 @@ static void test_FPropCompareProp(void)
ULONG i, j;
BOOL bRet, bExp;
- pFPropCompareProp = (void*)GetProcAddress(hMapi32, "FPropCompareProp at 12");
-
if (!pFPropCompareProp)
{
win_skip("FPropCompareProp is not available\n");
@@ -556,8 +567,6 @@ static void test_LPropCompareProp(void)
ULONG i, j;
INT iRet, iExp;
- pLPropCompareProp = (void*)GetProcAddress(hMapi32, "LPropCompareProp at 8");
-
if (!pLPropCompareProp)
{
win_skip("LPropCompareProp is not available\n");
@@ -664,8 +673,6 @@ static void test_PpropFindProp(void)
SPropValue pvProp, *pRet;
ULONG i;
- pPpropFindProp = (void*)GetProcAddress(hMapi32, "PpropFindProp at 12");
-
if (!pPpropFindProp)
{
win_skip("PpropFindProp is not available\n");
@@ -706,8 +713,6 @@ static void test_ScCountProps(void)
ULONG pt, exp, ulRet;
int success = 1;
- pScCountProps = (void*)GetProcAddress(hMapi32, "ScCountProps at 12");
-
if (!pScCountProps)
{
win_skip("ScCountProps is not available\n");
@@ -844,9 +849,6 @@ static void test_ScCopyRelocProps(void)
ULONG ulCount;
SCODE sc;
- pScCopyProps = (void*)GetProcAddress(hMapi32, "ScCopyProps at 16");
- pScRelocProps = (void*)GetProcAddress(hMapi32, "ScRelocProps at 20");
-
if (!pScCopyProps || !pScRelocProps)
{
win_skip("SPropValue copy functions are not available\n");
@@ -910,8 +912,6 @@ static void test_LpValFindProp(void)
SPropValue pvProp, *pRet;
ULONG i;
- pLpValFindProp = (void*)GetProcAddress(hMapi32, "LpValFindProp at 12");
-
if (!pLpValFindProp)
{
win_skip("LpValFindProp is not available\n");
@@ -948,7 +948,6 @@ static void test_FBadRglpszA(void)
static CHAR szString[] = "A String";
BOOL bRet;
- pFBadRglpszA = (void*)GetProcAddress(hMapi32, "FBadRglpszA at 8");
if (!pFBadRglpszA)
{
win_skip("FBadRglpszA is not available\n");
@@ -976,7 +975,6 @@ static void test_FBadRglpszW(void)
static WCHAR szString[] = { 'A',' ','S','t','r','i','n','g','\0' };
BOOL bRet;
- pFBadRglpszW = (void*)GetProcAddress(hMapi32, "FBadRglpszW at 8");
if (!pFBadRglpszW)
{
win_skip("FBadRglpszW is not available\n");
@@ -1002,7 +1000,6 @@ static void test_FBadRowSet(void)
{
ULONG ulRet;
- pFBadRowSet = (void*)GetProcAddress(hMapi32, "FBadRowSet at 4");
if (!pFBadRowSet)
{
win_skip("FBadRowSet is not available\n");
@@ -1019,7 +1016,6 @@ static void test_FBadPropTag(void)
{
ULONG pt, res;
- pFBadPropTag = (void*)GetProcAddress(hMapi32, "FBadPropTag at 4");
if (!pFBadPropTag)
{
win_skip("FBadPropTag is not available\n");
@@ -1054,7 +1050,6 @@ static void test_FBadRow(void)
{
ULONG ulRet;
- pFBadRow = (void*)GetProcAddress(hMapi32, "FBadRow at 4");
if (!pFBadRow)
{
win_skip("FBadRow is not available\n");
@@ -1074,7 +1069,6 @@ static void test_FBadProp(void)
ULONG pt, res;
SPropValue pv;
- pFBadProp = (void*)GetProcAddress(hMapi32, "FBadProp at 4");
if (!pFBadProp)
{
win_skip("FBadProp is not available\n");
@@ -1151,7 +1145,6 @@ static void test_FBadColumnSet(void)
SPropTagArray pta;
ULONG pt, res;
- pFBadColumnSet = (void*)GetProcAddress(hMapi32, "FBadColumnSet at 4");
if (!pFBadColumnSet)
{
win_skip("FBadColumnSet is not available\n");
@@ -1214,8 +1207,6 @@ static void test_IProp(void)
ULONG access[2], count;
SCODE sc;
- pCreateIProp = (void*)GetProcAddress(hMapi32, "CreateIProp at 24");
-
if (!pCreateIProp)
{
win_skip("CreateIProp is not available\n");
More information about the wine-cvs
mailing list