Teledyne-lecroy SAS_SATA Automation API manual Manual de usuario Pagina 141

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 150
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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()
. . .
}
Vista de pagina 140
1 2 ... 136 137 138 139 140 141 142 143 144 145 146 ... 149 150

Comentarios a estos manuales

Sin comentarios