Error 0xC0000142 after opening a device (v3.0.21.329, Windows Xp Sp2, 32bit)

  1. Cpu x86, 32bit
  2. Os: Windows Xp Professional, 32bit, genuine
  3. Comodo Firewall v3.0.21.329
  4. Bug description follows:
    4.1 Create a device with a simple device driver (IoCreateDevice())
    4.2 From the userspace call CreateFile() to open the device
    4.3 Close the handle to the device with CloseHandle()
    4.4 Do NOT close the userspace application that opened the device
    4.5 Result: cannot shutdown, nor logoff, EACH executable called after
    attempting to shutdown/logoff results in a 0xC0000142 error (Application
    not initialized correctly)
    (try to call cmd.exe from Run menu)
  5. I wasn’t able to fix the problem, you have to close the application that
    uses the device before shutting the system down… But that’s not very
    handy if you’re dealing with a resident application (like my IR remote controller)
  6. Description follows:
    6.1 Firewall security level: Train with Safe Mode
    6.2 Defense+: Train with Safe Mode
    6.3 Other settings: left to default
    6.4 My executable has been allowed to run and load the driver
  7. Account: Administrator with full rights

I squeezed down my source code such that the driver ONLY creates the device
on load, and only destroy the device on unload. The usermode program just
open the device with CreateFile() and immediately close it calling CloseHandle()
without accessing or using the device in any way.

I experienced the same problem.
The same test is successful without comodo firewall.
Under the same circumstances some other programs seem to wait undefinitely in a WaitForSingleObject(), where the object to wait is a remote thread: the remote thread ends normally, but the caller of WaitForSingleObject() is stucked in waiting state for a long time.
Could it be related to the very slow logoff procedure?
During my tests, the system logs off after some minutes; in the meantime every program i run cause the 0xC0000142 error that you described in your post. without comodo, the system logs off immediately.

in my program I try to stop the service through ControlService() with SERVICE_CONTROL_STOP flag but the service remain in STOP_PENDING status until the machine restarts. I can not complete the unload of the driver.
I have tried the same test without COMODO installed and the service shuts down correctly.
Since I also use a device, I can confirm that the bug exist.
Is someone working on this issue?


I didn’t notice the WaitForSingleObject() thing, but indeed I had the same problem with ControlService(), my driver had this strange behaviour of not unloading and only, after 2 days of tests I noticed that it was Comodo’s fault.

Right now I’m suggesting our customers to uninstall CF/CFP, so I sincerely hope that they’ll be able to fix this bug ASAP (even though no one answered yet…).


I have exactly the same problem!
Someone is working to a solution of the problem?

Until Fixing the problem the only workaround I found is to uninstall the comodo Firewall PRO+.


Is someone from the developers team taking a look at this bug?
This is not a minor issue… Interaction problems with device driver can lead to
serious consequences (and the inability to start an executable or to log-off
are serious issues!!)…



Can you confirm same issue is on latest version?

Just updated and tested, same issue alas :(. The same driver is working fine with other personal firewalls so I’m quite sure it’s a Comodo’s issue.

Thanks for information, Lorentz. Stay with us (V)

I will, thanx for your support :).