DLL Example: Using an Alias

The Windows User32.DLL IsCharAlpha function determines whether a character is alphabetical. The IsCharAlpha function has two versions: IsCharAlphaA (ANSI) and IsCharAlphaW (Unicode). If you wanted to declare the IsCharAlphaA function in your application but did not want to have to enter the "A" suffix in your code each time that you called the function, you could set an alias in the procedure's Properties window as shown below:

Note that the actual name of the procedure in the DLL, "IsCharAlphaA," is in the Alias field, while the function name that you are declaring within ATEasy, "IsCharAlpha," is in the Name field.

The example below uses the alias "IsCharAlpha" instead of "IsCharAlphaA."

if IsCharAlpha('c')=FALSE ! should be TRUE

TestStatus=FAIL

endif

if IsCharAlpha('1') ! should be FALSE

TestStatus=FAIL

endif

if not IsCharAlpha(65) ! should be TRUE

TestStatus=FAIL

endif