Jungo WinDriver  
Official Documentation
utils.h File Reference
#include <stdio.h>
#include "windrvr.h"

Go to the source code of this file.

Macros

#define MAX_PATH   4096
 
#define snprintf   _snprintf
 
#define vsnprintf   _vsnprintf
 
#define OsMemoryBarrier()   MemoryBarrier()
 
#define INFINITE   0xffffffff
 

Typedefs

typedef void(DLLCALLCONVHANDLER_FUNC) (void *pData)
 

Functions

DWORD DLLCALLCONV OsEventCreate (_Outptr_ HANDLE *phOsEvent)
 Creates an event object.
 
void DLLCALLCONV OsEventClose (_In_ HANDLE hOsEvent)
 Closes a handle to an event object.
 
DWORD DLLCALLCONV OsEventWait (_In_ HANDLE hOsEvent, _In_ DWORD dwSecTimeout)
 Waits until a specified event object is in the signaled state or the time-out interval elapses.
 
DWORD DLLCALLCONV OsEventSignal (_In_ HANDLE hOsEvent)
 Sets the specified event object to the signaled state.
 
DWORD DLLCALLCONV OsEventReset (_In_ HANDLE hOsEvent)
 Resets the specified event object to the non-signaled state.
 
DWORD DLLCALLCONV OsMutexCreate (_Outptr_ HANDLE *phOsMutex)
 Creates a mutex object.
 
void DLLCALLCONV OsMutexClose (_In_ HANDLE hOsMutex)
 Closes a handle to a mutex object.
 
DWORD DLLCALLCONV OsMutexLock (_In_ HANDLE hOsMutex)
 Locks the specified mutex object.
 
DWORD DLLCALLCONV OsMutexUnlock (_In_ HANDLE hOsMutex)
 Releases (unlocks) a locked mutex object.
 
void DLLCALLCONV SleepWrapper (_In_ DWORD dwMicroSecs)
 Wrapper to WD_Sleep, Sleeps dwMicroSecs microseconds.
 
int print2wstr (wchar_t *buffer, size_t count, const wchar_t *format,...)
 
void DLLCALLCONV vPrintDbgMessage (_In_ DWORD dwLevel, _In_ DWORD dwSection, _In_ const char *format, _In_ va_list ap)
 Sends debug messages to the Debug Monitor.
 
void DLLCALLCONV PrintDbgMessage (DWORD dwLevel, DWORD dwSection, const char *format,...)
 Sends debug messages to the Debug Monitor.
 
int DLLCALLCONV GetPageSize (void)
 Returns the page size in the OS.
 
int DLLCALLCONV GetNumberOfProcessors (void)
 Returns the number of processors currently online (available)
 
BOOL DLLCALLCONV UtilGetFileSize (_In_ const PCHAR sFileName, _Outptr_ DWORD *pdwFileSize, _In_ PCHAR sErrString)
 Writes the file size with name sFileName in dwFileSize.
 
DWORD DLLCALLCONV UtilGetStringFromUser (_Out_ PCHAR pcString, _In_ DWORD dwSizeStr, _In_ const CHAR *pcInputText, _In_ const CHAR *pcDefaultString)
 Gets a string from user input and out it in pcString.
 
DWORD DLLCALLCONV UtilGetFileName (_Out_ PCHAR pcFileName, _In_ DWORD dwFileNameSize, _In_ const CHAR *pcDefaultFileName)
 Gets a file name from user input and out it in pcFileName.
 
DWORD DLLCALLCONV EnableVTMode (void)
 Enables Virtual Terminal Mode in Windows, allows color prints in the terminal.