Share via


OpenConnection (Compact 2013)

3/26/2014

This function opens a connection to the upload server.

Syntax

HRESULT OpenConnection(
  HANDLE* phConnection,
  LPCWSTR* ppszServer,
  LPWSTR* ppszProxy
);

Parameters

  • phConnection
    [out] Pointer to a handle for the connection.
  • ppszServer
    [out] Pointer to the name of the upload server.

    Must be a string of type wchar or be NULL.

  • ppszProxy
    [out] Pointer to the name and port of the proxy server.

    Must be a string of type wchar or be NULL.

Return Value

The following table shows return values for this function.

Value

Description

S_OK

Function successful.

E_FAIL

Unspecified failure.

Remarks

This API returns NULL for all parameters. However, you can replace DwConn.lib by specifying SYSGEN_REPLACE_DWCONN and then set DW_REPLACE to the name of the new library.

When you replace this library, you can set the server name and proxy server for upload.

phConnection is returned in ReleaseConnection. This parameter allows the library to associate the open connection action with a corresponding release action, and free resources if needed.

If ppszServer is not set, the upload component uses the default server watson.microsoft.com.

If ppszProxy is not set, the upload component uses the current device proxy setting.

The server and proxy names must not include the protocol specifier 'http://'.

The proxy name should be of the form proxyserver:portnumber, such as myproxy:80.

Link Library: DwConn.lib.

Requirements

Header

dwconn.h

Library

DwConn.lib

See Also

Reference

Report Upload Client Functions
ReleaseConnection