Teledyne-lecroy FireInspector Automation Application Programming I Instrukcja Użytkownika Strona 14

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 92
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 13
10
FireInspector Automation User’s Manual
CATC Version 1.0
2.3.3 IAnalyzer::OpenFile
Opens trace file.
Syntax
HRESULT OpenFile (
[in] BSTR file_name,
[out, retval] IDispatch** trace );
Parameters
file_name string providing the full pathname to trace file
trace address of a pointer to the FwTrace object primary interface
Return values
ANALYZERCOMERROR_UNABLEOPENFILEunable to open file
Remarks
FwTrace
object is created via this method call, if call was successful.
Example
WSH:
CurrentDir = Left(WScript.ScriptFullName,
InstrRev(WScript.ScriptFullName, "\"))
Set Analyzer = WScript.CreateObject("CATC.FwAnalyzer")
Set Trace = Analyzer.OpenFile (CurrentDir &
"Input\errors.fdb")
C++:
HRESULT hr;
IFwAnalyzer* poFwAnalyzer;
// create FwAnalyzer object
if ( FAILED( CoCreateInstance(
CLSID_FwAnalyzer,
NULL, CLSCTX_SERVER,
IID_IFwAnalyzer,
(LPVOID *)&poFwAnalyzer ) )
return;
// open trace file
IDispatch* trace;
try
{
trace = poFwAnalyzer->OpenFile( m_szRecFileName );
}
catch ( _com_error& er)
{
if (er.Description().length() > 0)
::MessageBox( NULL, er.Description(), _T("FwAnalyzer
client"), MB_OK );
else
::MessageBox( NULL, er.ErrorMessage(), _T("FwAnalyzer
client"), MB_OK );
return 1;
Przeglądanie stron 13
1 2 ... 9 10 11 12 13 14 15 16 17 18 19 ... 91 92

Komentarze do niniejszej Instrukcji

Brak uwag