Iuwbanalyzer::get_applicationdatafolder (property) – Teledyne LeCroy UWBTracer Automation Manual User Manual
Page 9

LeCroy
UWBTracer Automation API Reference Manual
Manual Version 3.02
5
3.1.2 IUwbAnalyzer::get_ApplicationDataFolder (property)
HRESULT get_ApplicationDataFolder( [out, retval] BSTR *app_folder );
Retrieves the full local path to the folder where user-alterable data goes, such as scripts, traces, and
default options files.
Parameters
app_folder
Pointer to string variable indicating the
UWBTracer user-modifiable data folder
Return values
Remarks
This property allows client applications to access some important files used by the UWBTracer
application, such as recording options, display options, and trace files. in places relative to the
UWBTracer application folder, Windows XP Documents and Settings\All Users folder, and
Windows Vista Users\Public folder. If sometime later the UWBTracer application is re-installed to another
location, the client code does not have to be changed to reflect this event.
Example
WSH:
Set Analyzer = WScript.CreateObject("CATC.UwbAnalyzer")
'Open trace file 'some_trace.uwb' in a user-modiable folder.
Set Trace = Analyzer.OpenFile( Analyzer. ApplicationDataFolder & "some_trace.uwb" )
'Save opened trace as 'some_trace1.uwb' in a user-modiable folder.
Trace.Save Analyzer. ApplicationDataFolder & "some_trace1.uwb"
...
C++:
HRESULT hr;
IUwbAnalyzer* poUwbAnalyzer;
// create UwbAnalyzer object
if ( FAILED( CoCreateInstance( CLSID_UwbAnalyzer, NULL, CLSCTX_SERVER, IID_IUwbAnalyzer,
(LPVOID *)&poUwbAnalyzer ) )
return;
BSTR app_folder;
hr = poUwbAnalyzer->get_ApplicationDataFolder( &app_folder );
// . . . Do something with app_folder
SysFreeString( app_folder ); // Free BSTR resources
poUwbAnalyzer->Release(); // Release analyzer object