Обнаружить терминальные сервисы

{codecitation class=»brush: pascal; gutter: false;» width=»600px»}

Оформил: DeeCo

Автор: http://www.swissdelphicenter.ch

{

Question:

Do you happen to have a sample piece of code for detecting if Terminal

Services is loaded? I found this piece of C code, but I’m having a hard

time translating things…

}

function IsRemoteSession: Boolean;

const

sm_RemoteSession = $1000; { from WinUser.h }

begin

Result := (GetSystemMetrics(sm_RemoteSession) 0);

end;

{

That tells you if your program is running in a terminal client session,

which is usually all you ever need to worry about.

}

{

>

> #include

> #include

>

> // This code will only work on the Windows 2000 platform

>

> BOOL IsTerminalServicesEnabled(void)

> {

> OSVERSIONINFOEX osVersionInfo;

> DWORDLONG dwlConditionMask = 0;

>

> ZeroMemory(

Добавить комментарий