I am using msado21.tlh to append record in recordset. But the Append function causes runtime check failure#0 error. I searched about the error and came to know its related to calling convention. I am not able to solve this error. Please help.
I am using Visual studio 2012, OS is windows server 2008 R2 SP1, 64 bit machine.
I am having a web site application which uses a C++ application which is a window service(32bit). This C++ application uses msado21.tlb. The calling convention set in project properties is __cdecl(/Gd) and the path for msado21 is set to C:\program files\common files\system\ado. Also, inside IIS manager the flag for enabling 32 bit process in AppPool is set to true.
But if I use msado21.tlb from C:\program files(x86)\common files\system\ado then everything works fine. I am unable to understand what is the root cause of this problem and how to resolve it?
Please provide some guidance.
Thanks
Related
I am trying to simply deploy an OpenGL, C++ application from one computer to another. The app was written using Visual Studio 2017 Community. The first computer has VS installed, the second does not.
The computers have Intel Core i7-8550U CPU and Intel Atom x5-Z8350 CPU, respectively. Both are running Windows 10 Home.
The VS project started as an empty project to which I added everything.
I have copied the release, x64 application .exe file and the one .dll file necessary to the project development to a single directory on the second computer.
Microsoft instructions for local deployment say “Local deployment, in which you copy particular Visual C++ DLLs from your Visual Studio installation—typically in \Program Files (x86)\Microsoft Visual Studio version\VC\Redist\platform\library\—and install them on target computers in the same folder as the application executable. You can use this deployment method to enable installation by users who don't have administrator rights, or for applications that can be run from a network share.”
Nothing I can see or find to set in VS tells me what .dll files are being used by the application I developed and run on the first computer. There is a VS output window that shows a number of .dll files, but those are in c:\windows\system32.
From the reference in the Microsoft instructions regarding the MSVC DLLs in \Program Files (x86)\Microsoft Visual Studio version\VC\Redist\platform\library\, I looked in ..\VC\Redist\MSVC\14.16.27012\x64 on the first computer and found these folders:
I have copied the DLLs from the .CRT directory and the .MFC directory to the second computer to no avail.
When I try to run the application on the second computer it displays the message “Failed to create GLFW window”, which is in the code I wrote as shown here:
It would seem that there must be a straightforward way to do this. I have seen reference to an old Microsoft application (I think), depends.exe, which provides the a list of the DLLs required, but it is no longer deployed with Windows systems.
missing DLL or RTL
causes crash or even no error but just instant closing your app (that is what missing or miss-matching MSVCPP RTL is doing or was at some point).
As the RTL libs are changing all the time (IIRC once in a year) there are a lot of versions already so good luck using MSVCPP apps on fresh OS computers. In order to use some app you usually need to find out which version of RTL it needs which they usually do not report so you will end up with installing all of them you get hands on ...
There is a way around this problem just enable your compiler/linker to link all the stuff it needs directly into exe file instead of using RTL DLLs. However I do not code in MSVCPP and from what I heard MS removed this option from their environment (other compilers I use still have it)
Your error message indicates your App run as should and is not missing anything.
The problem is on GL side. Windows 10 is usually forcing wrong drivers (and not just for gfx cards). The goto case is enforcing (most likely intentionaly) buggy MS drivers (where GL is bugged and DX more or less works) instead of vendor provided. To remedy this (check the driver manufactor and if not what it should be) download&install correct driver from your gfx Vendor site Do not use Windows Driver service for gfx cards !!!
You can use DUMPBIN /DEPENDENTS EXENAME to get a list of bound DLLs. Mind you this only lists DLLs with import table entries, if you're instantiating COM objects this won't help at all.
My guess is you're probably missing the opengl driver/dll on the target system.
ed: actually I'm going to narrow that down to missing the driver, since if you were missing the DLL you'd have gotten an an error on load. The fact you're able to call the function means you bound to it, but that you're only getting failures when it tries to call the driver. Try calling something benign that queries for driver or device info, like a version or string. If that fails you know the driver is missing.
I`m having a Issue on Dll Register after migrating the project from VS 2012 to VS2013
Actually Im working on a custom project, were we qualify our application on each visual studio version, previously we did a migration for VS 2010 to VS 2012, during which there was no issues with any components but now when Migrating from VS 2012 to VS 2013, we are facing a issue while registering a dll.
I don't see any major differences in the current migration process when compared with that of the previous migration activity what we have carried out so far.
Error Message:
We are getting The module "XXX.dll" was loaded but the call to DllRegisterServer failed with error code 0x80020009.
We are using Windows7, 64 bit machine and the project is built on 64 bit project setting. The command prompt to register the dll is executed in administration mode.
What we have Tried so far:
I have referred this SO ,Registering a dll returns 0x80020009 error for the error code what we are getting on DLL register process, but it did'nt resolve the issue
Tried this solution as well http://www.vbforums.com/showthread.php?722793-RESOLVED-call-to-DLLRegisterServer-failed-error-code-0x80020009 , but no use
Any help on this will be much appreciated.
Finally after struggling so much with this issue, i was able to solve this problem .
The main issue was with a 3rd party Library called Smart Heap, which is not supported/compatible with VS 2013 and hence it impacted the DLL registration of the other DLL's.
I was able to identify the Root Cause , by excluding all the 3rd party libraries and building the solution seperately, which resulted in a successful registration of the respective DLL's smoothly without any glitches.
Special Thanks to Bathsheba, who helped me in thinking in a way i was able to isolate the problem by excluding every 3rd party component separately and verifying the problem.
Thanks Bathsheba
I am having a few troubles with a set of hosted code on an WS2K8 R2 box with IIS 7. I have another server running WS2008 that does not encounter the same issue. I have copied the application code from the old server so that it is identical.
The exception thrown in my server side logs is:
"ModuleLoadException: The C++ module failed to load while attempting to initialize the default appdomain."
I also have an error being returned in VS2010 at the same time:
Unable to find assembly 'msvcm80, Version=8.0.50727.4927, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
I have checked and the correct version of msvcm80 is on the server in the "C:\Windows\winsxs" folder. I have also installed Microsoft Visual C++ 2005 Redistributable (x64) and (x86).
I cannot see why the error might be thrown??
My debugging expierence is low so please bear with me.
I re-checked the version details. It appears that it was a requirement of the Microsoft Visual C++ 2005 Redistributible. I re-installed all versions of it on the server and applied the security hotfixes.
After a re-boot and testing in IIS the issue has now gone from my log files.
I did check the comparison between the two servers and wasnt that happy copying the files over. I felt it was best to try this method first.
Thanks for your help.
msvcm80 is a .NET Framework mixed assembly (microsoft visual c++ managed + unmanaged). You might try to find this file on the second server and place near your application on the first server machine.
Note: .Net Framework Runtime requires exact version of an assembly (8.0.50727.4927 in your case).
I am creating a BHO using helloworld sample. Building Browser Helper Objects with Visual Studio 2005
the BHO is not getting loaded, and i am not able to hit the breakpoints in SetSite function.
Please let me know what additional settings are required to register BHO and subsequently debug it.
I am using IE9, VS2008.
Thank you very much
This is because the debugger is not attaching to the right IE9 process. To work around this you need to dictate IE9 to use a single process for all tabs. This can be done by setting the registry value: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\TabProcGrowth = 0
Hope this helps.
Are you certain that you've registered it? Assuming that you've accurately implemented the example in the link above (particularly the section about using the correct CLSID in the .rgs file), try from an elevated/admin CMD window:
regsrv32 /s mybho.dll
This will register the COM objects within the DLL, as well as registering it with Internet Explorer as a BHO
Additionally, with IE9 you'll need to make sure it's enabled in the Addons manager (tools/manage addons)
I had the same issue. I was using 64 bit IE9 but I changed the debugger to use 32 bit and it works for me now.
In VS 2008 go to the menu:
Project -> Project Name Properties -> Configuration Properties -> Debugging -> Command
C:\Program Files (x86)\Internet Explorer\iexplore.exe
I was using 64 bit before:
C:\Program Files\Internet Explorer\iexplore.exe
Also use a local file to avoid issues with protected mode:
Command Arguments:
path to some local html file
Good Luck...
Are you running in protected mode? If yes , then the breakpoint in SetSite will never be hit.
Refer http://msdn.microsoft.com/en-us/library/bb250462.aspx to know more about protected mode.
Also did you try registering the BHO using regasm ?
I've just discovered that regtlib.exe appears to be missing from Windows 7 (and apparently from Vista as well).
I've just installed Windows 7 RC in a VM and I'm attempting to build our existing projects on the new OS. The projects are c/c++ based and I'm using visual studio 2008. In order to build these projects I need to register several tlb files that are referenced within the code base.
Has anyone also encountered this problem? And, has anyone managed to solve this?
Thanks.
Yeah regtlib was removed from vista and up. As far as I know, all it does is call LoadTypeLibEx with the REGKIND_REGISTER flag (http://msdn.microsoft.com/en-us/library/ms221249.aspx). Maybe you could write a simple replacement.
Just came across this issue (couldn't add any components to a VB6 project on Win7). This post (Error accessing the system registry in VB 6 IDE) pointed to regtlib (which is missing from Win7). I just
set the VB6 start menu icon to 'Run As Administrator' and it worked fine for adding components and should fix any problems relating to updating the registry as well.
Regards
Ian
Finally got back to trying to build our code base on windows 7. Anyway, I went back to the installer for one of the dependencies that was causing me grief. The error message from the installer wasn't to helpful but it did point to a regasm that was being run from inside the installer.
I ran the regasm command from a cmd prompt and got more information. It appears that you need administrative credentials to perform this task and our current installers don't do the privilege escalation properly.
So, long story short, I got dlls registered and the build appears to be working.