Manually locate libmysql.dll?
Posted: 23.09.2008, 11:12
In response to my topic in here, I've made a MIT-licensed app named winMyLib whose job is to "install" libmysql.dll and write a registry value of where this libmysql.dll located. winMyLib is also capable of detecting all potentially "would-be-loaded" libmysql.dll by iterating through PATH environment variable and determine whether there are libmysql.dll located there and what version it is. The main point of this app is, it able to "choose" which libmysql.dll path to write into the registry so the winMyLib-compliant apps can just simply read this registry value to determine where to find libmysql.dll.
The question is, how to tell ZConnection where to find the libmysql.dll to be used? I know I can use some dirty tricks by reading the registry value of winMyLib and just copy the pointed libmysql.dll to my exe directory (that way I dont distribute the libmysql.dll with my exe), but I mean, if can do it cleanly, why should I dirty my hands?
The question is, how to tell ZConnection where to find the libmysql.dll to be used? I know I can use some dirty tricks by reading the registry value of winMyLib and just copy the pointed libmysql.dll to my exe directory (that way I dont distribute the libmysql.dll with my exe), but I mean, if can do it cleanly, why should I dirty my hands?