Logo Banner

SOFTWARE - [Error 0xc0000022]

Tracking and fixing error 0xc0000022

What is error 0xc0000022?

Some applications can give an annoying message box saying they can't run because of an error 0xc0000022. First of all you need to realize each application can have its own error codes: the meaning of an error code 0xc0000022 can be totally different on different applications.

For applications written in Visual Basic (versions prior to the .NET), like many of the applications you can find on bvsystems.be, the error 0xc0000022 usually means there is a problem with the file access permissions of one of the required DLL files (Dynamically Linked Library). They are external libraries with software functions. These files are often stored under your C:\Windows\System32 or C:\Windows\SysWow64 directories.

Do I have an access permissions problem?

It is easy to figure out if you are having a problem with file permissions: just try to run the application with administrative privileges: if the program runs then, you have a problem with the access permissions.

You can easily run a program with administrative rights: just right click the shortcut to the application, then click 'Run as Administrator'.

How to locate the guilty DLL file?

I located the problem DLL by using the free 'Process Monitor'. It is a program that can be downloaded from the Microsoft website. The program shows all file activity in Windows: which files are created? Which files are opened? And so on...

I started the Process Monitor and executed my problem application (KML generator) afterwards. Process Monitor will now capture all file events. After a little while the KML generator stopped with an error code 0xc0000022.

Then I stopped capturing the events in Process Monitor. This can be done by by clicking File\Capture Events. The trick is to filter out all lines that doesn't belong to KML generator. This makes analyzing the log so much easier. Right-Click any undesired program in the list and then click Exclude 'undesiredprogramname'.

Now you can analyze the log: search for an event called 'ACCESS DENIED'. On my system the guilty file was C:\Windows\Syswow64\MSVBVM50.DLL.

How to fix access rights on the guilty DLL file?

Now you should navigate to the folder containing the problematic DLL file. On my system this is C:\Windows\Syswow64. Then search for the DLL file and right-click it. Go to PROPERTIES. The following window will open. Here you should navigate to the security tab.

It is a good sign if you get a Window that looks exactly like this. It means your current user doesn't have any access to the file. Click the 'Continue' button to provide some administrative rights. You will then see the permissions Window with the users that have access to the file. In my case only SYSTEM and ADMINISTRATORS had access.

Now click the add-button to add a new user. Enter the name 'users', click 'check names' and then click 'OK'. The user will now be added to the list with permissions for the file MSVBVM50.dll.

Last but not least: set the needed access levels for the file. You need: Read & Execute and Read access.

You can now close the dialog window. The permissions of the file should be set now. You should now be able to run the application.

Copyright ©1998-2017 Vanderhaegen Bart - last modified: August 24, 2013