显示窗口上登录画面,在Windows XP中使用C# [英] Displaying Window on Logon Screen Using C# in Windows XP

查看:253
本文介绍了显示窗口上登录画面,在Windows XP中使用C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个启动,可以在Windows XP的登录屏幕上显示一个过程C#的服务。

I am trying to create a service with C# that launches a process that can be displayed on the Windows XP Logon screen.

我发现了一些代码,是这样做的在C ++中。 C ++代码是用于创建另一个进程与STARTUPINFO.lpDesktop设为WinSta0\WinLogon的服务。然后创建的进程显示在Windows登录屏幕。我似乎无法找到一个方法来指定使用System.Diagnostic.Process类在C#中一个新的进程中桌面。

I found some code that is doing this in C++. The C++ code is for a service that creates another process with STARTUPINFO.lpDesktop set to "WinSta0\WinLogon". The created process is then displayed to the Windows Logon Screen. I can't seem to find a way to specify the 'desktop' of a new process in C# using System.Diagnostic.Process class.

有谁知道该怎么做这与C#?

Does anyone know how to do this with C#?

推荐答案

解决的办法是从C#代码中调用KERNEL32.DLL C ++的Win32 API函数CreateProcess的。这个网站是在得到正确的函数签名的C#非常有帮助的:

The solution was to call the C++ Win32 API function CreateProcess from kernel32.dll from the C# code. This site was very helpful in getting the correct function signature for C#:

http://www.pinvoke.net/default.aspx/kernel32/CreateProcess.html

这篇关于显示窗口上登录画面,在Windows XP中使用C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