Initial
This commit is contained in:
45
hookproc/enumstation.hpp
Normal file
45
hookproc/enumstation.hpp
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef _HOOKPROC_ENUMWINDOWSTATIONHOOK_HPP_
|
||||
#define _HOOKPROC_ENUMWINDOWSTATIONHOOK_HPP_
|
||||
#ifndef _HOOKPROC_APIENTRY_HPP_
|
||||
#include <hookproc/apientry.hpp>
|
||||
#endif
|
||||
#ifndef _HOOKPROC_PROCADDRESS_HPP_
|
||||
#include <hookproc/procaddr.hpp>
|
||||
#endif
|
||||
|
||||
class EnumWindowStationHook;
|
||||
typedef ProcAddress<EnumWindowStationHook> EnumWindowStationHookProc;
|
||||
|
||||
class EnumWindowStationHook : protected APIEntry, private EnumWindowStationHookProc
|
||||
{
|
||||
public:
|
||||
typedef int (__stdcall *LPFNENUMWINDOWSTATIONPROC)(LPTSTR lpszWindowStation,LPARAM lParam);
|
||||
EnumWindowStationHook(void);
|
||||
virtual ~EnumWindowStationHook();
|
||||
DWORD getHookAddress(void);
|
||||
protected:
|
||||
virtual bool enumWindowStationProc(const String &strWindowStation);
|
||||
private:
|
||||
enum {ParamLength=8};
|
||||
EnumWindowStationHook &operator=(const EnumWindowStationHook &someEnumWindowStationHook);
|
||||
bool entryProc(LPTSTR lpszWIndowStation,LPARAM lParam);
|
||||
};
|
||||
|
||||
inline
|
||||
EnumWindowStationHook::EnumWindowStationHook(void)
|
||||
: APIEntry(ParamLength,(DWORD)this,getProcAddress((ProcAddress<EnumWindowStationHook>::LPFNMETHODVOID)&EnumWindowStationHook::entryProc))
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
EnumWindowStationHook &EnumWindowStationHook::operator=(const EnumWindowStationHook &someEnumWindowStationHook)
|
||||
{ // no implementation
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD EnumWindowStationHook::getHookAddress(void)
|
||||
{
|
||||
return codeBase();
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user