GetPrivateProfileString does not work in WPF
-
I wrapped a class to call win32 api functions, use GetPrivateProfileString to get values in ini file. it works in Unit Test, but does not work called in WPF window. My project based on .NET FW 3.0, without any SP. anyone know how to solve this?
Glad to discuss with you and best wishes.
-
I wrapped a class to call win32 api functions, use GetPrivateProfileString to get values in ini file. it works in Unit Test, but does not work called in WPF window. My project based on .NET FW 3.0, without any SP. anyone know how to solve this?
Glad to discuss with you and best wishes.
If it works in a unit test, there's no reason it shouldn't work in WPF. I wouldn't use this API though, if I were you, because it's designed to provided compatibility with 16 bit applications. You should look to use either the registry or a config file for your settings.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
-
If it works in a unit test, there's no reason it shouldn't work in WPF. I wouldn't use this API though, if I were you, because it's designed to provided compatibility with 16 bit applications. You should look to use either the registry or a config file for your settings.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
Pete O'Hanlon wrote:
If it works in a unit test, there's no reason it shouldn't work in WPF.
Agree with you, but it true, it happened.
Pete O'Hanlon wrote:
You should look to use either the registry or a config file for your settings.
I intend to write my classes to read\write ini file. I prefer to ini files than xml file as config file.
Glad to discuss with you and best wishes.
-
Pete O'Hanlon wrote:
If it works in a unit test, there's no reason it shouldn't work in WPF.
Agree with you, but it true, it happened.
Pete O'Hanlon wrote:
You should look to use either the registry or a config file for your settings.
I intend to write my classes to read\write ini file. I prefer to ini files than xml file as config file.
Glad to discuss with you and best wishes.
Without seeing your project, there's not a lot I can suggest.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith