File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 55
66namespace core
77{
8+ // ////////////////////////////////////////////////////////////////////////
9+ ST_IP_ADDRESS::ST_IP_ADDRESS (std::tstring strIP)
10+ {
11+ dwIP = core::IPAddressFrom (strIP.c_str ());
12+ }
13+
14+ // ////////////////////////////////////////////////////////////////////////
15+ std::tstring ST_IP_ADDRESS::MakeIPString (void )
16+ {
17+ return core::IPAddressFrom (dwIP);
18+ }
19+
820 // ////////////////////////////////////////////////////////////////////////
921 std::tstring GetWeekString (WORD wDayOfWeek)
1022 {
Original file line number Diff line number Diff line change 44#include " ../__Common/Type.h"
55
66#ifdef UNICODE
7+ #define MakeIPString MakeIPStringW
78#define IPAddressFrom IPAddressFromW
89#define GetWeekString GetWeekStringW
910#define GetMonthString GetMonthStringW
1011#define GetOSTypeString GetOSTypeStringW
1112#else
13+ #define MakeIPString MakeIPStringA
1214#define IPAddressFrom IPAddressFromA
1315#define GetWeekString GetWeekStringA
1416#define GetMonthString GetMonthStringA
1719
1820namespace core
1921{
22+ struct ST_IP_ADDRESS
23+ {
24+ union
25+ {
26+ DWORD dwIP;
27+ struct {
28+ BYTE addr[4 ];
29+ } ip;
30+ };
31+
32+ ST_IP_ADDRESS (std::string strIP);
33+ ST_IP_ADDRESS (std::wstring strIP);
34+ std::string MakeIPStringA (void );
35+ std::wstring MakeIPStringW (void );
36+ };
37+
2038 DWORD IPAddressFromA (const char * pszIP);
2139 DWORD IPAddressFromW (const wchar_t * pszIP);
2240 std::string IPAddressFromA (DWORD dwIP);
You can’t perform that action at this time.
0 commit comments