How do I check if the DLC protocol is installed on the system?

Im working on a program that uses the DLC protocol to
communicate with an external device. This works fine
both on WinNT and Win95.

However if I remove the DLC protocol from Win95,
and try running the code, Win95 responds to an

"First-Chance Exception in <executable> (DLCAPI.DLL):
0xC00000005: Access Violation"

In the CCB the uchDlcStatus field is set to
0x5e -> "Requested adapter is not installed"

The conclution must be that MSDLC32 is erroneous, when it
comes to detecting whether the adapter is accessible or not.

How do I detect if the DLC protocol is installed?

How do I detect the number of adapters installed in
the computer?

How do I check if the adapters have bindings to the  DLC protocol?

 Win95 requires a special version of the DLC protocol called
 MSDLC32. It is available for download at Microsoft. MSDLC32
 needs a patch called DLC32UPD.
Who is Participating?
jhanceConnect With a Mentor Commented:
Q1) To detect if DLC is loaded enumerate the registry keys under HKEY_LOCAL_MACHINE\System\currentControlSet\Services\Class\NetTrans and find one that has a Value: DriverDesc = "Microsoft DLC"

Q2) To determine the number of adapters in the system enumerate the keys under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Net

Q3) To determine if one of the adapters found in Q2 has the DLS protocol bound to it find the adapter by enumerating the keys under HKEY_LOCAL_MACHINE\Enum and look for a Bindings key.  If there is a value under it like MSDLC\0000 then the protocol is bound to that adapter.
Don't know but I'm not sure if you are aware that the error you are getting is an NT error (don't ask me how). The 0xC00000005:access violation is when an app tries to access memory belonging to something else, NT detects it & kills the app.
Are you using Win95 compliant calls?
Don't Know but I would check the microsoft knowledge base for the error codes and see what that tells you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.