PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
New WINDEV 23 feature!
  • Overview
  • How to proceed?
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
C#: Call to WLanguage procedure
Overview
A global procedure in WLanguage can be directly called from the code of a global procedure in C#.
How to proceed?
To call a WLanguage procedure from the code of a global procedure in C#:
  1. Type the code of WLanguage procedure. The WLanguage procedure must comply with some rules:
    • Have an acceptable name in C#.
    • The type of procedure parameters and the type of return value must be supported types: boolean, integer, real, string, buffer. We advise you to pass the parameters by value via the "LOCAL" keyword.
    • The "C#" attribute must be added to the WLanguage procedure.
    Example:
    PROCEDURE nWL_AddOne(LOCAL n is int), C#: int
    RESULT n+1
  2. Then, all you have to do is call the procedure from the C# code.
    For example:
    int nCSharp_ResultInt(int i)
    {
    return nWL_AddOne(i);
    }
See also
Minimum required version
  • Version 23
Comments
Click [Add] to post a comment