-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathagent.cpp
More file actions
executable file
·36 lines (28 loc) · 872 Bytes
/
agent.cpp
File metadata and controls
executable file
·36 lines (28 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "stdafx.h"
#include "sysinv.h"
#include "version.h"
#define _TOWIDE(x) L ## x
#define TOWIDE(x) _TOWIDE(x)
PNODE GetAgentDetail()
{
PNODE agentNode = node_alloc(_T("Agent"), 0);
TCHAR buffer[MAX_PATH + 1];
node_att_set(agentNode, _T("Name"), TOWIDE(VER_PRODUCTNAME_STR), 0);
swprintf_s(buffer, L"%u.%u.%u.%u", VER_PRODUCT_VERSION);
node_att_set(agentNode, _T("Version"), buffer, 0);
/* Nope...
swprintf_s(buffer, L"%s %s", __DATE__, __TIME__);
node_att_set(agentNode, _T("BuildDate"), buffer, 0);
*/
#if _DEBUG
node_att_set(agentNode, _T("Build"), _T("Debug"), 0);
#else
node_att_set(agentNode, _T("Build"), _T("Release"), 0);
#endif
#if _WIN64
node_att_set(agentNode, _T("Architecture"), _T("64bit"), 0);
#else
node_att_set(agentNode, _T("Architecture"), _T("32bit"), 0);
#endif
return agentNode;
}