PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Sharing code between a WINDEV Mobile application and a WINDEV application or a WEBDEV site
  • Running the processes containing compilation errors
  • Note
  • Operating mode in GO mode and at run time
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
InWindowsMobileMode
In French: EnModeWindowsMobile
Indicates whether the code is run:
  • from a Windows Mobile application.
  • from a WINDEV application, from a WEBDEV site or from a PHP application.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 20 and later
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
New in version 20
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Code run from the Windows Mobile application?
IF InWindowsMobileMode() = True THEN
// Windows Mobile application
// Process to perform
...
ELSE
// WINDEV application, PHP application or WEBDEV site
// Process to perform
...
END
Syntax
<Result> = InWindowsMobileMode()
<Result>: Boolean
  • True if the code is run from an application for Windows Mobile,
  • False if the code is run from a WINDEV application, from a PHP application or from a WEBDEV site, ...
Remarks

Sharing code between a WINDEV Mobile application and a WINDEV application or a WEBDEV site

InWindowsMobileMode allows you to share code between a WINDEV Mobile application and a WINDEV application or a WEBDEV site.
During the compilation, the functions that cannot be used in WINDEV Mobile will be signaled in the "Code" pane. However, no runtime error will be triggered by these functions.
For example, the following code is shared between a WINDEV Mobile application and a WINDEV application.
MyParameterFile is string
// Code run from the WINDEV Mobile application?
IF InWindowsMobileMode() = True THEN
// WINDEV Mobile application
MyParameterFile = "\MyFiles\Param.INI"
ELSE
// WINDEV application
MyParameterFile = fCurrentDir() + "\Param.INI"
END
During the compilation, an error will be displayed in the "Code" pane to indicate that fCurrentDir is not allowed in Pocket PC. However, no runtime error will occur when the application is used on a mobile device: indeed, fCurrentDir will never be called.

Running the processes containing compilation errors

By default, the security mechanism of WLanguage is triggered when the process containing one or more compilation errors is run.
For example, if a function not allowed in the current product is found in a loop (IF), the security mechanism of WLanguage will be triggered when the loop is run.
In order for the security mechanism of WLanguage to be triggered only if the line containing the compilation error is run, check "Allow the execution of processes containing compilation errors" in the "Compilation" tab of the project description ("Project .. Project description").
For example, if a function not allowed in the current product is found in a loop (IF), the security mechanism of WLanguage will be triggered only if the line containing this function is run.
By default, the security mechanism of WLanguage is triggered only if the line containing the compilation error is run.
For example, if a function not allowed in the current product is found in a loop (IF), the security mechanism of WLanguage will be triggered only if the line containing this function is run.

Note

InWindowsMobileMode is available for all the products to allow for a multi-product code. Functions or procedures that use InWindowsMobileMode can be shared between several products without generating any compilation error.
Windows Mobile

Operating mode in GO mode and at run time

In GO mode (simulation on the development computer), InWindowsMobileMode always returns True.
InWindowsMobileMode returns False only when it is called from a standard WINDEV application.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230.dll
Windows Mobile wp230.dll
Java wd230java.jar
Linux wd230.so
Android wd230android.jar
Minimum required version
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment