ReactOS 0.4.15-dev-7674-gc0b4db1
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
10typedef struct _LPK_LPEDITCONTROL_LIST
11{
27
28
30static DWORD (APIENTRY *fpLpkPSMTextOut) (LPVOID,LPVOID,LPVOID,LPVOID,LPVOID,LPVOID);
32static PLPK_LPEDITCONTROL_LIST (APIENTRY *fpLpkEditControl) ();
33
35static int Count_myLpkPSMTextOut = 0;
36static int Count_myLpkDrawTextEx = 0;
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}
DWORD myLpkPSMTextOut(LPVOID x1, LPVOID x2, LPVOID x3, LPVOID x4, LPVOID x5, LPVOID x6)
static int Count_myLpkTabbedTextOut
DWORD myLpkDrawTextEx(LPVOID x1, LPVOID x2, LPVOID x3, LPVOID x4, LPVOID x5, LPVOID x6, LPVOID x7, LPVOID x8, LPVOID x9, LPVOID x10)
struct _LPK_LPEDITCONTROL_LIST * PLPK_LPEDITCONTROL_LIST
struct _USER32_INTERN_INITIALIZEHOOKS * PUSER32_INTERN_INITIALIZEHOOKS
static int Count_myLpkDrawTextEx
void Test_InitializeLpkHooks()
static LPVOID
struct _LPK_LPEDITCONTROL_LIST LPK_LPEDITCONTROL_LIST
static int Count_myLpkPSMTextOut
VOID WINAPI InitializeLpkHooks(PUSER32_INTERN_INITIALIZEHOOKS)
struct _USER32_INTERN_INITIALIZEHOOKS USER32_INTERN_INITIALIZEHOOKS
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)
#define VOID
Definition: acefi.h:82
#define ok(value,...)
Definition: atltest.h:57
#define START_TEST(x)
Definition: atltest.h:75
#define NULL
Definition: types.h:112
#define APIENTRY
Definition: api.h:79
#define GetProcAddress(x, y)
Definition: compat.h:753
unsigned long DWORD
Definition: ntddk_ex.h:95
static BOOL setup(void)
Definition: enum_files.c:97
#define DWORD
Definition: nt_native.h:44
PLPK_LPEDITCONTROL_LIST fpListLpkEditControl
#define LoadLibrary
Definition: winbase.h:3797
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3710
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3708
#define WINAPI
Definition: msvc.h:6