14 #if defined(_WIN32_WCE) && !defined(_CE_DCOM) && !defined(_CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA)
15 #error "Single-threaded COM objects are not properly supported on Windows CE platform, such as the Windows Mobile platforms that do not include full DCOM support. Define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA to force ATL to support creating single-thread COM object's and allow use of it's single-threaded COM object implementations. The threading model in your rgs file was set to 'Free' as that is the only threading model supported in non DCOM Windows CE platforms."
25 public CComObjectRootEx<CComMultiThreadModel>,
26 public CComCoClass<Csession, &CLSID_session>,
27 public ISupportErrorInfo,
28 public IConnectionPointContainerImpl<Csession>,
30 public IDispatchImpl<Isession, &IID_Isession, &LIBID_instapiLib, 1, 0>
45 COM_INTERFACE_ENTRY(Isession)
46 COM_INTERFACE_ENTRY(IDispatch)
47 COM_INTERFACE_ENTRY(ISupportErrorInfo)
48 COM_INTERFACE_ENTRY(IConnectionPointContainer)
52 CONNECTION_POINT_ENTRY(__uuidof(_IsessionEvents))
53 END_CONNECTION_POINT_MAP()
55 STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
58 DECLARE_PROTECT_FINAL_CONSTRUCT()
60 HRESULT FinalConstruct()
72 STDMETHOD(get_role)(BSTR* pVal);
73 STDMETHOD(put_role)(BSTR newVal);
74 STDMETHOD(getMessages)(LONG start_index, BSTR min_severity, VARIANT* times, VARIANT* severities, VARIANT* messages, LONG* end_index);
75 STDMETHOD(putMessage)(BSTR time, BSTR severity, BSTR message);
76 STDMETHOD(getBlock)(BSTR block_name, Iblock** block);
77 STDMETHOD(getBlockNames)(VARIANT* block_names);
78 STDMETHOD(get_session_id)(ULONG* pVal);
79 STDMETHOD(put_session_id)(ULONG newVal);
80 STDMETHOD(getLabviewVar)(BSTR vi_name, BSTR control_name, VARIANT* value);
81 STDMETHOD(setLabviewVar)(BSTR vi_name, BSTR control_name, VARIANT new_value);
82 STDMETHOD(setLabviewVarExt)(BSTR vi_name, BSTR control_name, VARIANT new_value, VARIANT* results);
83 STDMETHOD(callLabview)(BSTR vi_name, VARIANT names, VARIANT values, VARIANT_BOOL reentrant, VARIANT* results);
84 STDMETHOD(toggleViVisibility)(BSTR vi_name, VARIANT_BOOL show);
85 STDMETHOD(getViState)(BSTR vi_name, VARIANT* value);
86 STDMETHOD(startVi)(BSTR vi_name);
87 STDMETHOD(stopVi)(BSTR vi_name);
88 STDMETHOD(closeViFrontPanel)(BSTR vi_name);
89 STDMETHOD(beginRun)(LONG period, VARIANT_BOOL wait, VARIANT_BOOL quiet, VARIANT_BOOL paused, BSTR* messages);
90 STDMETHOD(abortRun)(BSTR* messages);
91 STDMETHOD(endRun)(BSTR* messages);
92 STDMETHOD(getRunState)(BSTR* messages, LONG* status);
93 STDMETHOD(pauseRun)(BSTR* messages);
94 STDMETHOD(resumeRun)(BSTR* messages);
95 STDMETHOD(recoverRun)(BSTR* messages);
96 STDMETHOD(saveRun)(BSTR* messages);
97 STDMETHOD(updateCRPT)(BSTR* messages);
98 STDMETHOD(storeCRPT)(BSTR* messages);
99 STDMETHOD(getGoodFrames)(VARIANT_BOOL curr_period, BSTR* messages, LONG* frames);
100 STDMETHOD(getUamps)(VARIANT_BOOL curr_period, BSTR* messages, DOUBLE* uamps);
101 STDMETHOD(getMEvents)(BSTR* messages, DOUBLE* mev);
102 STDMETHOD(getCurrentPeriod)(LONG* daq_period, BSTR* messages, LONG *period);
103 STDMETHOD(getRunNumber)(BSTR* messages, LONG* run_no);
104 STDMETHOD(getTotalCounts)(BSTR* messages, LONG* counts);
105 STDMETHOD(snapshotCRPT)(BSTR filename, LONG do_update, LONG do_pause, BSTR* messages);
106 STDMETHOD(sumAllHistogramMemory)(BSTR* messages, LONG* counts);
107 STDMETHOD(sumAllSpectra)(LONG* bin_counts, BSTR* messages, LONG* counts);
108 STDMETHOD(setRBNumber)(VARIANT rb_no);
109 STDMETHOD(getRBNumber)(VARIANT* rb_no);
110 STDMETHOD(setPeriod)(LONG period_number, BSTR* messages);
111 STDMETHOD(setTitle)(VARIANT title);
112 STDMETHOD(getSpectrum)(LONG spectrum_no, LONG period, VARIANT_BOOL as_dist, VARIANT* time_channels, VARIANT* signal, LONG* sum, BSTR* messages);
113 STDMETHOD(changeNumberOfSoftwarePeriods)(LONG num_periods, BSTR* messages);
114 STDMETHOD(getNumberOfPeriods)(BSTR* messages, LONG* num_periods);
115 STDMETHOD(setBeamlineParameter)(VARIANT name, VARIANT value, VARIANT units);
116 STDMETHOD(deleteBeamlineParameter)(VARIANT name);
117 STDMETHOD(getBeamlineParameter)(BSTR name, BSTR* units, BSTR* type, BSTR* value);
118 STDMETHOD(getBeamlineParameterNames)(VARIANT* names);
119 STDMETHOD(vmeWriteValue)(ULONG card_id, ULONG card_address, ULONG word_size, ULONG value, ULONG mode, BSTR* messages);
120 STDMETHOD(setSampleParameter)(VARIANT name, VARIANT value, VARIANT units);
121 STDMETHOD(deleteSampleParameter)(VARIANT name);
122 STDMETHOD(getSampleParameter)(BSTR name, BSTR* units, BSTR* type, BSTR* value);
123 STDMETHOD(getSampleParameterNames)(VARIANT* names);
124 STDMETHOD(deleteAllBeamlineParameters)();
125 STDMETHOD(deleteAllSampleParameters)();
126 STDMETHOD(getSeciConfig)(BSTR* name);
127 STDMETHOD(clearSeciGraphs)();
128 STDMETHOD(clearDatabaseLogs)(
int run_number);
129 STDMETHOD(clearLogFiles)(
int run_number, BSTR path);
130 STDMETHOD(getMeasurementLabel)(BSTR id, BSTR* label);
131 STDMETHOD(setMeasurementLabel)(BSTR id, BSTR label);
132 STDMETHOD(getMeasurementId)(BSTR label, VARIANT_BOOL newId, BSTR* id);
133 STDMETHOD(getViNames)(VARIANT* names);
134 STDMETHOD(logBlocksNow)(BSTR source);
135 STDMETHOD(changeSeciConfiguration)(BSTR vi_name, VARIANT_BOOL* result);
136 STDMETHOD(isSeciBusy)(VARIANT_BOOL* result);
139 OBJECT_ENTRY_AUTO(__uuidof(session),
Csession)
void deleteSession(ULONG session_id)
unsigned long m_session_id
0 is an invalid session
HRESULT callInstAPILib(T *obj, instapi_lib_call_t func)