Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WTSQuerySessionInformation() - GetLastError() returning 0x000000B7

255 views
Skip to first unread message

Chuck Chopp

unread,
Oct 21, 2002, 1:07:42 PM10/21/02
to
Some code of mine is being run on a Citrix MetaFrame system [WinNT v4.0
Terminal Server Edition] and it is calling WTSQuerySessionInformation().

The NT/Citrix version information is as follows:

Windows Terminal Server Build 419 SP6
Citrix Metaframe 1.80 Build 663

When calling this function and passing in a value of
WTSApplicationName for the WTSInfoClass parameter value, the function is
failing and returning FALSE. A call to GetLastError() obtains an error
code of 0x000000B7 (183 decimal).

The Win32 Error Codes table defines this error # as follows:

183 Cannot create a file when that file already exists.
ERROR_ALREADY_EXISTS

This does not make any sense.

Is there a more accurate listing of what the error #'s are and their
meanings for the WTS*() functions?


TIA,

Chuck
--
Chuck Chopp

ChuckChopp (at) rtfmcsi (dot) com http://www.rtfmcsi.com
ICQ # 22321532
RTFM Consulting Services Inc. 864 801 2795 voice & voicemail
103 Autumn Hill Road 864 801 2774 fax
Greer, SC 29651 800 774 0718 pager
8007740718 (at) skytel (dot) com

Do not send me unsolicited commercial email.

Mahadev Alladi[MS]

unread,
Oct 29, 2002, 3:57:20 AM10/29/02
to
This error code also means "STATUS_OBJECT_NAME_COLLISION". Hope this makes
more sense to you.

--
Mahadev Alladi [MS]
This posting is provided "AS IS" with no warranties, and confers no rights.
---

"Chuck Chopp" <Chuck...@rtfmcsi.com> wrote in message
news:3DB4345E...@rtfmcsi.com...

Chuck Chopp

unread,
Oct 29, 2002, 8:15:47 AM10/29/02
to
Mahadev Alladi[MS] wrote:
> This error code also means "STATUS_OBJECT_NAME_COLLISION". Hope this makes
> more sense to you.
>


Hmmm.... It at least gives me something to investigate further. The
actual error code name itself doesn't hold a whole lot meaning for me
right now, but I'm most likely lacking some important contextual
information that is required to use it to locate the actual problem.

Is there a specific header file where this is defined besides the
general purpose WinError.h file?

Chuck Chopp

unread,
Oct 30, 2002, 8:10:25 AM10/30/02
to
Mahadev Alladi[MS] wrote:
> For more error codes, check the DDK header file ntstatus.h. Also, take a
> look at the KB link -
> http://support.microsoft.com/default.aspx?scid=KB;EN-US;q113996& for more
> information.
>


The DDK is where this information is at? OK, I could kick myself now.
Sometimes it is easy to forget that the DDK contains some of this
information. I'll give it a more thorough review.


> I hope this is of some use to you.
>


Yes, it is of some use to me if it helps me to figure out what's going
wrong in this particular situation.


> Just to clarify, does the WTSQuerySessionInformation API return 0?


Yes, the return value of the function is zero [FALSE], and a call to
GetLastError() returns 0x000000B7 [183 decimal].

Alex K. Angelopoulos (MVP)

unread,
Oct 31, 2002, 7:48:21 AM10/31/02
to
I never even THOUGHT about the DDK when I was looking at this....

In news:3DBFDA41...@rtfmcsi.com,
Chuck Chopp typed:


> Mahadev Alladi[MS] wrote:
>> For more error codes, check the DDK header file ntstatus.h. Also,
>> take a look at the KB link -
>> http://support.microsoft.com/default.aspx?scid=KB;EN-US;q113996& for
>> more information.
>>
>
>
> The DDK is where this information is at? OK, I could kick myself now.
> Sometimes it is easy to forget that the DDK contains some of this
> information. I'll give it a more thorough review.
>
>
>> I hope this is of some use to you.
>>
>
>
> Yes, it is of some use to me if it helps me to figure out what's going
> wrong in this particular situation.
>
>
>> Just to clarify, does the WTSQuerySessionInformation API return 0?
>
>
> Yes, the return value of the function is zero [FALSE], and a call to
> GetLastError() returns 0x000000B7 [183 decimal].

--
Please respond in the newsgroup so everyone may benefit.
http://dev.remotenetworktechnology.com
----------
Subscribe to Microsoft's Security Bulletins:
http://www.microsoft.com/technet/security/bulletin/notify.asp

Chuck Chopp

unread,
Oct 31, 2002, 8:07:57 AM10/31/02
to
Alex K. Angelopoulos (MVP) wrote:
> I never even THOUGHT about the DDK when I was looking at this....
>


I've used the DDK in the past when I needed to call some of the Zw*()
functions to do some rather exotic things with the registry on WinNT/2K.
In those cases, there was no Win32 API function wrapped around one of
the kernel Zw*() functions, but it was still callable from user-mode
code. At the time, it was also not obvious that the DDK was where I
needed to be looking for a solution to a problem. Since then, I've
purchased Gary Nebbett's "Windows NT/2000 Native API Reference" book and
I've been getting more familiar with the Win32 kernel API functions.

0 new messages