Hello,
I have a piece of code which is trying to enumerate the COM ports in
C#.
It works fine on my XP development computer but causes a security
exception on Win98. The offending line is
IntPtr hDevInfoSet=Win 32.SetupDiGetCl assDevs(ref
Win32.GUID_DEVC LASS_PORT, IntPtr.Zero, IntPtr.Zero,
Win32.DIGCF_PRE SENT);
This is defined in my Win32 class with [DllImport]. This works fine in
MFC in Win98.
1) Am I doing the correct thing or is there a .NET class to look at
drivers on a system?
2) What is the security thing all about and why can't I just look what
COM ports are on the system? Can I put something in my
application.con fig file to overcome this?
Thanks,
Andrew.
I have a piece of code which is trying to enumerate the COM ports in
C#.
It works fine on my XP development computer but causes a security
exception on Win98. The offending line is
IntPtr hDevInfoSet=Win 32.SetupDiGetCl assDevs(ref
Win32.GUID_DEVC LASS_PORT, IntPtr.Zero, IntPtr.Zero,
Win32.DIGCF_PRE SENT);
This is defined in my Win32 class with [DllImport]. This works fine in
MFC in Win98.
1) Am I doing the correct thing or is there a .NET class to look at
drivers on a system?
2) What is the security thing all about and why can't I just look what
COM ports are on the system? Can I put something in my
application.con fig file to overcome this?
Thanks,
Andrew.