开发者

How to declare QueryFullProcessImageName() API C# (Windows 7 x64)

开发者 https://www.devze.com 2023-03-09 14:35 出处:网络
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?.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号