DirectShow Graph::RenderFile --> VFW_E_NOT_FOUND with rebuilt project - c++

After I have reinstalled VC++ 2008 during my yearly cleanup on my PC, my multimedia project that compiled and worked without a problem, seems to produce a strange error:
The application basically is a media player and uses DirectShow. I already retried it with the standard example of MSDN "HOW TO PLAY A FILE" and appearently the error happens at this line:
hr = pGraph->RenderFile(L"C:\\TEST.avi");
hr (HRESULT) returns VFW_E_NOT_FOUND and I have no idea why because the example file IS there, I already change the location AND the example file but anyway it keeps failing.
Could this error result from a damaged file or a wrong file version or am I just too dumb to find the error? I reinstalled every application I have had on the PC before reinstalling Windows, EXCEPT Visual Studio C++ 2010.
My configuration:
Windows 7 Ultimate x64 SP1
VC++ 2008 Express
Windows 7 SDK amd64 installed
DirectX SDK June 2010 installed

Question "answered", look for the comment below the question...
In short:
Folder options --> Hide known extensions checkbox ticked.
Renamed File as "TEST.avi" results in real name: TEST.avi.avi
(TEST.avi == Test.avi.avi) == FALSE --> me.idiot = true;
Actually, this question could be deleted (no real coding issue)!

Just for people like me who will try to find an answer.
In my case the path was right. But I still was getting the same error VFW_E_NOT_FOUND.
I tried to open a video file with media player and I got an error too.
The problem was in missing codecs.
The solution is to install K-Lite Codec Pack.
And the error disappeared.

Related

DLL not found in redistributable (biddll.dll)

I’m having difficulty getting the sample code for tws api running. I’ve successfully run it on a borrowed laptop but the same version fails on my own windows 10 laptop. When running on Release mode in Win32, I get the popups
The code execution cannot proceed because biddll.dll was not found. Reinstalling the program may fix this problem. and The procedure entry point ?cancelOrder#EClient##QAEXJ#Z could not be located in the >dynamic link library C:\Eclipse-workspace\TWS >API\samples\Cpp\TestCppClient\ReleaseTestCppClient.exe.
I’ve read through several questions similar to this. I’ve tried installing the Visual C++ Redistributable for Visual Studio 2022 for both x86 and x64 from here: https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170. I’ve tried loading biddll.dll from another folder but it gives the message “Module was built without symbols.”. I’ve run “sfc /scannow” for broken files. The issue persists. biddll.dll still seems to not be anywhere in the system files or the API files. The only version is the one I copied from another version of the project.
Thanks for your suggestions. I uninstalled TWS API and reinstalled it. I made sure to build for Release. It sounds like there was a mismatch between some debug libraries and it started pulling them instead. There may have been some unexpected behavior from installing several versions while troubleshooting as well.

Debugging Qt in visual studio, msvcp140d_app.dll is missing

I'm new to Qt, but have been working with Visual studio for C/C++ development for a few years. Now I'm trying to build a GUI for my project. I installed Qt 5.11.0 and the Qt VS Tools on both my work computer and home PC. At work I can build and run my project with the VS debugger, however on my home system I can build but can't run either with VS debugger or simply launching the app. I tried in release and it runs fine.
The error I'm getting is :
The code execution cannot proceed because VCRUNTIME140D_APP.dll was not found.
I get 4 of these, the first two want VCRUNTIME, the second two want MSVCP140D_APP.dll.
Solutions I've tried so far :
Uninstalled Win SDK and reinstalled
Uninstalled VS2017 and SDK and reinstalled
Searched System32, SysWOW64 and VS install directories - found msvcp140d.dll and vcruntime140d.dll, but no _app.dlls
Does anyone know what these are included with and where to get them? I can't figure out why I have them on my work computer but not at home. I have the same VS updates, same Qt version, and SDK on both systems.
Using :
Visual Studio 2017 v15.7.1
Qt 5.11.0 - msvc2017_64
I suppose I can just copy the .dll's from my work pc and drop them in the appropriate locations on the other, but I'd like to know what they should have been installed with so I can have the same setup on both systems.
Edit:
I also tried changing the platform toolset to VS2015 with Qt versions msvc2015_64 and winrt_x64_msvc2015
I found this post concerning the same missing _app.dll files. There wasn't any answer there, which is why I tried reinstalling the SDK in the hope the missing files were included there.
Edit 2:
I just scanned my entire system at work and it turns out that I don't have the missing .dll there either. That tells me that there is a difference in the project properties or configuration between the two. I use git for source control, and I am currently the only contributor to this project. When I try to build and run just the example from the getting started guide I have the same problem at home with missing _app.dll files, however it works fine at work. I'm totally confused now, and any hints are greatly appreciated.
Solution:
After trying for a couple of hours making new solutions etc. I decided to delete the entire build folder and put fresh copies of all the dependencies into it. My project now runs fine in debugging mode.
I'm fairly certain that when I originally copied the Qt .dll files into it I must have grabbed them from one of the winrt folders rather than the msvc2017_64 folder. To test I replaced the working .dll files with those from the winrt_x64_msvc2017 folder and sure enough the same errors again. So, this was a dumb mistake on my part, but hopefully it'll save someone else a lot of hair-pulling in the future.

My program doesn't run on some PCs

