Teledyne-lecroy SAS_SATA Automation API manual Instrukcja Użytkownika Strona 141

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 150
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 140
AutomationAPIforTeledyneLeCroySAS/SATAProtocolSuite 135
SASAnalyzerObjectEvents
TeledyneLeCroy
SASAnalyzer Object Events
_ISASAnalyzerEvents Dispinterface
ToretrievetheeventsfromaSASAnalyzerobject,youmustimplementthe
_ISASAnalyzerEventsinterface.Sincethisinterfaceisthedefaultsourceinterfaceforthe
SASAnalyzerobject,thereisaverysimpleimplementationfromlanguagessuchas
Visual Basic,VBA,VBScript,andWSH.
Somescriptenginesimposerestrictionsonhandling eventsfromindirectautomation
objectsintypelessscriptlanguages(whentheautomationinterfacetotheobjectis
obtainedfromacallofsomemethod,ratherthanfromacreationfunction,suchas
CreateObject()inVBScript).TheTeledyneLeCroySAS/SATAProtocolSuiteapplication
providesaspecialCOMclass,allowingreceivingandhandlingnotificationsfromtheVSE
objecteveninscriptlanguagesnotsupportingeventhandlingfrom"indirect"objects.
TheC++implementationusedintheexamplesbelowutilizesasinkobjectbyderivingit
fromIdis pEventImpl,butnotspecifyingthetypelibraryasatemplateargument.Instead,
thetypelibraryanddefaultsourceinterfacefortheobjectaredeterminedusing
AtlGetObjectSourceInterface().
ASINK_ENTRY()macroisusedforeacheventfromeachsourceinterfacethatistobe
handled:
class CAnalyzerSink : public IDispEventImpl<IDC_SRCOBJ,
CAnalyzerSink>
{
BEGIN_SINK_MAP(CAnalyzerSink)
// Make sure the Event Handlers have __stdcall calling
convention.
SINK_ENTRY(IDC_SRCOBJ, 1, OnTraceCreated)
SINK_ENTRY(IDC_SRCOBJ, 2, OnStatusReport)
END_SINK_MAP()
. . .
}
Przeglądanie stron 140
1 2 ... 136 137 138 139 140 141 142 143 144 145 146 ... 149 150

Komentarze do niniejszej Instrukcji

Brak uwag