ICP  1
nxlog.cpp
Go to the documentation of this file.
1 // nxlog.cpp : Implementation of Cnxlog
2 
3 #include "stdafx.h"
4 #include "nxlog.h"
5 #include "nxlogger.h"
6 
7 
8 // Cnxlog
9 
10 STDMETHODIMP Cnxlog::InterfaceSupportsErrorInfo(REFIID riid)
11 {
12  static const IID* arr[] =
13  {
14  &IID_Inxlog
15  };
16 
17  for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
18  {
19  if (InlineIsEqualGUID(*arr[i],riid))
20  return S_OK;
21  }
22  return S_FALSE;
23 }
24 
25 STDMETHODIMP Cnxlog::addLog(LONG run_number, BSTR source, BSTR log_name, BSTR start_time, VARIANT time_array, BSTR time_units, VARIANT value_array, BSTR value_units)
26 {
27  AFX_MANAGE_STATE(AfxGetStaticModuleState());
28  if (test_nxlogger() == 0)
29  {
30  return S_OK;
31  }
32  else
33  {
34  return AtlReportError(GetObjectCLSID(), "error");
35  }
36 }
int __stdcall test_nxlogger()
Definition: nxlogger.cpp:28
HRESULT addLog(LONG run_number, BSTR source, BSTR log_name, BSTR start_time, VARIANT time_array, BSTR time_units, VARIANT value_array, BSTR value_units)
Definition: nxlog.cpp:25
HRESULT InterfaceSupportsErrorInfo(REFIID riid)
Definition: nxlog.cpp:10