C/C++ runtime libraries
- I am trying to load the C runtime library dll's in Installscript(Installscript is a proprietary scripting language of Flexera software), i get the following runtime error:
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
I googled about the same and it suggests that the manifest files are missing. However even with the manifest files, i cannot get the runtime library msvcr90.dll to load.
Has anybody ever tried loading the runtime library dlls explicityl?Any help would be very much appreciated.
I am trying to use the C runtime library function void _lock_file(
FILE* file
);
This function is contained in msvcr90.dll . I have been unsucessful trying to load it.
Any ideas? Is there anything more i need to be doing? Is there any order in which the dll's need to be loaded?
All Replies
- Can anybody help me here?
- Hi Kiran,
Is VC++ runtime installed ? Is the dll present and you are not able to load it. You can use Dependency walker to check the dependency.
Thanks
PKR But why should i need the runtime to load a runtime dll? I have the runtime dll present in a folder and i want to load from there
I have the runtime dll present in a folder and i want to load from there
Thats excatly the problem. The CRT dll which is supposed through the manifest file should not be loaded by keeping it in the same folder. Delete the dll in the local folder and install the VC runtime in that machine.
Nave [My Blog]- Please install VC++ runtime and try.
- The point being, i am running an installer which requires some of the runtime dll's(not the entire runtime to be installed). We had some utilities dependent on the runtimes. However we could run these utilities properly by having private copies of the requisite runtime dlls.
So to load msvr90.dll, what dll needs to be in the same folder as this?As per dependency walker, msvr90.dll has kernel32.dll and ntdll.dll as its dependencies. Both of these i believe are already loaded with the OS.
I dont want to install VC++ runtime and get it working. I want to know if i can have private copies of the runtime dlls' and use them and i believe it should be possible(although i cannot get it working right) - Hi Kiran,
You are planing to package msvr90.dll in your package. I think you should not do that since it is a dll provided by Microsoft. I will suggest change your installer to have VC++ redistributable as pre requiste.
http://www.microsoft.com/downloads/details.aspx?familyid=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en
By the way what is the error it throws?
Thanks
Pavan Rai - It does not matter. If i have to use a function in the C runtime library, then i need to load the corresponding runtime dll into memory in Installscript.
Installscript has no idea of what the runtimes are. To use a function, i need to first load the runtime dll into my installer process and then start using the runtime functions. So having runtimes installed is not going to solve my problem.
The problem i have is:
If i try loading msvcr90.dll i get the following error:
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
I also have the correct manifest file in the same directory.
What could be the reason?
Can i not explicitly load msvr90.dll?
Are there any dependencies i need to load prior to attempting to load this? - Hello Kiran,
Thanks for your post.
Since Installscript belongs to Flexera, you may also post this question on Flexera Software Community.
http://community.installshield.com/forumdisplay.php?f=1
Please check the installer process with Process explorer to see if the correct version of CRT is loaded.
http://social.msdn.microsoft.com/Forums/en-US/netfx64bit/thread/a679d31d-3ee9-4d53-a81b-68cc380de575
Another idea is that you can also try with Windows API instead of the function support by CRT library.
Thanks,
Rong-Chun Zhang
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. Thanks for the response.
Do you know of a windows API for exclusively locking and unlocking a file?- Funnily enough they are called LockFile and UnlockFile, but you will have to change everything file related to use the Windows API.
If this is a lot of work then maybe think about static linking the CRT or using private assemblies. You can use them your application but you must lay it out correctly. You can't just have the msvcr90.dll file there, you must have the assembly manifest there too. Read through the information in the MSDN (http://msdn.microsoft.com/en-us/library/dd408052(VS.85).aspx) for Isolated Applications and Side by Side assemblies. This should give you the information you need to put the correct files into he same directory as the program.
Visit my (not very good) blog at http://c2kblog.blogspot.com/ Hello Kiran,
Have you got any progress on this issue? Would you mind letting me know the result of the suggestion? If you have any additional question, welcome to post here.
Have a great day!
Thanks,
Rong-Chun Zhang
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Sorry for the delayed response. I actually have posted it on Flexera software community and have to try out their suggestions. I will definitely post my findings here.


