First public contribution.
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
24 #include "cryptography_stubs.h"
26 FARPROC vector[MAX_ORDINAL+1];
28 void fill_vector(HINSTANCE aDll)
31 for (i=1;i<=MAX_ORDINAL;i++)
33 vector[i] = GetProcAddress(aDll, (LPCSTR)i);
35 vector[0] = (FARPROC)1; // initialised
40 __LOCK_HOST; // prevent deadlock with EKA2 scheduler
44 // Try for strong cryptography
46 instance = LoadLibraryA("strong_cryptography.dll");
49 fill_vector(instance);
53 // Try for weak cryptography
55 instance = LoadLibraryA("weak_cryptography.dll");
58 fill_vector(instance);
64 OutputDebugStringA("Unable to load cryptography implementation");
68 __declspec(naked) void common_dispatch()
70 _asm cmp dword ptr vector,0 // initialised?
71 _asm jne call_though_vector
80 _asm jmp [vector+eax*4]