I changed that sample to turn on the virtual camera at the start of the btStart_Click handler.
That seems to run okay and it does create the virtual camera, but I do get the errors
[ComHelper][LoadModule] Unable to load filter module, file does not exists: VisioForge_Virtual_Camera_x64.ax
[FilterGraphTools][AddFilterFromRedist] Unable to create filter (from file): VisioForge Virtual Camera Sink. Please check Deployment on the product page.
[FilterGraphTools][AddFilterFromClsidOrFile] Unable to add filter from file VisioForge Virtual Camera Sink. Trying to add using CLSID.
[ComHelper][LoadModule] Unable to load filter module, file does not exists: VisioForge_Virtual_Audio_Card_x64.ax
[FilterGraphTools][AddFilterFromRedist] Unable to create filter (from file): VisioForge Virtual Audio Card Sink. Please check Deployment on the product page.
[FilterGraphTools][AddFilterFromClsidOrFile] Unable to add filter from file VisioForge Virtual Audio Card Sink. Trying to add using CLSID.
However, these errors have no visible effect (that I can see) in the sample.
BUT, when I run my test program and try to use the virtual camera as the capture source, then I do get an erro in my program.
ln this case, when I select the virtual camera as the capture source I get the errors.
[ComHelper][LoadModule] Unable to load filter module, file does not exists: VisioForge_Virtual_Camera_x64.ax
[FilterGraphTools][AddFilterFromRedist] Unable to create filter (from file): VisioForge Virtual Camera Source. Please check Deployment on the product page.
[FilterGraphTools][AddFilterFromClsidOrFile] Unable to add filter from file VisioForge Virtual Camera Source. Trying to add using CLSID.
(I must have some sort of common error regarding filters. Like a path issue?)
But the program si still able to run. But when I start the capture then I get a fatal exception
An unhandled exception of type 'System.AccessViolationException' occurred in VisioForge.Core.dll
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Oh. I now see I am also getting the error (through the SDH's OnError callback) of
[DSVideoCaptureSource][SetVideoFormat] Bad video capture format.
But I do set the capture format to a valid enry for the (virtual) cam. Its "1024x768 YUY2, 16 bit"