Read Ini file from Compiled DLL
Posted on 2004-04-30
Ok i am using Delphi 5
I have a ActiveX DLL project.
I need a DLL that inserts data into a SQLServer Database. this same DLL needs to work for various clients, which is where the ini file comes in. I can just change the connection data in the ini file and the dll should know where to connect and how.
In my DLL I have this code :
F := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'MyProject.ini');
strUser := F.ReadString('Connection', 'Login', 'User');
strPass := F.ReadString('Connection', 'Password', 'Pass');
But its like the dll gets the values from the ini file when compiled.. and if i change the ini file afterwards he doesnt notice. that means he doesnt read from the ini file....
any sugestion on how i can accomplish what i need? if there is other ways in getting outside information to the dll that could also answer this question.