31 lines
794 B
C++
31 lines
794 B
C++
#pragma once
|
|
|
|
#include <iostream>
|
|
#include <Windows.h>
|
|
#include "define.h"
|
|
|
|
//WinExec 사용시 매개변수를 파싱한는 클래스.
|
|
class DLL_DECLARE CParameterPaser
|
|
{
|
|
private:
|
|
char m_szPath[MAX_PATH_SIZE];
|
|
char m_szIP[MAX_PATH_SIZE];
|
|
char m_szID[DEFAULT_BUFFER_SIZE];
|
|
char m_szPass[DEFAULT_BUFFER_SIZE];
|
|
int m_nProtocol;
|
|
int m_nPort;
|
|
BOOL m_bPasing;
|
|
char m_szValue[MAX_PARAM_COUNT][MAX_PATH_SIZE];
|
|
int m_nCntParam;
|
|
|
|
public:
|
|
CParameterPaser(void);
|
|
~CParameterPaser(void);
|
|
|
|
public:
|
|
BOOL ParseCommandLine (const char* lpszCmdLine); //매개변수를 분석한다.
|
|
BOOL CheckParameter(); //분석한 매개변수를 체크한다.
|
|
void GetParameterInfo( char* pszValue, int nSize, int nParam );
|
|
int GetParameterCount(){ return m_nCntParam; } // 현재 파라미터의 개수를 리턴한다.
|
|
};
|