KatoSetServer (Compact 2013)

3/26/2014

This function specifies the location of the machine running the Windows Embedded Compact Test Kit (CTK) server.

Syntax

BOOL KatoSetServer(
  LPCTSTR szServer
);

Parameters

  • szServer
    For Windows-based desktop platforms:

    Specifies the computer name or IP address of the machine that is running the Kato server. A value of NULL will cause a dialog box to appear that will prompt the user for a computer.

    For Windows Embedded Compact:

    Specifies the computer name or IP address of the machine that is running the Kato server. A value of NULL indicates that the development workstation to which the target device is connected is the server.

Return Value

Nonzero if successful; otherwise, zero. To get extended error information, call the GetLastError function.

Remarks

With this function, Kato routes the output of all CKato objects that reside within the given process to the Windows Embedded Compact Test Kit (CTK) server. All CKato objects created before and after the call to the KatoSetServer function will be routed to the server. It is recommended that the KatoSetServer function be called before any CKato objects are created to prevent the possibility of a lost log. If neither KatoSetServer nor KatoSetCallback is called, applications may still call CKato members, but the log will be discarded.

If the function fails, the GetLastError function will return one of the following values:

Error value

Description

ERROR_OPEN_FAILED

A socket error occurred while trying to open the connection.

ERROR_BAD_NET_NAME

The machine name is invalid or the machine is not reachable.

ERROR_SERVER_DISABLED

The server is disabled or not running on the machine specified.

ERROR_REVISION_MISMATCH

There is a version mismatch between the Windows Embedded Compact Test Kit (CTK) server and the Kato client.

Requirements

Header

kato.h

Library

kato.lib

See Also

Concepts

Common Functions for C and C++ Interfaces