Share via


ScheduleConnection (Compact 2013)

3/26/2014

This function schedules a connection for upload, or removes a scheduled connection.

Syntax

HRESULT ScheduleConnection(
  DWORD dwConnectionFlags
);

Parameters

  • dwConnectionFlags
    [in] Flag that indicates the type of action to take.

    The following table shows valid values for dwConnectionFlags.

    Flag value

    Description

    DWCF_SCHEDULE

    Schedules a connection.

    DWCF_UNSCHEDULE

    Removes a schedule connection.

  • ppszProxy
    [in] Name and port of proxy server.

Return Value

The following table shows return values for this function.

Value

Description

S_OK

Function successful.

E_FAIL

Unspecified failure.

Remarks

OpenConnection calls ScheduleConnection if problems occurred while attempting to open a connection. In addition, the Upload Client calls ScheduleConnection when it first starts to remove scheduled connections.

ScheduleConnection can use CeRunAppAtTime and CeRunAppAtEvent to schedule an upload attempt at an appropriate time.

CeRunAppAtTime is used with the registry setting UploadRetryInterval to reschedule Dw.exe to run at a later time if an upload attempt fails. This setting measures the time in minutes between upload retry attempts.

CeRunAppAtEvent is used to schedule Dw.exe to run, after an upload failure, when one of the following events occurs:

  • NOTIFICATION_EVENT_RS232_DETECTED
  • NOTIFICATION_EVENT_NET_CONNECT
  • NOTIFICATION_EVENT_PROXY_CHANGE

Requirements

Header

dwconn.h

Library

DwConn.lib

See Also

Reference

Report Upload Client Functions
OpenConnection

Other Resources

CeRunAppAtEvent
CeRunAppAtTime