Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 73.0.0.0
Parameters
- progIDOrClassID
- Type: System String
A ProgID or ClassID that identifies the type of object to create.
Return Value
Type: ObjectThe object that was created.
Create an object in the event thread of this CogAcqFifo. This allows single-threaded objects to sink acquisition events efficiently.
This CogAcqFifo's event thread runs at a high priority, which means that the event handler you implement in the specified class will also run at a high priority. You should take care to limit the amount of processing time required to service events.
This function creates an object within the apartment of the acquisition FIFO's event thread but it does not actually connect the FIFO events to the object. In Visual Basic events are connected by assigning the FIFO to a WithEvents variable declared in the class that was created. For example if your event sink class (named MyInspection) contains the following code:
Public WithEvents AcqComplete As CogAcqCompleteEvent Private Sub AcqComplete_Complete(ByVal Ticket As Long, ByVal TriggerNumber As Long) Run the inspection now End SubYou would use the code shown below to create the event sink class and connect it to the acquisition FIFO event source when your program starts:
Dim FGs As New CogFrameGrabbers, AcqFifo As CogAcqFifo Set AcqFifo = FGs(0).CreateAcqFifo("Sony XC-75 640x480 IntDrv CCF") Dim Inspection As MyInspection Set Inspection = AcqFifo.CreateEventSink("MyProject.MyInspection") Set Inspection.AcqComplete = AcqFifoNote: If you wish to use this function to implement true multithreading in a Visual Basic 6 application, the object specified by progIDOrClassID must be defined in an ActiveX DLL project.