1 #if (defined(_WIN64) || defined(_WIN32_WCE)) && !defined(UNICODE)
4 #if defined(UNICODE) && !defined(_UNICODE)
7 #if defined(_UNICODE) && !defined(UNICODE)
17 static TCHAR msg[128];
19 static void unimplemented (
void)
25 {
static HMODULE
volatile apphandle=NULL;
26 static void **
volatile applinktable=NULL;
43 len = _sntprintf (msg,
sizeof(msg)/
sizeof(TCHAR),
44 _T(
"OPENSSL_Uplink(%p,%02X): "),table,index);
45 _tcscpy (msg+len,_T(
"unimplemented function"));
47 if ((h=apphandle)==NULL)
48 {
if ((h=GetModuleHandle(NULL))==NULL)
49 { apphandle=(HMODULE)-1;
50 _tcscpy (msg+len,_T(
"no host application"));
55 if ((h=apphandle)==(HMODULE)-1)
58 if (applinktable==NULL)
61 applink=(
void**(*)())GetProcAddress(h,
"OPENSSL_Applink");
63 { apphandle=(HMODULE)-1;
64 _tcscpy (msg+len,_T(
"no OPENSSL_Applink"));
69 { apphandle=(HMODULE)-1;
70 _tcscpy (msg+len,_T(
"no ApplinkTable"));
78 if (index > (
int)p[0])
81 if (p[index])
func = p[index];
87 #if defined(_MSC_VER) && defined(_M_IX86) && !defined(OPENSSL_NO_INLINE_ASM)
89 __declspec(naked) static void lazy##i (void) { \
91 _asm push OFFSET OPENSSL_UplinkTable \
92 _asm call OPENSSL_Uplink \
94 _asm jmp OPENSSL_UplinkTable+4*i }
97 #error "Add more stubs..."
100 LAZY(1) LAZY(2) LAZY(3) LAZY(4) LAZY(5)
101 LAZY(6) LAZY(7) LAZY(8) LAZY(9) LAZY(10)
102 LAZY(11) LAZY(12) LAZY(13) LAZY(14) LAZY(15)
103 LAZY(16) LAZY(17) LAZY(18) LAZY(19) LAZY(20)
104 LAZY(21) LAZY(22) LAZY(23) LAZY(24) LAZY(25)
105 void *OPENSSL_UplinkTable[] = {
107 lazy1, lazy2, lazy3, lazy4, lazy5,
108 lazy6, lazy7, lazy8, lazy9, lazy10,
109 lazy11,lazy12,lazy13,lazy14,lazy15,
110 lazy16,lazy17,lazy18,lazy19,lazy20,
111 lazy21,lazy22,lazy23,lazy24,lazy25,