Click here to Skip to main content
16,005,236 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Internationalization Pin
Gary R. Wheeler31-Mar-03 15:19
Gary R. Wheeler31-Mar-03 15:19 
GeneralRe: Internationalization Pin
Dov Sherman31-Mar-03 16:35
Dov Sherman31-Mar-03 16:35 
GeneralRe: Internationalization Pin
Gary R. Wheeler1-Apr-03 13:44
Gary R. Wheeler1-Apr-03 13:44 
GeneralRe: Internationalization Pin
Dov Sherman2-Apr-03 6:00
Dov Sherman2-Apr-03 6:00 
Questionwhy so many warnings? Pin
child_bj31-Mar-03 13:34
child_bj31-Mar-03 13:34 
AnswerRe: why so many warnings? Pin
Stefan Pedersen31-Mar-03 13:50
Stefan Pedersen31-Mar-03 13:50 
AnswerRe: why so many warnings? Pin
Michael Dunn31-Mar-03 14:24
sitebuilderMichael Dunn31-Mar-03 14:24 
GeneralGetPrivateProfileString() Problem Pin
Justin Cooke31-Mar-03 11:45
Justin Cooke31-Mar-03 11:45 
I'm having a really hard time getting this function to properly find a file. I know I'm supposed to use the registry for app initialization info, but I've got an old app and DLL that use an INI file and I need to continue supporting it.

I'm just trying to read from a file called "api.ini" in the same directory as the application. Of course, that directory is not known at compile time. I determine the directory using GetModuleFileName() and append api.ini to the full path. Then I convert all '\' chars to '\\' since that is how the func needs it. This never works!

If I put the api.ini file in the WINNT directory, and only pass "api.ini" as the last param to GetPrivateProfileString(), it properly finds the file. If I hard code the full path ("c:\\program files\\test\\api.ini"), the function finds the file IF the application is run from a different directory (the VS 6.0 dev environment.) However, if I place the app in the c:\program files\test\ directory, then it fails and can't find the file.

Does anybody know why this is not working for me? It seems so simple...I assume I'm missing something really easy. I should be able to just pass the full path to the file and have it read properly. By the way, I have verified that the path I pass to GetPrivateProfileString() is the correct, full path.

Any help would be greatly appreciated. Confused | :confused:

GeneralRe: GetPrivateProfileString() Problem Pin
Anders Molin31-Mar-03 11:51
professionalAnders Molin31-Mar-03 11:51 
GeneralRe: GetPrivateProfileString() Problem Pin
Justin Cooke31-Mar-03 12:05
Justin Cooke31-Mar-03 12:05 
GeneralRe: GetPrivateProfileString() Problem Pin
Jeremy Falcon31-Mar-03 12:24
professionalJeremy Falcon31-Mar-03 12:24 
GeneralRe: GetPrivateProfileString() Problem Pin
Navin31-Mar-03 14:30
Navin31-Mar-03 14:30 
QuestionRT libs for DLL in MFC? Pin
Squatch631-Mar-03 11:14
Squatch631-Mar-03 11:14 
AnswerRe: RT libs for DLL in MFC? Pin
AlexO31-Mar-03 11:33
AlexO31-Mar-03 11:33 
GeneralOne more question: Pin
Squatch631-Mar-03 11:59
Squatch631-Mar-03 11:59 
GeneralRe: One more question: Pin
AlexO31-Mar-03 12:09
AlexO31-Mar-03 12:09 
GeneralI'm minimizing myself now.... Pin
Rickard Andersson2031-Mar-03 9:59
Rickard Andersson2031-Mar-03 9:59 
GeneralRe: I'm minimizing myself now.... Pin
Dave Bryant31-Mar-03 10:03
Dave Bryant31-Mar-03 10:03 
GeneralRe: I'm minimizing myself now.... Pin
User 665831-Mar-03 10:04
User 665831-Mar-03 10:04 
GeneralRe: I'm minimizing myself now.... Pin
Rickard Andersson2031-Mar-03 10:13
Rickard Andersson2031-Mar-03 10:13 
GeneralDrawing using dc's in a Dialog Pin
bobthemonkey31-Mar-03 8:44
bobthemonkey31-Mar-03 8:44 
GeneralRe: Drawing using dc's in a Dialog Pin
Alvaro Mendez31-Mar-03 8:51
Alvaro Mendez31-Mar-03 8:51 
GeneralRe: Drawing using dc's in a Dialog Pin
Dave Bryant31-Mar-03 10:16
Dave Bryant31-Mar-03 10:16 
GeneralODBC :o) Pin
MemLeak31-Mar-03 7:39
MemLeak31-Mar-03 7:39 
GeneralRe: ODBC :o) Pin
Cambalindo31-Mar-03 10:11
Cambalindo31-Mar-03 10:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.