Well, basically, I am adding database functions into my program, Wycker. This is the first time I've ever worked with databases in Pascal and it's a learning curve. What I am trying to do it, on startup of the program, look to see if required files are present. If sqlite3.dll is missing, I want the program to exit. If the database is missing, I'm going add code to create it. If the DLL is missing, I want to notify the user to install it, although my installation program will place it in the program directory when the program is installed.
The problem I'm seeing with the snippet above is that, if the required DLL is not in the program directory, it correctly identifies that and exists. But, what is they already have the DLL in the, for example, c:\windows\system32 directory? If it's there, the program should be able to run.