beautypg.com

1 iuwbanalyzer::get_applicationfolder (property), Iuwbanalyzer::get_applicationfolder (property) – Teledyne LeCroy UWBTracer Automation Manual User Manual

Page 8

background image

LeCroy

UWBTracer Automation API Reference Manual

Manual Version 3.02

4

3.1.1 IUwbAnalyzer::get_ApplicationFolder (property)

HRESULT get_ApplicationFolder( [out, retval] BSTR *app_folder );


Retrieves the full local path to the folder where the UWBTracer application was installed and registered
as a COM server.

Parameters

app_folder

Pointer to string variable indicating the UWBTracer application 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. 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 the UWBTracer folder.
Set Trace = Analyzer.OpenFile( Analyzer.ApplicationFolder & "some_trace.uwb" )

'Save opened trace as 'some_trace1.uwb' in the UWBTracer folder.
Trace.Save Analyzer.ApplicationFolder & "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_ApplicationFolder( &app_folder );

// . . . Do something with app_folder


SysFreeString( app_folder ); // Free BSTR resources
poUwbAnalyzer->Release(); // Release analyzer object