beautypg.com

Connectras – Argox PT-9130 User Manual

Page 109

background image

PT-90 Mobile Computer SDK Programming Manual 102

ConnectRAS

Establishes a RAS connection. Supports callback information.

DWORD ConnectRAS

{

LPTSTR

lpEntryName

,

HWND

hNotifyWnd

}

Parameters

lpEntryName

[in] The entry name to use to establishes the connect.

hNotifyWnd

[in] Pointer to a window handles to receive RasDial event notifications (for WinCE is

WM_RASDIALEVENT). If lpEntryName is not NULL, the RasDial call operates asynchronously,

send a message for each RAS event. If lpEntryName is NULL, the RasDial call operates synchronously,

RasDial does not return until the connection has succeed or failed. See Microsoft documentation for

WM_RASDIALEVENT message related.

Returned Values

If the action succeeds, the returned value is

E_FUNC_SUCCEED

. If the action fails, possible returned values are

E_FUNC_ERROR

,

E_FUNC_PAR_ERROR

,

GPRS_ERR_DEVICE_ERROR

.

Example

if(ConnectRAS(_T(“GPRS Connection”), NULL) != E_FUNC_SUCCEED)

AfxMessageBox(_T("Connect RAS fail!"));

Requirements

OS Versions: Windows CE 6.0 or beyond.

Header: sysapiax.h

Link Library: sysapiax.lib

Link DLL: sysapiax.dll
Device: PT90