Archive: System plugin hlelp: shlwapi.dll


System plugin help
I'm trying to call the 'IsOS' function of shlwapi.dll.

MSDN link:
http://msdn.microsoft.com/library/de...thers/IsOS.asp

Unfortunately, when I use Dependency Walker on Shlwapi.dll, I don't see the IsOS function on the list of functions. (each time I try to call it using the system plugin, I get an error returned.)

I belive my syntax is correct (see sample below):


StrCpy $1 8 ; to detect win2k or higher
System::call "shlwapi.dll::IsOS(i r1)i .r2"

I've tried other values for $1 too, but always $2 returns 'error'.

My current version of shlwapi.dll on Win2k is 6.0.2800.1612.

Ultimately, I'm trying to determine if an installation is being run on a terminal server or not and this was the only function I've found so far that should work the same on any flavor of Windows.

Any comments/suggestions are welcome.

I may be wrong, but if I understand the System Readme correctly, you're not supposed to put .dll in the Call command. Of course, since I have no experience with using the plugin, it could be optional and I don't know about it.

As for detecting the terminal server thing, it looks like this might be usable:
OS_TERMINALCLIENT 14 Windows 2000/Windows XP/Windows Server 2003 The program is running as a Terminal Server client. Equivalent to GetSystemMetrics(SM_REMOTESESSION).

So if you can't get this working, then GetSystemMetrics might be usable.


hmmm.. I think I must have misread GetSystemMetrics before. :o

The command you mentioned (SM_REMOTESESSION) works on Win2k and above (which is what I want). But the other command next to it (SM_REMOTECONTROL) does not work on Win2k. This is why I though that IsOS was the only way to go. But now I read this and see that GetSystemMetrics just might work!

Thanks for the reply, Pidgeot! (Now I will play...)
:D

For anyone that cares, here's the MSDN link for GetSystemMetrics:
http://msdn.microsoft.com/library/de...temmetrics.asp