Mobile SDK for Windows Apps2.0
Transforming Windows apps into Mobile apps
Receiver Client Type Detection

This section briefly describes the approach to determine the Citrix Receiver client type.

In the context of the Mobile SDK for Windows Apps, the first thing an application would do is to establish a Mobile Receiver Virtual Channel (MRVC) connection. If the MRVC connection is successful, the application can be certain that it is dealing with a mobile Receiver at the other end. The application can then take appropriate actions to best deal with the mobile device, for example, to switch to appropriate themes and/or views that are appropriate for the mobile device type and/or form factor, to enable phone call, SMS, picture taking and other capabilities provided by the SDK, etc.

However, in the scenario where the MRVC connection cannot be established, the application may want to determine the exact Receiver client type and take appropriate actions. The traditional approach to determine the Receiver client type is via the Citrix WFAPI SDK where the client product ID of the connected Receiver can be retrieved.

The specifics for WFAPI SDK will not be discussed here, please refer to the follow link for more information:

The specific WFAPI API for retrieving client product ID is WFQuerySessionInformation, which has the following function prototype:

	BOOL WINAPI WFQuerySessionInformation
		IN HANDLE hServer,
		IN DWORD SessionId,
		OUT LPTSTR * ppBuffer,
		OUT DWORD * pBytesReturned


  • hServer - A handle to a server that is running XenApp Server. Use the WFOpenServer() function to obtain a handle for a particular server, or specify WF_CURRENT_SERVER_HANDLE to use the current server.
  • SessionId - The session ID of a server that is running XenApp Server. WF_CURRENT_SESSION specifies the current session.
  • WFInfoClass - Type of information to be retrieved from the specified session, use WFClientProductId to retrieve the product ID
  • ppBuffer - A pointer to the address of a variable that will receive the information about the specified session. The format and contents of the data depend on the specified information class being queried. The buffer is allocated by this function and is deallocated using the WFFreeMemory() function.
  • pBytesReturned - A pointer to the variable that will receive the number of returned bytes. If this value is NULL, the byte count is not returned.

If the WFQuerySessionInformation API call is successful, the Receiver client product ID can be extracted using the pseudo code as shown below:

	LPTSTR pSessionInfo = NULL;
	DWORD byteCount = 0;
	WORD clientProductId = 0;
	if ( WFQuerySessionInformation (
		&byteCount ) )
		if ( byteCount == sizeof ( WORD ) )
			clientProductId = (WORD) *pSessionInfo;

Presented below is an updated list of the Receiver client product IDs and their corresponding client platforms:

Client Product ID Client Platform
0x0001 Windows
0x000A EPOC
0x000B OS/2
0x000E DOS32
0x0051 UNIX / Linux
0x0052 Macintosh
0x0053 iOS
0x0054 Android
0x0055 Blackberry
0x0056 Windows Phone 8/WinRT
0x0057 Windows Mobile
0x0058 Blackberry Playbook
0x0101 HTML5
0x0105 Java
0x1F09 Windows CE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Events Defines