AlphaCom ActiveX Document Server Interface


VOID ActivateFrame()
Activates the AlphaCom frame window.

VOID ActivateSession(LPCTSTR SessionTitle)
Activates the AlphaCom session that has the specified session title.

VOID BringWindowToTop()
Brings the AlphaCom window to the front of all other windows.

VOID CloseApp()
Force application to close.

VOID Connect()
Connect to remote host.

VOID ConnectForSession(LPCTSTR SessionTitle)
Connect the specified session to remote host.

VOID Dial(LPCTSTR PhoneNumber)
Dials the specific telephone number and attempts a modem connection.

VOID Disconnect()
Disconnect session from remote host.

VOID Display(LPCTSTR String)
Display the specified string on the screen. Nothing is sent to the host. Use a backslash or caret to send control characters such as:
^[A-Z] = Control character (e.g. ^C = CONTROL-C)
^^ = Literal caret
\b = BACKSPACE ASCII 8
\e = ESCAPE ASCII 27
\n = NEWLINE ASCII 10
\r = RETURN ASCII 13
\[3 digit decimal number] = Specified ASCII value
\\ = Literal backslash

LONG GetBaudRate()
Return the current baud rate.

BOOL GetConnectStatus()
Returns a TRUE if the session is currently connected.

BOOL GetConnectStatusForSession(LPCTSTR SessionTitle)
Returns a TRUE if the session with the specified session title is currently connected.

BSTR GetCurrentPort()
Returns the current port "COM1", "COM2", etc.

SHORT GetCursorColumn()
Return the current column of the cursor starting with 0.

SHORT GetCursorRow()
Return the current row of the cursor starting with 0.

SHORT GetDataBits()
Returns the number of data bits for the current session

BSTR GetDial()
Returns the telephone number

SHORT GetDialState()
Return the state of when the modem is dialing out
0 = Modem is not currently dialing
1 = Modem is being initialized
2 = Modem is dialing a telephone number
3 = Modem has successfully connected
4 = The modem was unable to connect

SHORT GetFlowControl()
Return the current flow control (hardware or software).
FC_DTRDSR = 0x01
FC_RTSCTS = 0x02
FC_XONXOFF = 0x04

BSTR GetHost()
Return the TCP/IP address or hostname

SHORT GetLoginState()
Return the state of autologin
0 = Not currently performing autologin
1 = Waiting for the text in the first waitfor textbox
2 = Waiting for the text in the second waitfor textbox
3 = Waiting for the text in the third waitfor textbox
4 = Waiting for the text in the fourth waitfor textbox
5 = Waiting for the text in the fifth waitfor textbox
6 = Autologin was successful
7 = Autologin failed

SHORT GetModemState()
Return the current state of the modem.
0 = Normal
1 = Dialing
2 = Hanging up

BSTR GetParity()
Return the parity of the current connection.

LONG GetPort()
Return the TCP/IP port. Normally set to 23.

SHORT GetPortCount()
Return the number of usable RS-232 ports that are available.

BSTR GetPortName(SHORT PortNumber)
Return the name of a specified port. This can be used in conjunction with GetPortCount() to enumerate available serial ports.

SHORT GetStopBits()
Return the number of stop bits.

SHORT GetTransferState()
Return the file transfer state:
TRS_NORMAL = 0
TRS_SENDING = 1
TRS_RECEIVING = 2
TRS_SUCCESS = 3
TRS_FAILURE = 4

LONG GetWindowPosBRx()
Return the x-coordinate of the AlphaCom window's bottom right corner, or -1 if failed.

LONG GetWindowPosBRy()
Return the y-coordinate of the AlphaCom window's bottom right corner, or -1 if failed.

LONG GetWindowPosULx()
Return the x-coordinate of the AlphaCom window's upper left corner, or -1 if failed.

LONG GetWindowPosULy()
Return the y-coordinate of the AlphaCom window's upper left corner, or -1 if failed.

