473,799 Members | 3,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Looking for Windows API Definitions

Where is the equivalent of the Windows.h (and it's includes) for C#?
Nov 8 '08 #1
12 3600
On Fri, 07 Nov 2008 21:08:53 -0800, Stewart Berman
<sa******@nospa m.nospamwrote:
Where is the equivalent of the Windows.h (and it's includes) for C#?
Since there is none, it's nowhere. C# doesn't have/use include files.
Everything it needs comes from manifests of assemblies you add as
references to your project.
Nov 8 '08 #2
Stewart Berman wrote:
Where is the equivalent of the Windows.h (and it's includes) for C#?
I guess you can always try MSDN:

http://msdn.microsoft.com/en-us/libr...49(VS.85).aspx
http://msdn.microsoft.com/en-us/libr...88(VS.85).aspx
http://msdn.microsoft.com/en-us/libr...86(VS.85).aspx

Regards.
Nov 8 '08 #3
"Stewart Berman" <sa******@nospa m.nospamwrote in message
news:sk******** *************** *********@4ax.c om...
Where is the equivalent of the Windows.h (and it's includes) for C#?
If you are going to make a lot of calls into the Windows APIs, you may wish
to take a look at this site: http://pinvoke.net/

It will help you find the various [DllImport] declaractions and associated
data structures that you need to use when using Platform Invoke.

Nov 8 '08 #4
Thanks -- but all that is is information on calling the API functions from C++ not C#.

"Fernando A. Gómez F." <fe************ ****@gmail.comw rote:
>Stewart Berman wrote:
>Where is the equivalent of the Windows.h (and it's includes) for C#?

I guess you can always try MSDN:

http://msdn.microsoft.com/en-us/libr...49(VS.85).aspx
http://msdn.microsoft.com/en-us/libr...88(VS.85).aspx
http://msdn.microsoft.com/en-us/libr...86(VS.85).aspx

Regards.
Nov 8 '08 #5
OK C# has using statements (the way java does) instead of include statements. Where are the type
descriptions for the Windows API?

"Peter Duniho" <Np*********@nn owslpianmk.comw rote:
>On Fri, 07 Nov 2008 21:08:53 -0800, Stewart Berman
<sa******@nosp am.nospamwrote:
>Where is the equivalent of the Windows.h (and it's includes) for C#?

Since there is none, it's nowhere. C# doesn't have/use include files.
Everything it needs comes from manifests of assemblies you add as
references to your project.
Nov 8 '08 #6
Stewart Berman wrote:
OK C# has using statements (the way java does) instead of include statements. Where are the type
descriptions for the Windows API?
..NET do not come with all of those.

In most cases the .NET FrameWork provides same functionality as
Win32 API.

I assume you have found the docs of the .NET FrameWork.

If you really need to use Win32 API from C#, then you can.
Somebody else has already posted a link to a site where you
can find the declarations.

Arne
Nov 8 '08 #7
Stewart Berman wrote:
Where is the equivalent of the Windows.h (and it's includes) for C#?
http://pinvoke.net carries many of them and of other API headers, in C#
and in VB.NET syntax.

--
Rudy Velthuis http://rvelthuis.de

"Always code as if the guy who ends up maintaining your code will
be a violent psychopath who knows where you live."
-- Martin Golding
Nov 8 '08 #8
C# using statements are not equal to C++ include statements.

You have to add the the function imports, which can be found at pinvoke.net
as Alberto wrote.

"Stewart Berman" <sa******@nospa m.nospamwrote in message
news:fm******** *************** *********@4ax.c om...
OK C# has using statements (the way java does) instead of include
statements. Where are the type
descriptions for the Windows API?

"Peter Duniho" <Np*********@nn owslpianmk.comw rote:
>>On Fri, 07 Nov 2008 21:08:53 -0800, Stewart Berman
<sa******@nos pam.nospamwrote :
>>Where is the equivalent of the Windows.h (and it's includes) for C#?

Since there is none, it's nowhere. C# doesn't have/use include files.
Everything it needs comes from manifests of assemblies you add as
references to your project.
Nov 8 '08 #9
That looks like you have to find each API function and all of the constants associated with it one
at a time and insert it. I am looking for the equivalent of either the Visual Studio 6 C++
Windows.h (and its includes) or the Visual Basic WIN32API.txt. Preferably updated for Vista.

"Alberto Poblacion" <ea************ *************** ***@poblacion.o rgwrote:
>"Stewart Berman" <sa******@nospa m.nospamwrote in message
news:sk******* *************** **********@4ax. com...
>Where is the equivalent of the Windows.h (and it's includes) for C#?

If you are going to make a lot of calls into the Windows APIs, you may wish
to take a look at this site: http://pinvoke.net/

It will help you find the various [DllImport] declaractions and associated
data structures that you need to use when using Platform Invoke.
Nov 8 '08 #10

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

Similar topics

22
2291
by: Martin MOKREJ© | last post by:
Hi, I'm looking for some easy way to do something like include in c or PHP. Imagine I would like to have: cat somefile.py a = 222 b = 111 c = 9
51
7986
by: Matt | last post by:
Hello, I'm a hiring C++ developer employer looking for existing, online C++ aptitude tests. I have not yet extensively researched this yet, but as an example, I thought this test looked pretty good: http://expertrating.com/c++test.asp
5
2477
by: Charles L | last post by:
Can someone explain to me what the following means? "C permits multiple definitions of a variable in any given namespace, provided the definitions are the same and it generates only a single variable for the multiple definitions. C++, however, does not permit redefinition of a variable or any other entity for a very definite reason that we will discuss later." Chapter 1. C++ Tutorial. Coronado Enterprises Charles L
3
2138
by: Jack Klein | last post by:
I'm looking for opinions on a C technique I, and others, have used successfully in the past. While some people swear by, apparently others swear at it. Assume a part of a program too large to fit comfortably in a single source file, call it a "module". Let's call it "module A". Also assume for various reasons module A needs a private data store with static storage duration, accessible from files in more than one translation unit. ...
5
7276
by: Kobu | last post by:
Does anyone know how old style function definitions differ in "behaviour" to new style function definitions? I heard the old style function definitions caused integeral promotion and floating point promotion on the formal parameters. Is this true? Is it okay for me to set up a new style funciton prototype when calling old style function definitions (for legacy code)? Is this okay?
0
1350
by: mom_newbie | last post by:
Dear all, Could someone suggest a good WSDL reading, oriented for manual Web services implementation? There are plenty working ATL and .NET examples in Internet, but I have troubles making a plain C++ ISAPI Web service. I took the WSDL from:
36
3859
by: zouyongbin | last post by:
Stanley B Lippman in his "C++ Primer" that a definition like this should not appear in a header file: int ix; The inclusion of any of these definitions in two or more files of the same program will result in a linker error complaining about multiple definitions. So this kind of definition should be avoided as much as possible. But as we know, the definition of a class is always in a header file. And we can use "#ifndef" to eliminate...
8
2299
by: rays | last post by:
Hi, I am trying to port a C++ program which is supposed to be standards compliant. It works fine on Linux with GCC (4.x). But as I try to compile it on Windows, all hell breaks loose. I have been struggling with several free (as beer) compilers on windows, but none of them does the job. I am not sure how much of the blame goes to our code and how much to the compilers. By the way the platform is Windows XP and all the softwares mentioned...
18
6524
by: hq4000 | last post by:
I have a 32-bit application installed on x64 (AMD64) Vista and Windows XP. The rasdial returns 632 - ERROR_INVALID_SIZE on x64 machine; but the rasdial behaves properly installing the same 32-bit application on a 32-bit machine. Any clue?
0
9543
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10488
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10237
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7567
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6808
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.