How to declare QueryFullProcessImageName() API C# (Windows 7 x64)
I need to use it, but in pinvoke i can't get the declaration of that API.
So... is there a way for declare it?.
And if your got an example for use it would be perfect, because is the firs开发者_StackOverflow社区t time i gonna use that api.
using System;
using System.Runtime.InteropServices;
using System.Text;
//...
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)]
static extern bool QueryFullProcessImageName(IntPtr hProcess, uint dwFlags,
[Out, MarshalAs(UnmanagedType.LPTStr)] StringBuilder lpExeName,
ref uint lpdwSize);
For the usage, see the documentation.
精彩评论