Initial
This commit is contained in:
55
hookproc/WindowStationEnumerator.hpp
Normal file
55
hookproc/WindowStationEnumerator.hpp
Normal file
@@ -0,0 +1,55 @@
|
||||
#ifndef _HOOKPROC_WINDOWSTATIONENUMERATOR_HPP_
|
||||
#define _HOOKPROC_WINDOWSTATIONENUMERATOR_HPP_
|
||||
#ifndef _HOOKPROC_ENUMWINDOWSTATIONHOOK_HPP_
|
||||
#include <hookproc/enumstation.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BLOCK_HPP_
|
||||
#include <common/block.hpp>
|
||||
#endif
|
||||
|
||||
class WindowStationEnumerator : public EnumWindowStationHook, public Block<String>
|
||||
{
|
||||
public:
|
||||
WindowStationEnumerator();
|
||||
virtual ~WindowStationEnumerator();
|
||||
bool enumerateWindowStations(void);
|
||||
DWORD size(void)const;
|
||||
protected:
|
||||
virtual bool enumWindowStationProc(const String &strWindowStation);
|
||||
private:
|
||||
};
|
||||
|
||||
inline
|
||||
WindowStationEnumerator::WindowStationEnumerator()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
WindowStationEnumerator::~WindowStationEnumerator()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
bool WindowStationEnumerator::enumerateWindowStations(void)
|
||||
{
|
||||
remove();
|
||||
::EnumWindowStations((LPFNENUMWINDOWSTATIONPROC)getHookAddress(),0L);
|
||||
return Block<String>::size()?true:false;
|
||||
}
|
||||
|
||||
inline
|
||||
bool WindowStationEnumerator::enumWindowStationProc(const String &strWindowStation)
|
||||
{
|
||||
insert(&strWindowStation);
|
||||
return true;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD WindowStationEnumerator::size(void)const
|
||||
{
|
||||
return Block<String>::size();
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user