PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Location of the copied file
  • Transferring files by infrared
  • Limitation
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
OBEXSendFile (Function)
In French: OBEXEnvoieFichier
Sends a file to a device that supports the OBEX protocol.
Example
// Bluetooth connection
IF BTConnectDevice(COL_ID, "123") = True THEN
// OBEX connection
nIDOBEXCnt = OBEXConnect(obexBluetooth, COL_MAC)
// Transfer the file
TABLE_DEVICES[TABLE_DEVICES]..BrushColor = ...
  SWITCH (OBEXSendFile(nIDOBEXCnt, sFile), ...
White, PastelRed)
// End of transfer
OBEXDisconnect(nIDOBEXCnt)
ELSE
 Error("Unable to connect to " + COL_DEVICE, ErrorInfo())
END
Syntax
<Result> = OBEXSendFile(<Identifier of OBEX Connection> , <Local File Path> [, <Remote File Path>])
<Result>: Boolean
  • True if the transfer was successful,
  • False otherwise. ErrorInfo returns more details about the problem.
Caution: The sender is not notified if the file is refused by the remote computer: ErrorInfo contains no specific error code. ErrorInfo only contains the error messages regarding the transmission.
<Identifier of OBEX Connection>: Integer
Identifier of OBEX connection to use. This identifier is returned by OBEXConnect.
<Local File Path>: Character string (with quotes)
Name and full path of the file to send.
<Remote File Path>: Optional character string (with quotes)
Name and path of the file on the remote device. If this parameter is not specified, the file keeps the same name and it is copied into the transfer directory configured on the OBEX device.
Remarks

Location of the copied file

The file is copied into the transfer directory configured on the OBEX device used. If <Remote File Path> is specified, the specified path will be relative to the transfer directory.

Transferring files by infrared

When transferring files by infrared, the transfer is completed once OBEXSendFile has been run. However, Windows keep the transfer window opened (to manage a possible new file transfer). This window is only closed when disconnecting (OBEXDisconnect).

Limitation

Only the Microsoft bluetooth stacks are supported by this function. To find out the stack used, call BTStack.
See Which stacks to use? for more details
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment