Share via


KatoSetServer (Windows Embedded CE 6.0)

1/6/2010

This function specifies the location of the machine running the Windows Embedded CE 6.0 Test Kit (CETK) 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 CE:

    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 CETK 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 CETK server and the Kato client.

Requirements

Header kato.h
Library kato.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Concepts

Common Functions for C and C++ Interfaces