Skip to Content
Visual Studio Hacks
book

Visual Studio Hacks

by James Avery
March 2005
Intermediate to advanced
304 pages
19h 23m
English
O'Reilly Media, Inc.
Content preview from Visual Studio Hacks
Use P/Invoke with Ease #62
Chapter 7, Help and Research
|
241
HACK
page also includes notes on the API as well as a tip on how to find the name
for the specific window you might be using. The page also includes sample
code that you could cut and paste directly into Visual Studio.
Using the Add-in
The PInvoke.NET wiki becomes even more valuable when you take advan-
tage of the Visual Studio add-in. The first step is to download and install the
add-in, which can done by clicking on the “Get the Visual Studio add-in”
link at the top of the PInvoke.NET page or by going to the following link:
http://www.gotdotnet.com/Community/UserSamples/Details.
aspx?SampleGuid=75122f62-5459-4364-b9ba-7b5e6a4754fe
Once you have installed the add-in, you can use it by simply right-clicking
on your document and selecting Insert PInvoke Signatures from the right-
click menu, which is shown in Figure 7-16.
Figure 7-15. PInvoke.NET signature page
Figure 7-16. PInvoke add-in menu
242
|
Chapter 7, Help and Research
#62 Use P/Invoke with Ease
HACK
If you select Insert PInvoke Signatures from the menu, the next dialog you
will see is shown in Figure 7-17.
Using this dialog, you can search for any function. In this example, I am
going to search for the
FindWindow function. The results of that search are
shown in Figure 7-18.
As you can
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Mastering Visual Studio .NET

Mastering Visual Studio .NET

Chris Sells, Ian Griffiths, Jon Flanders
C# 4.0 Unleashed

C# 4.0 Unleashed

Bart De Smet
Programming in the .NET Environment

Programming in the .NET Environment

Damien Watkins, Mark Hammond, Brad Abrams

Publisher Resources

ISBN: 0596008473Errata Page