Files
Work/common/STARTI~1.HPP
2024-08-07 09:09:36 -04:00

152 lines
2.8 KiB
C++

#ifndef _COMMON_STARTUPINFO_HPP_
#define _COMMON_STARTUPINFO_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#ifndef _COMMON_RECTANGLE_HPP_
#include <common/rect.hpp>
#endif
class StartupInfo : private STARTUPINFO
{
public:
StartupInfo(void);
virtual ~StartupInfo();
String strDesktop(void)const;
String strTitle(void)const;
Rect initRect(void)const;
DWORD xCountChars(void)const;
DWORD yCountChars(void)const;
DWORD fillAttribute(void)const;
DWORD flags(void)const;
WORD showWindow(void)const;
HANDLE stdInput(void)const;
HANDLE stdOutput(void)const;
HANDLE stdError(void)const;
private:
StartupInfo(const StartupInfo &startupInfo);
StartupInfo &operator=(const StartupInfo &startupInfo);
BOOL operator==(const StartupInfo &startupInfo)const;
void init(void);
};
inline
StartupInfo::StartupInfo(void)
{
init();
::GetStartupInfo(&((STARTUPINFO&)*this));
}
inline
StartupInfo::StartupInfo(const StartupInfo &startupInfo)
{ // private implementation
*this=startupInfo;
}
inline
StartupInfo::~StartupInfo()
{
}
inline
StartupInfo &StartupInfo::operator=(const StartupInfo &/*startupInfo*/)
{ // private implementation
return *this;
}
inline
BOOL StartupInfo::operator==(const StartupInfo &startupInfo)const
{ // private implementation
return FALSE;
}
inline
String StartupInfo::strDesktop(void)const
{
return STARTUPINFO::lpDesktop;
}
inline
String StartupInfo::strTitle(void)const
{
return STARTUPINFO::lpTitle;
}
inline
Rect StartupInfo::initRect(void)const
{
return Rect(STARTUPINFO::dwX,STARTUPINFO::dwY,STARTUPINFO::dwXSize,STARTUPINFO::dwYSize);
}
inline
DWORD StartupInfo::xCountChars(void)const
{
return STARTUPINFO::dwXCountChars;
}
inline
DWORD StartupInfo::yCountChars(void)const
{
return STARTUPINFO::dwYCountChars;
}
inline
DWORD StartupInfo::fillAttribute(void)const
{
return STARTUPINFO::dwFillAttribute;
}
inline
DWORD StartupInfo::flags(void)const
{
return STARTUPINFO::dwFlags;
}
inline
WORD StartupInfo::showWindow(void)const
{
return STARTUPINFO::wShowWindow;
}
inline
HANDLE StartupInfo::stdInput(void)const
{
return STARTUPINFO::hStdInput;
}
inline
HANDLE StartupInfo::stdOutput(void)const
{
return STARTUPINFO::hStdOutput;
}
inline
HANDLE StartupInfo::stdError(void)const
{
return STARTUPINFO::hStdError;
}
inline
void StartupInfo::init(void)
{
STARTUPINFO::cb=sizeof(STARTUPINFO);
STARTUPINFO::lpReserved=0;
STARTUPINFO::lpDesktop=0;
STARTUPINFO::lpTitle=0;
STARTUPINFO::dwX=0;
STARTUPINFO::dwY=0;
STARTUPINFO::dwXSize=0;
STARTUPINFO::dwYSize=0;
STARTUPINFO::dwXCountChars=0;
STARTUPINFO::dwYCountChars=0;
STARTUPINFO::dwFillAttribute=0;
STARTUPINFO::dwFlags=0;
STARTUPINFO::wShowWindow=0;
STARTUPINFO::cbReserved2=0;
STARTUPINFO::lpReserved2=0;
STARTUPINFO::hStdInput=0;
STARTUPINFO::hStdOutput=0;
STARTUPINFO::hStdError=0;
}
#endif