473,666 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Good tutorial on Windows API

I've been using a lot of <DllImports> as of late and i was wondering if
anyone could tell me a good tutorial/website/articles/books
that explains what System.Marshal* * actually does and how to make those
structures that some windows api methods need passed in/out.

So far i've used mostly methods that send in/out strings, bool, integer and
so on, easy to convert into CLR types, but some methods need structures and
some of these have quite some exotic <parameters> set. How do people know
when that is needed to be set is a mystery to me (i would like to learn it).

Example:

<StructLayout(L ayoutKind.Seque ntial)> _
Public Structure StartUpInfo
Public cb As Integer
<MarshalAs(Unma nagedType.LPTSt r)> Public lpReserved As String
<MarshalAs(Unma nagedType.LPTSt r)> Public lpDesktop As String
....

this article was great:
http://msdn.microsoft.com/library/de...07/NET/toc.asp
Jan 28 '06 #1
1 1101
Good website for both C# and VB

http://www.pinvoke.net/
"Jarod_24" <ja******@hotma il.com> wrote in message
news:43******** **************@ titian.nntpserv er.com...
I've been using a lot of <DllImports> as of late and i was wondering if
anyone could tell me a good tutorial/website/articles/books
that explains what System.Marshal* * actually does and how to make those
structures that some windows api methods need passed in/out.

So far i've used mostly methods that send in/out strings, bool, integer
and so on, easy to convert into CLR types, but some methods need
structures and some of these have quite some exotic <parameters> set. How
do people know when that is needed to be set is a mystery to me (i would
like to learn it).

Example:

<StructLayout(L ayoutKind.Seque ntial)> _
Public Structure StartUpInfo
Public cb As Integer
<MarshalAs(Unma nagedType.LPTSt r)> Public lpReserved As String
<MarshalAs(Unma nagedType.LPTSt r)> Public lpDesktop As String
...

this article was great:
http://msdn.microsoft.com/library/de...07/NET/toc.asp

Jan 28 '06 #2

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

Similar topics

52
6408
by: Tony Marston | last post by:
Several months ago I started a thread with the title "What is/is not considered to be good OO programming" which started a long and interesting discussion. I have condensed the arguments into a single article which can be viewed at http://www.tonymarston.net/php-mysql/good-bad-oop.html I fully expect this to be the start of another flame war, so sharpen your knives and get stuck in!
1
2760
by: Jan G. Thorstensen | last post by:
Hi. I'm newto Oracle but want to learn how to make a database and finally use it on my web site. Is there a good tutorial on the Internet somewhere, or could someone recommend a good starting book? Thanks for any help or suggestions.
10
2174
by: Harley | last post by:
Hello, I was VERY blessed with a Christmas gift of visual studio .net from a man I hardly know who had heard of my plans of software developement. So I am probably the only person in the world who actualy has this great IDE and don't even know vb.net (or c sharp etc.). I have some prior exposure to simple scripting language such as javascript and I understand data types etc. (basic programming concepts and procedures) but I don't have any...
63
3921
by: John Salerno | last post by:
I know there's a request for a good IDE at least once a week on the ng, but hopefully this question is a little different. I'm looking for suggestions for a good cross-platform text editor (which the features for coding, such as syntax highlighting, etc.) but not a full IDE with all the fancy jazz (GUI developer, UML diagrams, etc.). Ideally, it would be something I could even put on a flash drive and move from computer to computer, but...
2
2101
by: sara | last post by:
Hi All, I learned C++ long time ago and now I want to review all of its details in a short time like a week. I wonder if there is a good tutorial you know which I can read for this purpose. Thanks a lot.
2
8535
by: JT | last post by:
Sorry if my frustration shows through in this. I have seen posts and discussions dating back to 2001 and still haven't seen any "good" example of a tutorial on CodeDOM. I've seen very many that give the same Console.WriteLine("Hello, World."); example. If that's all you want to do, then maybe it's adequate. The very first thing I've tried to do is use a MessageBox instead. When I include System.dll in .ReferencedAssemblies I get an...
13
2036
by: 1jasong | last post by:
Hello I am new to programming and want to know what is a good free compiler is. I am asking this because there are so many of them and I just want to start programming also a good website for programming to help me, I want to major in the computer programming field and want to know if there are any really good tutorial sites. Thanks your input is much appriciated.
2
1331
by: mohaakilla51 | last post by:
Alright, so I believe that I have a decently good grasp on Basic C++, but I cannot get into the Windows Programming, it makes no sense, is there anyone that can recommend a good C++ Windows API tutorial I would be extremely grateful. I googled "Windows API Tutorial, C++" but all I got weren't very good tutorials, and were hard to understand.
75
3365
by: Amkcoder | last post by:
http://amkcoder.fileave.com/L_BitWise.zip http://amkcoder.fileave.com/L_ptr2.zip
0
8356
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
8871
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
8551
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
8640
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...
1
6198
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
5664
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
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2771
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
2
2011
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.