VOID Hangup()
Hangup an active modem connection

VOID HideMenuBar()
Hide the AlphaCom menu bar. Menu bar is automatically restored when sessions are activated, so you may need to call this for every session activated.

VOID HideWindow(SHORT snCmdHide)
Make session and entire application invisible.
1 = Hides the application window and passes activation to another window.
2 = Minimizes the application window. Same as passing 4 to ShowWindow()

VOID NewSession()
Force the creation of a new session

BOOL OpenSessionFile(LPCTSTR FileName)
Force the openning of a session file

BSTR ReadScreen(SHORT Column, SHORT Row, SHORT Length)
Return the text found on the screen at the specified Column and Row with the number of characters equal to Length. The upper left hand corner of the screen is 0,0.

VOID ReceiveFile(LPCTSTR pszRemoteDir, LPCTSTR pszLocalDir, LONG nProtocol, BOOL fBinary)
Receive file.

VOID Send(LPCTSTR String)
Send the specified string to the host. See Display() command for sending control characters.

VOID SendBreak()
Sends a break. Available on RS232 Modem/Serial sessions only.

VOID SendFile(LPCTSTR pszLocalFile, LPCTSTR pszRemoteDir, LONG nProtocol, BOOL fBinary)
Send file.

VOID SendKeystroke(LONG nVKey, BOOL fShift, BOOL fControl, BOOL fAlt)
Send a keystroke as if a user typed it into an active session.

VOID SetBaudRate(LONG nBaud)
Set the baud rate.

VOID SetCurrentPort(LPCTSTR PortName)
Set the communication port to COMx.

VOID SetDataBits(SHORT snBits)
Set the data bits for an RS-232 connection.

VOID SetDial(LPCTSTR PhoneNumber)
Set the telephone number to dial.

VOID SetFlowControl(SHORT snValue)
Set the hardware/software flow control for an RS-232 connection.
FC_DTRDSR = 1
FC_RTSCTS = 2
FC_XONXOFF = 4

VOID SetForegroundWindow()
Puts the application window into the foreground and activates it.

VOID SetHost(LPCTSTR pszHostName)
Set the host name or TCP/IP address.

VOID SetHostForSession(LPCTSTR SessionTitle, LPCTSTR pszHostName)
Set the host name or TCP/IP address for the specified session.

VOID SetParity(LPCTSTR pszParity)
Set the parity for the RS-232 connection.

VOID SetPort(LONG nPort)
TCP/IP port to use for telnet connection. This is normally 23 for telnet.

VOID SetStopBits(SHORT snStopBits)
Set the number of stop bits to use in an RS-232 connection.

VOID SetWindowPos(SHORT x, SHORT y, SHORT width, SHORT height)
Set the position and dimension of the application window.

VOID ShowWindow(SHORT snCmdShow)
Make application and session windows visibile to the user.
1 = Activates the application window and displays it in its current size and position.
2 = Activates and displays the application window. If the window is minimized or maximized, it is restored to its original size and position.
3 = Activates the application window and displays it as a maximized window.
4 = Minimizes the application window. Same as passing 2 to HideWindow()

VOID WaitFor(LPCTSTR Send, LPCTSTR WaitFor, DWORD TimeOut, SHORT Retries)
Send the string, Send, to the host and initiate a waitfor sequence to determine if a specified sequence of characters, WaitFor, have been received. TimeOut represents the number of milliseconds to attempt another retry, if any, or to abort. Retries represents the number of additional retries. A Retries value of 0 will attempt a WaitFor sequence only once. This is a non-blocking asynchronous call. Use WaitTimeOut() and WaitFound() to determine status.

BOOL WaitFound()
Returns a TRUE if an attempted WaitFor command has been issued and the desired text has been received. Otherwise, a FALSE is returned.

BOOL WaitTimeOut()
Returns a TRUE if an attempted WaitFor command has been issued but has timed out. Otherwise, a FALSE is returned.