简体   繁体   中英

Displaying Window on Logon Screen Using C# in Windows XP

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

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.

Does anyone know how to do this with 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

我认为您必须用C ++编写它,将其编译为DLL,然后从托管代码中调用DLL。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM