Easy ways to use Win32 and other unmanaged APIs from .NET: Difference between revisions
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
[[Image:Pinvoke.net.jpg]] | [[Image:Pinvoke.net.jpg]] | ||
==PInvoke.net add-in support for Visual Studio 2008== | |||
The PInvoke.NET add-in for Visual Studio will work in Visual Studio 2008 with some slight modification to the add-in's configuration file. | |||
First, locate the PInvokeDotNetAddIn.Addin file located in %programfiles%\red gate\PInvoke.NET, open it with a text editor such as notepad.exe, and make the following changes: | |||
After the text: | |||
--------------------------------------------- | |||
<HostApplication> | |||
<Name>Microsoft Visual Studio Macros</Name> | |||
<Version>8.0</Version> | |||
</HostApplication> | |||
<HostApplication> | |||
<Name>Microsoft Visual Studio</Name> | |||
<Version>8.0</Version> | |||
</HostApplication> | |||
---------------------------------------------- | |||
Add: | |||
---------------------------------------------- | |||
<HostApplication> | |||
<Name>Microsoft Visual Studio Macros</Name> | |||
<Version>9.0</Version> | |||
</HostApplication> | |||
<HostApplication> | |||
<Name>Microsoft Visual Studio</Name> | |||
<Version>9.0</Version> | |||
</HostApplication> | |||
and save the file. | |||
It may also be necessary to add the path to the PInvoke add-in to the list of folders where Visual Studio will look for add-ins. From Visual Studio 2008's Tools menu, select Options, then Add-in/Macro security. If the path to the PInvoke.NET installation folder (c:\program files\red gate\PInvoke.NET) is not listed in the collection of add-in file paths, click the add button and select the installation folder. | |||
After restarting Visual Studio 2008, the add-in will function as it does in previous versions of Visual Studio. | |||
<google>ENGELSK</google> | <google>ENGELSK</google> |
Revision as of 06:16, 28 August 2008
<google>ENGELSK</google>
PInvoke Visual Studio Add-in
PInvoke is an add-in for Visual Studio that allows you to add an interop by opening the add-in and search for the unmanages API or Type you want to use.
PInvoke gets the information from an online Wiki http://pinvoke.net/ where also can find the interop's.
To install Pinvoke.net download it here:
You will get it together with a free trial ANTS Profiler and Exception Hunter, but you can choose not to install them.
PInvoke.net add-in support for Visual Studio 2008
The PInvoke.NET add-in for Visual Studio will work in Visual Studio 2008 with some slight modification to the add-in's configuration file.
First, locate the PInvokeDotNetAddIn.Addin file located in %programfiles%\red gate\PInvoke.NET, open it with a text editor such as notepad.exe, and make the following changes:
After the text:
<HostApplication> <Name>Microsoft Visual Studio Macros</Name> <Version>8.0</Version> </HostApplication> <HostApplication> <Name>Microsoft Visual Studio</Name> <Version>8.0</Version> </HostApplication>
Add:
<HostApplication> <Name>Microsoft Visual Studio Macros</Name> <Version>9.0</Version> </HostApplication> <HostApplication> <Name>Microsoft Visual Studio</Name> <Version>9.0</Version> </HostApplication>
and save the file.
It may also be necessary to add the path to the PInvoke add-in to the list of folders where Visual Studio will look for add-ins. From Visual Studio 2008's Tools menu, select Options, then Add-in/Macro security. If the path to the PInvoke.NET installation folder (c:\program files\red gate\PInvoke.NET) is not listed in the collection of add-in file paths, click the add button and select the installation folder.
After restarting Visual Studio 2008, the add-in will function as it does in previous versions of Visual Studio.
<google>ENGELSK</google>