473,405 Members | 2,349 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,405 software developers and data experts.

UnsafeNativeMethods - why is it internal?

The UnsafeNativeMethods seems to be the answer to most .NET developer's
prayers in terms of defining interfaces and functions from the Windows
API, without us having to constantly having to re-import these
functions (and often incorrect definitions floating around the web).

I can understand the idea behind making this class internal, but would
it not benefit the community more to open it up as public? Removing the
need for all those re-declared SendMessages!!

Nov 17 '05 #1
1 7001
No, it wouldn't. There are a gazillion issues that would arise if they
did. Also, some of the definitions are tailored specifically for what they
are doing internal to the framework. Not to mention the security issues
that come along with it (for example, you can safely assert security
permissions if you know that the functions are not accessible outside of
your assembly).

Are you finding that http://www.pinvoke.net doesn't have the correct
definitions? The good thing about it is that if it is wrong, you are free
to correct it.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"john doe" <sl********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
The UnsafeNativeMethods seems to be the answer to most .NET developer's
prayers in terms of defining interfaces and functions from the Windows
API, without us having to constantly having to re-import these
functions (and often incorrect definitions floating around the web).

I can understand the idea behind making this class internal, but would
it not benefit the community more to open it up as public? Removing the
need for all those re-declared SendMessages!!

Nov 17 '05 #2

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

Similar topics

8
by: Carlos J. Quintero | last post by:
Hi, As you know the current keywords "protected internal" (C#) or "Protected Friend" (VB.Net) means "Protected Or internal" (C#) or "Protected Or Friend" (VB.Net), that is, the member is...
1
by: Ayende Rahien | last post by:
reparing resources... Updating references... Performing main compilation... error CS0583: Internal Compiler Error (0xc0000005 at address 53168B12): likely culprit is 'BIND'. An internal...
4
by: David Sworder | last post by:
Consider the following line of code (it's not important what it does): resp.DocItem=Relations.SelectDocItems_BySearchString(req.SearchPhrase); It turns out that this line is in error. The...
2
by: Chien Lau | last post by:
I frequently define internal UserControl-derived classes in my WinForms apps: internal class MyUserControl:UserControl{ ... } I'll often need to embed these controls in a Form, whose class...
0
by: Wal Turner | last post by:
Hi. The following error I seemingly get at random times when my application is loading. ************** Exception Text ************** System.NullReferenceException: Object reference not set to an...
2
by: Bill Green | last post by:
We have an aspnet application that all of a sudden starts building up memory, I attached a debugger and other then the normal there was a ton of the following. I am trying to narrow down where...
0
by: Curtis | last post by:
I am profiling my application VB.Net with the ANTS profiler from RedGate Software because I have some significant performance issues. My application is scrapping a webpage for content and then...
9
by: JT | last post by:
Here is the overall structure I will be referring to: End-program ProvideWorkFlow.dll Forms and methods that properly manipulate calls to methods in AccessUtils AccessUtils (a web service)...
9
by: dylan.miller | last post by:
I'm having trouble understanding the internal access modifier. There are many classes in my assembly that should not be accessible outside of the assembly. I've used the internal access modifier...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.