473,698 Members | 2,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Win32.h constants

Hi,

Can someone suggest a way to use some of the constants defined in Win32.h
eg. FILE_MAP_ALL_AC CESS ?

Is there a way to include a .h file in C# code?

It would be great if someone could provide links to articles/tutorials on
this topic. Thank you.
Nov 16 '05 #1
2 2236

"Rookie" <do***********@ rediffmail.com> wrote in message
news:Oh******** *****@TK2MSFTNG P12.phx.gbl...
Hi,

Can someone suggest a way to use some of the constants defined in Win32.h
eg. FILE_MAP_ALL_AC CESS ?

Is there a way to include a .h file in C# code?

It would be great if someone could provide links to articles/tutorials on
this topic. Thank you.


Have a look at http://www.pinvoke.net/

There is also a rather handy plugin on this site that integrates with VS.NET
and allows you to drop these sorts of things direct into the code.

(Unfortunately your example doesn't exist in the P/Invoke database... yet).

Stu
Nov 16 '05 #2
you can't include a C header file. you need to find out the actual value of
that constant, which should be declared in win32.h anyway.

"Rookie" wrote:
Hi,

Can someone suggest a way to use some of the constants defined in Win32.h
eg. FILE_MAP_ALL_AC CESS ?

Is there a way to include a .h file in C# code?

It would be great if someone could provide links to articles/tutorials on
this topic. Thank you.

Nov 16 '05 #3

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

Similar topics

0
1901
by: Quinet, Joel | last post by:
Hi all, I use the Win32 extension (Build 157) module with Python 2.3 to add row in a sql server 2000 sp3 DB. My problem is I can not insert data of type money in the DB. I use the following command to create the parameter : prm = cmd.CreateParameter('Open', constants.adCurrency, constants.adParamInput, 8, 12.10) cmd.Parameters.Append(prm)
11
6593
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am not logged into the server, Access is not able to print to the printer. The error is pretty...
0
3476
by: Jim dunn | last post by:
HI I am having problems with C# with regards to its compatibility with win32 API methods, I am trying to read from a windows CE comm port using C# and imported methods from coredll.dll, it seems that I can set the comm state however when I try and read from the port using ReadFile method I cannot, I've tried to change the DCB object flag types but this does not make a difference as I still cannot read from the port. I have pasted my code...
2
5436
by: ason | last post by:
Does anybody know where to find all these API Constants like for example LVCFMT_BITMAP_ON_RIGHT = 4094; // = 0x1000 Are these Constants in any *.h files???? thanks ..::AsOn
0
2053
by: Guy Mahieu | last post by:
Hi, I am trying to dynamically add menu items to external win32 applications from c# code. I have found some VB6 examples on the net that do just that, but when I rewrite them into c# they will either do nothing, add a separator or add an empty menu item which does not trigger commands when clicked. The difference between a separator or an empty item getting inserted lies in supplying the fMask of the MENUITEMINFO with the MF_OWNERDRAW...
4
3673
by: Jarod_24 | last post by:
I've managed find out how to start using the Win32 API's But some of these methods got constants that you should use when caling them. for example the LockSetForegroundWindow got a unsigned integer as a parameter that either can be the value of "LSFW_LOCK" or "LSFW_UNLOCK" How do i get hold of these constants? Is there some <DllImport-thing that i can use to get hold of these constants?
5
6770
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would cause. If I could create a large file that could be encrypted, and maybe add files to it by appending them and putting in some kind of delimiter between files, maybe a homemade version of truecrypt could be constructed. Any idea what it...
8
4212
by: John Salerno | last post by:
I figured my first step is to install the win32 extension, which I did, but I can't seem to find any documentation for it. A couple of the links on Mark Hammond's site don't seem to work. Anyway, all I need to do is search in the Word document for certain strings and either delete them or replace them. Easy enough, if only I knew which function, etc. to use. Hope someone can push me in the right direction.
1
2424
by: Sin Jeong-hun | last post by:
The .NET BCL is great but not always sufficient. We need Win32 API's to do certain tasks. It's not impossible. We can manually write extern function signatures by hand or copy and paste from a site like pInvoke.net. But I always feel this is a little bit painstaking. Sometimes some signatures are missing or not provided for the CLR language I'm in use or those codes don't work and I have to search Google for it. So, what if someone can...
0
8608
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
9161
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...
1
8897
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,...
0
8867
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7732
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6522
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
5860
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
4370
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...
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.