ReactOS  0.4.15-dev-313-g8fde48b
InitializeLpkHooks.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS api tests
3  * LICENSE: GPL - See COPYING in the top level directory
4  * PURPOSE: Test for InitializeLpkHooks
5  * PROGRAMMERS: Magnus Olsen
6  */
7 
8 #include "precomp.h"
9 
10 typedef struct _LPK_LPEDITCONTROL_LIST
11 {
27 
28 
30 DWORD (APIENTRY *fpLpkPSMTextOut) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID);
32 PLPK_LPEDITCONTROL_LIST (APIENTRY *fpLpkEditControl) ();
33 
37 
39  LPVOID x9, LPVOID x10, LPVOID x11, LPVOID x12)
40 {
42  return fpLpkTabbedTextOut(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12);
43 }
44 
46 {
48  return fpLpkPSMTextOut ( x1, x2, x3, x4, x5, x6);
49 }
50 
52 {
54  return fpLpkDrawTextEx(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10);
55 }
56 
57 
59 {
65 
67 
69 {
71  HMODULE lib = LoadLibrary("LPK.DLL");
72 
73  ok(lib != NULL, "lib = 0\n");
74  if (lib != NULL)
75  {
76  fpLpkTabbedTextOut = (DWORD (APIENTRY *) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID, LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID)) GetProcAddress(lib, "LpkTabbedTextOut");
77  fpLpkPSMTextOut = (DWORD (APIENTRY *) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID)) GetProcAddress(lib, "fpLpkPSMTextOut");
78  fpLpkDrawTextEx = (DWORD (APIENTRY *) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID)) GetProcAddress(lib, "LpkDrawTextEx");
79  fpLpkEditControl = (PLPK_LPEDITCONTROL_LIST (APIENTRY *) (VOID)) GetProcAddress(lib, "LpkEditControl");
80 
81  setup.fpLpkTabbedTextOut = myLpkTabbedTextOut;
82  setup.fpLpkPSMTextOut = myLpkPSMTextOut;
83  setup.fpLpkDrawTextEx = myLpkDrawTextEx;
84 
85  /* we have not add any test to this api */
86  setup.fpListLpkEditControl = (PLPK_LPEDITCONTROL_LIST)fpLpkEditControl;
87 
88  /* use our own api that we just made */
90 
91  /* FIXME add test now */
92 
93  /* restore */
94  setup.fpLpkTabbedTextOut = fpLpkTabbedTextOut;
95  setup.fpLpkPSMTextOut = fpLpkPSMTextOut;
96  setup.fpLpkDrawTextEx = fpLpkDrawTextEx;
97  setup.fpListLpkEditControl = (PLPK_LPEDITCONTROL_LIST)fpLpkEditControl;
99  }
100 
101 }
102 
104 {
106 }
int Count_myLpkTabbedTextOut
#define LoadLibrary
Definition: winbase.h:3702
DWORD WINAPI myLpkTabbedTextOut(LPVOID x1, LPVOID x2, LPVOID x3, LPVOID x4, LPVOID x5, LPVOID x6, LPVOID x7, LPVOID x8, LPVOID x9, LPVOID x10, LPVOID x11, LPVOID x12)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
START_TEST(InitializeLpkHooks)
smooth NULL
Definition: ftsmooth.c:416
#define WINAPI
Definition: msvc.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
PLPK_LPEDITCONTROL_LIST fpListLpkEditControl
#define VOID
Definition: acefi.h:82
struct _USER32_INTERN_INITIALIZEHOOKS * PUSER32_INTERN_INITIALIZEHOOKS
DWORD(APIENTRY *fpLpkTabbedTextOut)(LPVOID
VOID WINAPI InitializeLpkHooks(PUSER32_INTERN_INITIALIZEHOOKS)
#define ok(value,...)
Definition: atltest.h:57
DWORD myLpkPSMTextOut(LPVOID x1, LPVOID x2, LPVOID x3, LPVOID x4, LPVOID x5, LPVOID x6)
int Count_myLpkPSMTextOut
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3706
void setup(char *serport, int baud)
Definition: gdblib.c:169
void Test_InitializeLpkHooks()
DWORD myLpkDrawTextEx(LPVOID x1, LPVOID x2, LPVOID x3, LPVOID x4, LPVOID x5, LPVOID x6, LPVOID x7, LPVOID x8, LPVOID x9, LPVOID x10)
int Count_myLpkDrawTextEx
#define GetProcAddress(x, y)
Definition: compat.h:419
struct _LPK_LPEDITCONTROL_LIST LPK_LPEDITCONTROL_LIST
struct _USER32_INTERN_INITIALIZEHOOKS USER32_INTERN_INITIALIZEHOOKS
#define APIENTRY
Definition: api.h:79
struct _LPK_LPEDITCONTROL_LIST * PLPK_LPEDITCONTROL_LIST