* Check for empty if EMPTY(lcDataRoot) * Check for NULL or empty if ISNULL(lcDataRoot) OR EMPTY(lcDataRoot)>I am having a bit of difficulty with this. I have implemented the code as follows:
>parameters lcAppFolder as string >declare ExitProcess in Win32API integer ExitCode >_screen.visible = .f. >set safety off >CLEAR >ON ERROR DO errhand WITH ERROR( ), MESSAGE( ) > >#include f:\lang\wconnect\wconnect.h >set procedure to wwapi additive >set procedure to wwutils additive > >loAPI = createobject("wwAPI") >lcKey = loAPI.ReadRegistryString(HKEY_CURRENT_USER, 'Software\The Harrisburg Project\EDWin\1.0\DBC Locations - Local', 'EDWIN') >lnLength = len(lcKey) >lcDataRoot = substr(lcKey,1,(lnLength-9)) >if isnull(lcKey) > lcDataRoot = lcAppFolder >endif >if isnull(lcDataRoot) > _screen.visible = .t. > _screen.Width = 400 > _screen.Height = 400 > messagebox('Severe Error, please contact the Harrisburg Project.', 'Setup Error', 16) > nReturnCode=256 > =ExitProcess(nReturnCode) > endif >>As you can see, I want to exit and return an error code to Tarma if lcDataRoot is empty. However, I cannot seem to get a error code. Tarma looks for a nonzero being returned by a program as an indication of failure. Am I implementing this incorrectly?