#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <ntndk.h>
#include <winbase.h>
Go to the source code of this file.
◆ DPFLTR_ERROR_LEVEL
◆ main()
Definition at line 112 of file shimtest_ros.c.
113{
114 xprintf(
"Normal import (kernel32!GetComputerNameA)\n");
116 xprintf(
"\nOrdinal import (shlwapi!#23)\n");
118
119 return 0;
120}
void test_normal_imports()
void xprintf(const char *fmt,...)
void test_ordinal_imports()
◆ SHStringFromGUIDA()
Definition at line 51 of file shimtest.c.
52{
54
56 {
58 }
59 else
60 {
63 }
64
67 return 0;
68}
#define SHIM_INFO(fmt,...)
INT(WINAPI * tSHStringFromGUIDA)(REFGUID guid, LPSTR lpszDest, INT cchMax)
STRSAFEAPI StringCchCatA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszSrc)
STRSAFEAPI StringCchCopyA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszSrc)
Referenced by SHPinDllOfCLSID(), and test_ordinal_imports().
◆ test_normal_imports()
void test_normal_imports |
( |
| ) |
|
Definition at line 27 of file shimtest_ros.c.
28{
33
34
38 {
40 }
41 else
42 {
43 xprintf(
"GetComputerNameA returned: '%s'\n",
buf);
44 }
45
46
49 if (p_GetComputerNameA ==
NULL)
50 {
52 }
53 else
54 {
58 {
60 }
61 else
62 {
63 xprintf(
"p_GetComputerNameA returned: '%s'\n",
buf);
64 }
65 }
66}
std::map< E_MODULE, HMODULE > mod
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define GetProcAddress(x, y)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
GLenum GLuint GLenum GLsizei const GLchar * buf
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static LPSTR PULONG lpnSize
BOOL WINAPI SHIM_OBJ_NAME() GetComputerNameA(LPSTR lpBuffer, LPDWORD lpnSize)
DWORD WINAPI GetLastError(void)
Referenced by main().
◆ test_ordinal_imports()
void test_ordinal_imports |
( |
| ) |
|
Definition at line 69 of file shimtest_ros.c.
70{
71 GUID guid = { 0x11223344, 0x5566, 0x7788 };
76
77
81 {
82 xprintf(
"SHStringFromGUIDA failed (%d)\n",
r);
83 }
84 else
85 {
86 xprintf(
"SHStringFromGUIDA returned: '%s'\n",
buf);
87 }
88
89
92 if (p_SHStringFromGUIDA ==
NULL)
93 {
95 }
96 else
97 {
101 {
102 xprintf(
"p_SHStringFromGUIDA failed (%d)\n",
r);
103 }
104 else
105 {
106 xprintf(
"p_SHStringFromGUIDA returned: '%s'\n",
buf);
107 }
108 }
109}
GLdouble GLdouble GLdouble r
INT WINAPI SHStringFromGUIDA(REFGUID, LPSTR, INT)
Referenced by main().
◆ vDbgPrintEx()
◆ xprintf()
Definition at line 17 of file shimtest_ros.c.
18{
20
25}
_Check_return_opt_ _CRTIMP int __cdecl vprintf(_In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
NTSYSAPI ULONG NTAPI vDbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ PCCH Format, _In_ va_list ap)
#define DPFLTR_ERROR_LEVEL
void int int ULONGLONG int va_list * ap
Referenced by main(), test_normal_imports(), and test_ordinal_imports().