Closed Raj123456788 closed 4 years ago
Windows SDK or WDK.
Check the Windows driver samples repo from Microsoft for info.
I have installed both?
Please answer if possible?
Check your include directories and try to build Debug/x86.
The files are there but Still same issue
Please send me your project property pages. I can try to have the same environment as yours.
I tried this You need to add WDK headers path to your vcxproj include directories: vcxproj properties -> C/C++ -> General -> Additional Include Directories
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\km
Now I am getting below error now. 1>------ Rebuild All started: Project: avshws, Configuration: Debug Win32 ------ 1>capture.cpp 1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\ntdef.h(201,1): fatal error C1189: #error: "No Target Architecture" 1>device.cpp 1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\ntdef.h(201,1): fatal error C1189: #error: "No Target Architecture" 1>filter.cpp 1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\ntdef.h(201,1): fatal error C1189: #error: "No Target Architecture" 1>hwsim.cpp 1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\ntdef.h(201,1): fatal error C1189: #error: "No Target Architecture" 1>image.cpp 1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\ntdef.h(201,1): fatal error C1189: #error: "No Target Architecture" 1>Generating Code... 1>Done building project "avshws.vcxproj" -- FAILED. 1> 1>Project Performance Summary: 1> 613 ms C:\Users\rkulkarni\Downloads\VirtualCameraDriver-master\Driver\avshws\avshws.vcxproj 1 calls 1> 1>Target Performance Summary: 1> 0 ms BeforeClCompile 1 calls 1> 0 ms GetResolvedWinMD 1 calls 1> 0 ms _CheckWindowsSDKInstalled 1 calls 1> 0 ms SetCABuildNativeEnvironmentVariables 1 calls 1> 0 ms BuildCompileTraverse 1 calls 1> 0 ms ExpandSDKReferences 1 calls 1> 0 ms AfterResolveReferences 1 calls 1> 0 ms BuildGenerateSources 1 calls 1> 0 ms InitializeBuildStatus 1 calls 1> 0 ms BuildGenerateSourcesTraverse 1 calls 1> 0 ms BeforeBuildGenerateSources 1 calls 1> 0 ms PreBuildEvent 1 calls 1> 0 ms _SelectedFiles 1 calls 1> 0 ms SelectCustomBuild 1 calls 1> 0 ms ComputeCustomBuildOutput 1 calls 1> 0 ms CopyFileToFolders 1 calls 1> 0 ms _Xsd 1 calls 1> 0 ms MakeDirsForMidl 1 calls 1> 0 ms ComputeMIDLGeneratedCompileInputs 1 calls 1> 0 ms AfterMidl 1 calls 1> 0 ms _Midl 1 calls 1> 0 ms AfterBuildGenerateSources 1 calls 1> 0 ms AfterBuildGenerateSourcesEvent 1 calls 1> 0 ms ComputeCLInputPDBName 1 calls 1> 0 ms _BuildGenerateSourcesAction 1 calls 1> 0 ms ResolveProjectReferences 1 calls 1> 0 ms MakeDirsForCl 1 calls 1> 0 ms _PrepareForRebuild 1 calls 1> 0 ms BeforeRebuild 1 calls 1> 0 ms _PrepareForClean 1 calls 1> 0 ms BeforeClean 1 calls 1> 0 ms FixupCLCompileOptions 1 calls 1> 0 ms AssignProjectConfiguration 1 calls 1> 0 ms _SplitProjectReferencesByFileExistence 1 calls 1> 0 ms PrepareProjectReferences 1 calls 1> 0 ms CleanReferencedProjects 1 calls 1> 0 ms GetFrameworkPaths 1 calls 1> 0 ms ComputeReferenceCLInput 1 calls 1> 0 ms BeforeCppClean 1 calls 1> 0 ms FindReferenceAssembliesForReferences 1 calls 1> 0 ms AfterCppClean 1 calls 1> 0 ms PGInstrumentedClean 1 calls 1> 0 ms CppClean 1 calls 1> 0 ms Clean 1 calls 1> 0 ms _PrepareForBuild 1 calls 1> 0 ms _PrepareForReferenceResolution 1 calls 1> 0 ms BeforeResolveReferences 1 calls 1> 0 ms AfterClean 1 calls 1> 1 ms _CheckForInvalidConfigurationAndPlatform 1 calls 1> 1 ms SelectClCompile 1 calls 1> 1 ms WarnCompileDuplicatedFilename 1 calls 1> 1 ms ResolveAssemblyReferences 1 calls 1> 1 ms CustomBuild 1 calls 1> 1 ms ResolveSDKReferences 1 calls 1> 1 ms GetReferenceAssemblyPaths 1 calls 1> 1 ms CoreCppClean 1 calls 1> 1 ms CleanPublishFolder 1 calls 1> 1 ms _GetProjectReferenceTargetFrameworkProperties 1 calls 1> 1 ms SetTelemetryEnvironmentVariables 1 calls 1> 2 ms PrepareForBuild 1 calls 1> 2 ms SetBuildDefaultEnvironmentVariables 1 calls 1> 2 ms ResolveReferences 1 calls 1> 3 ms CoreClean 1 calls 1> 581 ms ClCompile 1 calls 1> 1>Task Performance Summary: 1> 0 ms Delete 4 calls 1> 0 ms ReadLinesFromFile 2 calls 1> 0 ms FindUnderPath 2 calls 1> 0 ms RemoveDuplicates 1 calls 1> 0 ms MakeDir 7 calls 1> 0 ms WriteLinesToFile 3 calls 1> 0 ms AssignProjectConfiguration 1 calls 1> 0 ms MSBuild 1 calls 1> 0 ms CppClean 1 calls 1> 0 ms CheckVCToolsetVersion 1 calls 1> 0 ms Touch 1 calls 1> 1 ms Message 2 calls 1> 1 ms GetOutOfDateItems 3 calls 1> 2 ms SetEnv 8 calls 1> 581 ms CL 1 calls
My "property pages" are in the project file. (https://github.com/robot9706/VirtualCameraDriver/blob/master/Driver/avshws/avshws.vcxproj)
I don't know why it doesn't compile for you. I'm think it's some environment issue. Try compiling a driver from the Microsoft Windows driver samples and follow their tutorial if that works, then this will work too.
I tried running the UserDriverStaticImage It is giving runtime error also EDSDKLib is missing. My purpose is to send a static image to this driver. How can I install this driver and send the static images?
Able to compile now. bcdedit.exe -set TESTSIGNING ON I ran this on command line and installed from .inf file but it still does not install the driver. I don't see the GUID in that userdriverstaticimage dropdown. Almost there please suggest.
It should also show in DeviceManager as well.
If you'd read the readme you'd know that:
UserDriverCanon: This application can push the live view of a Canon EOS camera to the driver, essentially turning it into a webcam. EDSDK not included in this repository!
You also need to copy the DriverInterface.dll to the directory of the app you are trying to use, because it's not found there.
Also if you managed to build the driver, then again from the readme:
After building the driver (Windows SDK and Windows Driver Kit required) the inf can be installed using hdwwiz.exe (can be launched in CMD).
I tried that too on Win 10
You might need to generate your own key to sign the driver, and install that key to the top level thrusted certificate store (or something like that), also you can only use these drivers if your Windows is in test mode.
You can also check the logfile of the driver installer, it's something like C:\Windows\INF
it's called setupapi.dev.log
.
Got it working had to build it as 64bit and it works and shows the image. One last thing EDSDK not included in this repository.Can you please give me the link to download or tell me how can I get one.
You can find it on GitHub, but you only need it if you have a Canon EOS camera that you want to use as a video source.
Thank you very much for your help!
You might also need to install the EOS utility to grab the native DLLs for the EDSDK since it's just a wrapper.
Also the are multiple versions of EDSDK, the one used by this project is called EDSDKLib
(For example this could work). I cannot include the SDK in this repo because of licensing issues.
Hey Buddy, I am trying to create a add so that angular apps can also use it. I am getting DeviceEnumeration.obj : error LNK2001: unresolved external symbol IID_IBaseFilter DeviceEnumeration.obj : error LNK2001: unresolved external symbol CLSID_SystemDeviceEnum DeviceEnumeration.obj : error LNK2001: unresolved external symbol CLSID_VideoInputDeviceCategory
Can you educate me what are these symbols?
Those are system device enumerator GUIDs, they are part of the Windows SDK (strmiids.lib).
Hey Buddy, need your help. I am callingin C++: SSetDevice("@device:pnp:\\?\root#unknown#0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global", 80); It is returning 0 why? I just got the string from GetDevicePath. Works in wpf app. What is that I am missing. stuck since 2 days man :( why activeDevice->Init() false?
tell me what should I pass in SetDevice for SetDevice to return 1? I got the above value from your wpf app.
No idea... step through the code to see what goes wrong.
Cannot step through since I am calling from JavaScript.Apart from Init() is there anything I need to do before calling SetDevice?
Nothing afaik, but the threads need to be MTA for the COM interface to work.
Thanks for the help. I have a request trying to write below C# code in C++ : Can you suggest something(my input is .png) public static bool SetData(IntPtr data, int stride, int width, int height, string opffilename) {
Bitmap videoBuffer = new Bitmap(opffilename);
BitmapData imageLock = videoBuffer.LockBits(new Rectangle(0, 0, videoBuffer.Width, videoBuffer.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb);
return (Native.SetBuffer(imageLock.Scan0, imageLock.Stride, imageLock.Width, imageLock.Height) > 0);
//return (Native.SetBuffer(data, stride, width, height) > 0);
}
Do I need to edit the driverInterace.cpp? This will be really helpful.
I figured it out. Thanks!
still seeing issue with by any chance Bitmap videoBuffer = new Bitmap(opffilename); BitmapData imageLock = videoBuffer.LockBits(new Rectangle(0, 0, videoBuffer.Width, videoBuffer.Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb); return (Native.SetBuffer(imageLock.Scan0, imageLock.Stride, imageLock.Width, imageLock.Height) > 0); //return (Native.SetBuffer(data, stride, width, height) > 0); } C++ equivalent that I can add to DriverInterface.cpp?
Please let me know what I am missing?