Data Sheet

Teledyne LeCroy Automation API Reference Manual for USBTracer, USB Advisor, and Voyager USB Protocol
Suite
28
2.1.13 IUsbAnalyzer::get_ApplicationDataFolder (property)
HRESULT get_ApplicationDataFolder( [out, retval] BSTR *app_folder );
Retrieves the full local path to the folder for user-alterable data, such as scripts, traces, and default
options files.
Parameters
app_folder Pointer to string variable indicating the
USB Protocol Suite user-modifiable data folder
Return values
Remarks
This property allows client applications to access some important files used by the USB Protocol Suite
application, such as recording options, display options, and trace files, in places relative to the USB
Protocol Suite application folder, Windows XP Documents and Settings\All Users folder, and
Windows Vista Users\Public folder. If later the USB Protocol Suite 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.UsbTracer")
' Open trace file 'some_trace.usb' in a user-modiable folder.
Set Trace = Analyzer.OpenFile(Analyzer. ApplicationDataFolder & "some_trace.usb")
' Save opened trace as 'some_trace1.usb' in a user-modiable folder.
Trace.Save Analyzer. ApplicationDataFolder & "some_trace1.usb"
...
C++:
HRESULT hr;
IUsbAnalyzer* poUsbAnalyzer;
// Create UsbAnalyzer object.
if ( FAILED( CoCreateInstance( CLSID_UsbAdvisor, NULL, CLSCTX_SERVER,
IID_IUsbAnalyzer, (LPVOID *)&poUsbAnalyzer ) )
return;
BSTR app_folder;
hr = poUsbAnalyzer->get_ApplicationDataFolder( &app_folder );
// . . . Do something with app_folder.
SysFreeString( app_folder ); // Free BSTR resources.
poUsbAnalyzer->Release(); // Release analyzer object.