#include <windows.h>
#include "loadlib.h"
#include <string.h>
#include <stdlib.h>
#include <wchar.h>
Go to the source code of this file.
◆ APP_VERSION
◆ MAX_LIBS
◆ TARGET
◆ appName()
◆ dprintf()
Definition at line 48 of file loadlib.c.
int WINAPI wvsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR, _In_ va_list arglist)
BOOL WINAPI DECLSPEC_HOTPATCH WriteConsoleA(IN HANDLE hConsoleOutput, IN CONST VOID *lpBuffer, IN DWORD nNumberOfCharsToWrite, OUT LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved)
int WINAPI lstrlenA(LPCSTR lpString)
Referenced by LoadLibraryList(), main(), ReportLastError(), and usage().
◆ getinput()
Definition at line 59 of file loadlib.c.
GLenum GLuint GLenum GLsizei const GLchar * buf
BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleA(IN HANDLE hConsoleInput, OUT LPVOID lpBuffer, IN DWORD nNumberOfCharsToRead, OUT LPDWORD lpNumberOfCharsRead, IN PCONSOLE_READCONSOLE_CONTROL pInputControl OPTIONAL)
Referenced by main().
◆ LoadLibraryList()
Definition at line 113 of file loadlib.c.
117 dprintf(
"Attempting to LoadLibrary");
119 dprintf(
"A(%s) - ", *libnames);
123 wchar_t libnameW[500];
126 libnameW[
len] =
L'\0';
134 dprintf(
"\nERROR: failed to obtain handle to module %s - %x\n", *libnames,
hModule);
144 dprintf(
"ERROR: failed to free module %s - %x\n", *libnames,
hModule);
#define ERROR_INVALID_PARAMETER
ACPI_SIZE strlen(const char *String)
size_t __cdecl mbstowcs(_Out_writes_opt_z_(_MaxCount) wchar_t *_Dest, _In_z_ const char *_Source, _In_ size_t _MaxCount)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD ReportLastError(void)
void dprintf(char *fmt,...)
DWORD LoadLibraryList(char **libnames, int counter, BOOL bUseAnsi)
Referenced by main().
◆ main()
hosttype.c Copyright (C) 2002 by Brian Palmer brian.nosp@m.p@sg.nosp@m.inet..nosp@m.com
Definition at line 152 of file loadlib.c.
167 memset(libs, 0,
sizeof(libs));
183 libs[lib_count] =
argv[
i];
193 for (
i = 0;
i < lib_count;
i++) {
203 dprintf(
"\nEnter library name to attempt loading: ");
BOOL WINAPI AllocConsole(VOID)
int WINAPI lstrcmpiA(LPCSTR lpString1, LPCSTR lpString2)
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
GLenum GLuint GLenum GLsizei const GLchar * buf
int usage(const char *appName)
long getinput(char *buf, int buflen)
#define STD_OUTPUT_HANDLE
void dprintf(char *fmt,...)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
const char * appName(const char *argv0)
DWORD LoadLibraryList(char **libnames, int counter, BOOL bUseAnsi)
◆ ReportLastError()
Definition at line 67 of file loadlib.c.
75 dprintf(
"ReportLastError() %d - %s\n", dwError,
msg);
77 dprintf(
"ERROR: ReportLastError() %d - returned TRUE but with no msg string!\n", dwError);
80 dprintf(
"ReportLastError() %d - unknown error\n", dwError);
DWORD WINAPI GetLastError(VOID)
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
#define FORMAT_MESSAGE_FROM_SYSTEM
void dprintf(char *fmt,...)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Referenced by LoadLibraryList().
◆ usage()
Definition at line 99 of file loadlib.c.
101 dprintf(
"USAGE: %s libname [libname ...] [unicode]|[ansi] [loop][recurse]\n",
appName);
102 dprintf(
"\tWhere libname(s) is one or more libraries to load.\n");
103 dprintf(
"\t[unicode] - perform tests using UNICODE api calls\n");
104 dprintf(
"\t[ansi] - perform tests using ANSI api calls\n");
106 dprintf(
"\t[loop] - run test process in continuous loop\n");
107 dprintf(
"\t[recurse] - load libraries recursively rather than sequentually\n");
108 dprintf(
"\t[debug] - enable debug mode (unused)\n");
109 dprintf(
"\t[verbose] - enable verbose output (unused)\n");
void dprintf(char *fmt,...)
const char * appName(const char *argv0)
Referenced by main().
◆ bUseAnsi
◆ debug_flagged
◆ InputHandle
◆ loop_flagged
◆ OutputHandle
◆ recursive_flagged
◆ verbose_flagged