Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

OCX control on Windows systems

&pagelevel(2)&pagelevel

The openFT OCX Control on Windows systems enables users to execute synchronous file transfer requests via standard interfaces (OLE/COM) from application programs. This has the advantage of supplying the user with an immediate result, thus enabling the user to decide on his next steps.
The control offers the following advantages:

  • Embedding in Microsoft's system architecture.

  • Simple programming interface for the user which is tailored to the operating system.

  • Execution of file transfer requests from standard programs such as Visual Basic.

  • Embedding of the openFT progress display in application programs.

Please note that the OCX control can only be executed in a single thread at any time. The following tables are describing the interface.

General and optional Properties

Property

Data type

Description

Account

BSTR

Specifies the account number in the syntax of the remote system.

Compression

boolean

Specifies that sequences of the same character are to be transferred in compressed form.
This option cannot be selected for FTAM partners.
Default value is FALSE.

Encryption

boolean

The data in the file being transferred is encrypted for transfer.
This option cannot be selected for FTAM partners.
Default value is FALSE.

FilePassword

BSTR

If you want an existing file to be overwritten and the file is password-protected on the remote system, you specify the password here.

FileType

BSTR

Indicates the type of file to be transferred:

Values:
t: Text; default value
u: User Format (not in case of FTP partners)
b: Binary

LocalFile

BSTR

The name and, if appropriate, the directory path of the file to be sent to or received from the remote system.

MaxRecordLength

BSTR

Here you can specify a maximum record length for files which you want to transfer as text files or binary files with a record structure (user format).

Partner

BSTR

Partner name of the remote system.

Password

BSTR

Specifies the password in the syntax of the remote system.

RemoteFailureProc

BSTR

This command will be executed in the remote system if the file transfer fails.
This option cannot be selected for FTAM or FTP partners.

RemoteFile

BSTR

The file name can be specified as an absolute path name, or relative to the login directory in the remote system.

RemoteSuccessProc

BSTR

This command will be executed in the remote system if the file transfer is completed successfully. This option cannot be selected for FTAM or FTP partners.

ShowProgressInfo

boolean

Indicates whether the progress information bar is to be shown.
Default value is TRUE.

TransferAdmission

BSTR

The FTAC transfer admission if the user ID in the remote System is protected by FTAC.

Transparent

boolean

Select this mode only if you intend to store a file from a BS2000 system with the associated attributes on your computer and later transfer it back to the BS2000 system with all its attributes.
Can't be selected for FTAM or FTP partners.
Default value is FALSE.

UserID

BSTR

Specifies the user ID in the syntax of the remote system.

WriteMode

BSTR

Specifies whether an existing destination file is to be overwritten, extended, or left unchanged.
Values:
o: overwrite; default value
e: extend
n: no overwriting

Optional FTAM properties

Property

Data type

Description

AccessMode

BSTR

Sets the access rights of the file if the security group is available in the remote system.
Available if an FTAM partner has been specified.

Values: [r][i][p][x][e][a][c][d] | @rw | @ro.

Default value: The default values of the FTAM partner system apply.

AccountNumber

BSTR

The file storage fees are charged to this account on the FTAM partner.

Availability

BSTR

Defines the availability of the receive file if the security group is available in the remote system.
Available if an FTAM partner has been specified.

Values:
i: immediate; default value
d: deferred

CreationPassword

BSTR

If a password is required in order to create a file on a remote system, this password must be specified here.
Available if an FTAM partner has been specified.

LegalQualification

BSTR

Defines a legal qualification (corresponding to a copyright) for the file.
Available if an FTAM partner has been specified.

Methods

CancelSyncTransfer

---

Cancels the running transfer.

Declaration:

long CancelSyncTransfer(BSTR* Message);

Arguments:

[OUT] Message:

Result in plain text.

Return value:

< 0:

See remark below.

0:

The function was executed successfully.

CancelSyncTransferV

---

Cancels the running transfer.
This function is identical with CancelSyncTransfer, but the argument is of the type VARIANT*, thus allowing the function to be called from VBScript.

Declaration:

long CancelSyncTransferV (VARIANT* Message);

Arguments:

[OUT] Message:

Result in plain text.
(VARTYPE = VT_BSTR).

Return value:

< 0:

See remark below.

0:

The function was executed successfully.

IsSyncRunning

---

Checks whether there is a running synchronous transfer.

Declaration:

boolean IsSyncRunning();

Return value:

False:

There's no transfer running.

True:

There's a transfer running.

ReceiveFileSync

---

Receives a file from the partner system.

Declaration:

long ReceiveFileSync (BSTR* Message);

Arguments:

[OUT] Message:

Result in plain text.

Return value:

< 0:

See remark below.

0:

The function was executed successfully.

> 0:

Error, see manual "openFT (Unix and Windows systems) - Command Interface".

ReceiveFileSyncV

---

Receives a file from the partner system. This function is identical with ReceiveFileSync, but the argument is of the type VARIANT*, thus allowing the function to be called from VBScript.

Declaration:

long ReceiveFileSyncV (VARIANT* Message);

Arguments:

[OUT] Message:

Result in plain text.
(VARTYPE = VT_BSTR).

Return value:

< 0:

See remark below.

0:

The function was executed successfully.

> 0:

Error, see manual "openFT (Unix and Windows systems) - Command Interface".

SendFileSync

---

Sends a file to the partner system.

Declaration:

long SendFileSync (BSTR* Message);

Arguments:

[OUT] Message:

Result in plain text.

Return value:

< 0:

See remark below.

0:

The function was executed successfully.

> 0:

Error, see manual "openFT (Unix and Windows systems) - Command Interface".

SendFileSyncV

---

Sends a file to the partner system.
This function is identical with SendFileSync, but the argument is of the type VARIANT*, thus allowing the function to be called from VBScript.

Declaration:

long SendFileSyncV (VARIANT* Message);

Arguments:

[OUT] Message:

Result in plain text.
(VARTYPE = VT_BSTR).

Return value:

< 0:

See remark below.

0:

The function was executed successfully.

> 0:

Error, see manual "openFT (Unix and Windows systems) - Command Interface".

Negative return values mean:
FT_SEQERR (-4):

Sequence error, the function may not be called in the current context.

FT_BUSY (-3):

The function may not be called as long as the outstanding action isn't finished.

FT_PARERR (-2):

Parameter error indication.

FT_ERROR (-1)

General error indication.