I'm working in a project building an application with Computer Vision using C++, OpenCV and Visual Studio. I'm no expert in deploying programs to use them on other PCs.
I've made a program which I need to distribute to a certain amount of people and I can't make it work on all the computers I'd like to. The program was written using Visual Studio 2015, it's an MFC Project and the code is written in C++ since I'm using OpenCV.
When it was finished, I tried to run it on another computer and I realized that it won't open. I looked on the Internet and found out that I needed to statically link the libraries, so I did it. Also, when I was looking for information, I found that Visual Studio 2015 builds its projects so you can run the programs on machines with Win7 to Win10. When I learnt that, I tried to open it on PCs running Windows 7, 8, 8.1 and 10. I tested my program in like 20 computers, give or take.
The results? I couldn't make it work for Windows 7, the error ucrtbase.terminate api-ms-win-crt-runtime-l1-1-0.dll showed every time I tried to open it. It also didn't open in one machine with Windows 8 without showing any error message, but it DID open on most of the machines with Win 8.1 and Win 10. The thing is that "most"; there were some PCs (with Win 8.1 and 10) that I couldn't open my program on. I found that sometimes it would show up in the Task Manager for less than a second and then disappear. The most stressful thing is that it doesn't tell me what the problem is, it doesn't show any error message. It just won't open.
I tried using Dependency Walker (both on my PC and one of those that I couldn't run my program on) to see if there's something missing and I got a reeaaally long list of files that the system couldn't find, here's an example:
List 1/11. Something curious is that my program executes just well on my computer and on those I could open it, even though Dependency Walker (DW) tells me that there might be a problem with it. This indicates me that DW is not finding the exact error I'm having.
Another thing I've tried is to compare the things I have installed on my computer and install them on the one I want to execute my program on. I tried installing .NET Framework 4.6.1 just because VS 2015 says that my project was built using it (and I have it installed in my PC and that other one doesn't. Also I tried with .NET 4.6.1 SDK). Nothing changed.
Just look here:
https://msdn.microsoft.com/de-de/library/ms235299.aspx
The quick-and-dirty way would be to copy the DLLs from your redist directory. For my MS VS 2013 it is hidden under the VS installation directory in:
VC\redist\x86
or
VC\redist\x64
...
which depends on your application.

VC C++ 2008 redistributable error

Okay so I have read a few responses about this topic and can't seem to find someone having the same issue.
Why installing vcredist_x86.exe doesn't fix SideBySide error when I develop an EXE on one machine and run it on another one?
http://www.codeproject.com/Articles/43681/Side-by-Side-Configuration-Incorrect
background: I work on Fortran code that use a few c++ libs that I don't have access to the code of. These were apparently built using VS2008, and this error has only started to occur since my machine had to be rebooted and I asked IT not to install VS2008 in addition to VS2012. I know that installing VS2008 will fix the problem, but that is not a good soultion.
The error is: unable to start program 'C:\blah\blah\blah.exe'. This application has failed to start because the application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more details, please see the application event log. The application event log tells me the same things listed in the first link posted.
Originally I was getting the problem so I looked up these articles and I went and installed the correct version of the VC C++ redist package (it is version 9.0.21022.8 for x86 source:the manifest file for the project). I originally installed the 64 bit, quickly determined I needed the 32 bit version and then installed that one.
I have the folders and files within for
C:\Windows\winsxs\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.21022.8_none_b59bae9d65014b98
C:\Windows\winsxs\x86_microsoft.vc90.mfcloc_1fc8b3b9a1e18e3b_9.0.21022.8_none_b59bae9d65014b98
C:\Windows\winsxs\x86_microsoft.vc90.atl_1fc8b3b9a1e18e3b_9.0.21022.8_none_b59bae9d65014b98
The related manifest files also seem to be there.
The program still doesn't run even though the files are there. What am I missing?

Missing file from MSDN example for GDI printing

I am trying to learn to print using GDI.
I have searched MSDN for resources and found this example.
I like the thought of putting printing in separate thread, and using GDI is easier for me to learn than using XPS API so I have downloaded the example.
After trying to compile it ( I use Visual Studio 2008 ) I get this error:
fatal error C1083: Cannot open include file: 't2embapi.h': No such file or directory
According to this, I have found out that I am not the only one facing this problem.
Still, I have tried to Google the above error and found this that indicates me not having the latest SDK.
I have searched in C:\Program Files\Microsoft SDKs\Windows and found a folder v6.0A which indicates that I do not have latest SDK installed.
However, here I have found one post where person with the same problem did not solve it by downloading the latest SDK ( although the year that post was made is 2006, still the file was missing then too, and downloading the SDK didn't help-why should anything change now? ).
My question is:
Is there a way to get this file ( if I am wrong about downloading the latest SDK please correct me ) ?
I think that this file has to do something with fonts-is there a way to modify the example so I do not have to use that file?
Thank you for you rime to view this thread and for trying to help.
Best regards.
T2Embapi.h is supplied by the Windows SDK, it contains declarations for the Font Embedding Services Library to handle embedded OpenType fonts. Clearly the SDK version you use is too old to have it. Not exactly sure which version is required, I know that v6.0 doesn't have it but v7.1 does.
There's some sloppiness in the project due to it starting as an XPS sample. T2Embapi isn't actually required to build the GDI sample. You can simply delete the #include from stdafx.h. Also some sloppiness in the Release configuration settings of the project, remove T2embed.lib and XpsPrint.lib from the linker's Additional Dependencies setting.
Your question is:
1.
Is there a way to get this file ( if I am wrong about downloading the latest SDK please correct me ) ?
The latest version of Windows SDK is for Windows 8.1. Windows Software Development Kit (SDK) for Windows 8.1. However, I think the 't2embapi.h' have already included Windows SDK for Windows 7, because I found the header file in 'C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include'.
2.
I think that this file has to do something with fonts-is there a way to modify the example so I do not have to use that file?
#Hans Passant has already answered about that.