Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

UniGeezLibdll.cpp File Reference


Defines

#define UNIGEEZLIBAPI   __declspec(dllexport)
#define wparam   newMsg->wParam
#define msg   newMsg->message

Functions

BOOL CALLBACK LibMain (HANDLE hModule, DWORD dwReason, LPVOID lpReserved)
LRESULT CALLBACK MsgFilterFunc (int nCode, WPARAM wParam, LPARAM lParam )
LRESULT CALLBACK CBTFilterFunc (int nCode, WPARAM wParam, LPARAM lParam )
int CALLBACK InitHooksDll (const HWND hwndMainWindow, char _appName[][MAX_CH], char _format[][MAX_CH], const int _howmany)
 appName, format, & howmany are read into shared memory.

int CALLBACK setFontSize (const int size, HWND hDlg)
 sets the current font size.

HMODULE ModuleFromAddress (PVOID pv)
 returns the HMODULE that contains the specified memory address.

BOOL WINAPI InstallFilter (INT nCode)
 Install / Remove Filter function.

LRESULT CALLBACK MsgFilterFunc (INT nCode, WPARAM wParam, LPARAM lParam)
 global for this function and the next.

LRESULT CALLBACK CBTFilterFunc (INT nCode, WPARAM wParam, LPARAM lParam)
 Filter function for the WH_CBT hook. More...


Variables

HANDLE hInstance
BOOL InitCalled = FALSE
 DLL instance handle.

BOOL hookState = FALSE
 whether the hook is installed.

FARPROC msgHookProc = { (FARPROC) MsgFilterFunc }
 state of hooks.

FARPROC cbtHookProc = { (FARPROC) CBTFilterFunc }
 address for msg filter function.

bool ExcelMode = false
 address for CBT filter function.

HWND hwndUniGeez = NULL
 are we in Excel?? Shared DATA set up between UniGeez and the injected dll only one per instance of the UniGeez interface.

HHOOK hMsgHook = NULL
 main handle from UniGeez Transliterator.

HHOOK hCBTHook = NULL
 handle to the installed WH_GETMESSAGE hook.

HWND hCurrent = NULL
 handle to the installed WH_CBT hook.

HWND hFontDlg = NULL
bool useRtf = false
 handle to dialog box in UniGeez (not used) determines what format is to be used.

bool useHtml = false
bool useUnicode = true
int howmany = 0
int fs = 12
bool oneTimeReadFile = true
 used to determine font size format info read in from UniGeez userinterface window.

const int MAX_APPS = 100
const int MAX_CHARS = 80
char appName [MAX_APPS][MAX_CHARS] = {"\0"}
char format [MAX_APPS][MAX_CHARS] = {"\0"}
struct NTandWord NTandWord
 Filter function for the WH_GETMESSAGE. More...


Define Documentation

#define UNIGEEZLIBAPI   __declspec(dllexport)
 

#define msg   newMsg->message
 

#define wparam   newMsg->wParam
 


Function Documentation

LRESULT CALLBACK CBTFilterFunc ( INT nCode,
WPARAM wParam,
LPARAM lParam )
 

This hook catches the event of a window getting focus. It is used to determine when the user switches cursor focus; it takes the window's handle and traces it back up to its parent window. A determination is made on what clipboard format to use based on a format text file as the parents window's handle is compared to the handled returned from an application's name.

LRESULT CALLBACK CBTFilterFunc ( int nCode,
WPARAM wParam,
LPARAM lParam )
 

int CALLBACK InitHooksDll ( const HWND hwndMainWindow,
char _appName[][MAX_CH],
char _format[][MAX_CH],
const int _howmany )
 

BOOL WINAPI InstallFilter ( INT nCode )
 

BOOL CALLBACK LibMain ( HANDLE hModule,
DWORD dwReason,
LPVOID lpReserved )
 

HMODULE ModuleFromAddress ( PVOID pv ) [static]
 

LRESULT CALLBACK MsgFilterFunc ( INT nCode,
WPARAM wParam,
LPARAM lParam )
 

LRESULT CALLBACK MsgFilterFunc ( int nCode,
WPARAM wParam,
LPARAM lParam )
 

int CALLBACK setFontSize ( const int size,
HWND hDlg )
 


Variable Documentation

bool ExcelMode = false
 

BOOL InitCalled = FALSE
 

const int MAX_APPS = 100
 

const int MAX_CHARS = 80
 

struct NTandWord NTandWord [static]
 

this is where we intercept the Keystrokes that are taking place system-wide not only are we hooking the window with the cuurent focus, but we are also hooking anything running in the background!!!

char appName[MAX_APPS][MAX_CHARS] = {"\0"}
 

FARPROC cbtHookProc = { (FARPROC) CBTFilterFunc }
 

char format[MAX_APPS][MAX_CHARS] = {"\0"}
 

int fs = 12
 

HHOOK hCBTHook = NULL
 

HWND hCurrent = NULL
 

HWND hFontDlg = NULL
 

HANDLE hInstance
 

HHOOK hMsgHook = NULL
 

BOOL hookState = FALSE
 

int howmany = 0
 

HWND hwndUniGeez = NULL
 

FARPROC msgHookProc = { (FARPROC) MsgFilterFunc }
 

bool oneTimeReadFile = true
 

bool useHtml = false
 

bool useRtf = false
 

bool useUnicode = true
 


Generated at Tue Jan 30 17:03:28 2001 for UniGeez by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000