We have a .NET library that platform invokes native code, specifically we call LoadLibrary(). This code has been in place for a while, but a new user has noticed when running as a Terminal Services user of a Windows Server 2008 R2 machine that it fails to run (apparently when LoadLibrary is called). This happens when run as a Standard User but not when run as an admin which is suspicious. Also it works when run on a Windows Server 2003 machine.
Now we've tested running on a Windows Server 2008 R2 machine and not had any issues before.
I'm suspicious that UAC is at play here. We had them use Process Monitor and I noticed the result INVALID PARAMETER when DeviceIOControl() is called with the control code IOCTL_MOUNTDEV_QUERY_DEVICE_NAME. Which also makes me suspicious of a mapped drive, though running the same code on a mapped drive on my machine works just fine.
Anybody have suggestions about what to try short of standing up a similar machine but the chances of us being able to replicate this in house are looking slim.