Getting window titles from a windows service

后端 未结 3 2138
庸人自扰
庸人自扰 2020-12-21 11:55

My company is using an unfortunate third party product that requires a user to be left logged on to an XP workstation running two instances of it\'s product.

I was t

3条回答
  •  感动是毒
    2020-12-21 12:34

    I don't think you can do that with the .net framework...

    but you can with WinAPI: http://msdn.microsoft.com/en-us/library/ms633497%28v=vs.85%29.aspx

    and you can call it from C# like so: http://www.pinvoke.net/default.aspx/user32/enumwindows.html

    An important note: your process need to have permissions for this...


    you'll also probably need this: http://msdn.microsoft.com/en-us/library/ms633520(v=vs.85).aspx http://www.pinvoke.net/default.aspx/user32.getwindowtext

提交回复
热议问题