473,324 Members | 2,511 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Beginner - Security Policy blocking code in Win98

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=Win32.SetupDiGetClassDevs(ref
Win32.GUID_DEVCLASS_PORT, IntPtr.Zero, IntPtr.Zero,
Win32.DIGCF_PRESENT);

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.config file to overcome this?

Thanks,

Andrew.
Jul 21 '05 #1
0 1247

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Lorenzo | last post by:
hi you all, first of all apologies for having cross-posted this message but really i did not know where to post it. please let me know what ng you consider the most suitable for the described...
44
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there...
0
by: Mark Broadbent | last post by:
Could someone who has active experience of assigning Security Policys please clarify my follow comments... Having gone through the MSDN documentation on this subject, my condensed version of the...
0
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Today we are going to look at Code Access Security. Code access security is a feature of .NET that manages code depending on its trust level. If the CLS trusts the code enough to...
16
by: Marina | last post by:
Hi, I am trying to find the minimum security settings to allow a windows control embedded in IE have full trust. If I give the entire Intranet zone full trust, this works. However, this is...
7
by: Aaron Prohaska | last post by:
Has anyone had any experience with Nortan Antivirus causing problems when trying to use Request.UrlReferrer? I am seeing in the Nortan Antivirus log that its blocking my page from loading because...
5
by: Norsoft | last post by:
I have a .Net 1.1 application which is downloaded into an aspx page. It is a dll which inherits from System.Windows.Forms.UserControl. It works fine on a PC with only the 1.1 Framework. However,...
0
by: Andrew Peabody | last post by:
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 ...
5
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.