Mike McCormack : advapi32: Implement and test SystemFunction011.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon May 22 05:19:35 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: c3a1e8731e581daa4c5b72238835c353298582e6
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=c3a1e8731e581daa4c5b72238835c353298582e6
Author: Mike McCormack <mike at codeweavers.com>
Date: Sun May 21 18:01:58 2006 +0900
advapi32: Implement and test SystemFunction011.
---
dlls/advapi32/advapi32.spec | 2 +-
dlls/advapi32/crypt_md4.c | 1 +
dlls/advapi32/tests/crypt_md4.c | 20 +++++++++++++-------
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index 2c136c9..af21985 100644
--- a/dlls/advapi32/advapi32.spec
+++ b/dlls/advapi32/advapi32.spec
@@ -605,7 +605,7 @@ # @ stub StopTraceW
@ stdcall SystemFunction008(ptr ptr ptr)
@ stdcall SystemFunction009(ptr ptr ptr)
@ stdcall SystemFunction010(ptr ptr ptr)
-@ stub SystemFunction011
+@ stdcall SystemFunction011(ptr ptr ptr) SystemFunction010
@ stdcall SystemFunction012(ptr ptr ptr)
@ stdcall SystemFunction013(ptr ptr ptr)
@ stdcall SystemFunction014(ptr ptr ptr) SystemFunction012
diff --git a/dlls/advapi32/crypt_md4.c b/dlls/advapi32/crypt_md4.c
index f782ca0..5ca8953 100644
--- a/dlls/advapi32/crypt_md4.c
+++ b/dlls/advapi32/crypt_md4.c
@@ -299,6 +299,7 @@ NTSTATUS WINAPI SystemFunction007(PUNICO
/******************************************************************************
* SystemFunction010 [ADVAPI32.@]
+ * SystemFunction011 [ADVAPI32.@]
*
* MD4 hashes 16 bytes of data
*
diff --git a/dlls/advapi32/tests/crypt_md4.c b/dlls/advapi32/tests/crypt_md4.c
index 0c72d2b..e27f8b3 100644
--- a/dlls/advapi32/tests/crypt_md4.c
+++ b/dlls/advapi32/tests/crypt_md4.c
@@ -40,13 +40,14 @@ typedef VOID (WINAPI *fnMD4Init)( MD4_CT
typedef VOID (WINAPI *fnMD4Update)( MD4_CTX *ctx, const unsigned char *src, const int len );
typedef VOID (WINAPI *fnMD4Final)( MD4_CTX *ctx );
typedef int (WINAPI *fnSystemFunction007)(PUNICODE_STRING,LPBYTE);
-typedef int (WINAPI *fnSystemFunction010)(LPVOID, const LPBYTE, LPBYTE);
+typedef int (WINAPI *md4hashfunc)(LPVOID, const LPBYTE, LPBYTE);
fnMD4Init pMD4Init;
fnMD4Update pMD4Update;
fnMD4Final pMD4Final;
fnSystemFunction007 pSystemFunction007;
-fnSystemFunction010 pSystemFunction010;
+md4hashfunc pSystemFunction010;
+md4hashfunc pSystemFunction011;
#define ctxcmp( a, b ) memcmp( (char*)a, (char*)b, FIELD_OFFSET( MD4_CTX, in ) )
@@ -126,7 +127,7 @@ #endif
ok(!memcmp(output, expected, sizeof expected), "response wrong\n");
}
-static void test_SystemFunction010(void)
+static void test_md4hashfunc(md4hashfunc func)
{
unsigned char expected[0x10] = {
0x48, 0x7c, 0x3f, 0x5e, 0x2b, 0x0d, 0x6a, 0x79,
@@ -134,9 +135,12 @@ static void test_SystemFunction010(void)
unsigned char in[0x10], output[0x10];
int r;
+ if (!func)
+ return;
+
memset(in, 0, sizeof in);
memset(output, 0, sizeof output);
- r = pSystemFunction010(0, in, output);
+ r = func(0, in, output);
ok( r == STATUS_SUCCESS, "wrong error code\n");
ok( !memcmp(expected, output, sizeof output), "output wrong\n");
}
@@ -158,9 +162,11 @@ START_TEST(crypt_md4)
if (pSystemFunction007)
test_SystemFunction007();
- pSystemFunction010 = (fnSystemFunction010)GetProcAddress( module, "SystemFunction010" );
- if (pSystemFunction010)
- test_SystemFunction010();
+ pSystemFunction010 = (md4hashfunc)GetProcAddress( module, "SystemFunction010" );
+ pSystemFunction011 = (md4hashfunc)GetProcAddress( module, "SystemFunction011" );
+
+ test_md4hashfunc(pSystemFunction010);
+ test_md4hashfunc(pSystemFunction011);
FreeLibrary( module );
}
More information about the wine-cvs
mailing list