PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Name and directory of executable
  • Managing errors
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
AutoRunAdd (Function)
In French: AutoLanceAjoute
Used to:
  • automatically run a Windows Mobile application according to a specific event. This run is defined from a Windows Mobile application (created with WINDEV Mobile).
  • automatically run a WINDEV application according to a specific event. This run is defined from a WINDEV application.
In both cases, the application to run can correspond to the current application.
Note: AutoRunDelete is used to cancel the automatic run of an application.
Example
Windows Mobile
// -- From a WINDEV Mobile application
// Automatically run the "OrderProducts.exe" application
// as soon as the Mobile Device (Pocket PC) is synchronized
AutoRunAdd(alEndSynchro, "\MyApplications\OrderProducts.exe")
Windows Mobile
// -- From a WINDEV Mobile application
// Automatically run the current application
// as soon as the Mobile Device (Pocket PC) exits from the standby mode
AutoRunAdd(alExitHibernate, ExeInfo(exeName))
Reports and QueriesWindowsUser code (UMC)
// -- From a WINDEV application
// Automatically run the "MyApp" application
// as soon as the Mobile Device (Pocket PC) connects to the current computer
AutoRunAdd(alConnectionPocket, "MyApp", ...
fExeDir() + "\CustomerManagement.exe")
Syntax
Windows Mobile

Running a Windows Mobile application from a Windows Mobile application Hide the details

AutoRunAdd(<Run Event> , <Executable Name>)
<Run Event>: Integer constant
Event that triggers the application run:
alStartupRun the application when starting the Mobile Device (after a reinitialization).
alEndSynchroRun the application once the Mobile Device is synchronized (via ActiveSync).
alExitHibernateRun the application when the Mobile Device exits from the standby mode.
<Executable Name>: Character string (with quotes)
Name and full path of executable for the application to run. This executable is found on the Mobile Device.
Reports and QueriesWindowsUser code (UMC)

Running a WINDEV application from a WINDEV application Hide the details

AutoRunAdd(<Run Event> , <Application Name> , <Executable Name>)
<Run Event>: Integer constant
Event that triggers the application run:
alConnectionPocketRun the application when the Mobile Device connects to the current PC.
To use this constant, you must own the administrator privileges. In Windows Vista (or later) with the UAC mechanism (check of user accounts) enabled, you must have a manifest with the administrator privileges on the application.
alDisconnectionPocketRun the application when the Mobile Device is disconnected from the current PC.
To use this constant, you must own the administrator privileges. In Windows Vista (or later) with the UAC mechanism (check of user accounts) enabled, you must have a manifest with the administrator privileges on the application.
alStartupRun the application when starting the current PC
<Application Name>: Character string (with quotes)
Name of application to run. This name will be used in AutoRunDelete.
<Executable Name>: Character string (with quotes)
Name and full path of executable for the application to run. This executable is found on the current PC.
This parameter can contain the command line that will be passed to the executable.
Remarks

Name and directory of executable

  • ExeInfo associated with the exeName constant returns the full executable name for the current application.
  • fExeDir returns the directory containing the executable of current application.

Managing errors

Caution: AutoRunAdd returns no error code. To find out whether an error was generated by this function, use the ErrorOccurred variable. To find out the error details, use ErrorInfo.
Components
WINDEVReports and QueriesWindows Mobile wd230ce.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment