Click here to Skip to main content
15,917,481 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Debug a Com DLL Pin
Adam Roderick J10-Aug-09 19:48
Adam Roderick J10-Aug-09 19:48 
GeneralUnregister a DLL Pin
002comp10-Aug-09 20:11
002comp10-Aug-09 20:11 
GeneralRe: Unregister a DLL Pin
Adam Roderick J10-Aug-09 20:30
Adam Roderick J10-Aug-09 20:30 
GeneralRe: Unregister a DLL Pin
002comp10-Aug-09 20:53
002comp10-Aug-09 20:53 
GeneralRe: Unregister a DLL Pin
Adam Roderick J11-Aug-09 0:18
Adam Roderick J11-Aug-09 0:18 
Questionini file Pin
Member 59031010-Aug-09 19:23
Member 59031010-Aug-09 19:23 
AnswerRe: ini file Pin
002comp10-Aug-09 19:31
002comp10-Aug-09 19:31 
AnswerRe: ini file Pin
Joe Woodbury10-Aug-09 19:44
professionalJoe Woodbury10-Aug-09 19:44 
Do NOT use the above code. It destroys the key advantage of INI files; atomic operations amongst multiple threads and instances accessing an ini file. It's unsafe, bloated code that adds nothing in Win32.

The calls you want to use are ReadPrivateProfile... and WritePrivateProfile... APIs. One hint: when accessing an ini file in the current directory you must either use a fully resolved path or precede it with ".\\".

As stated above, the great advantage of using the native APIs is that read and writes are atomic operations. That is, if one process or thread Writes a value string and another process or thread reads that value string, you will get the entire string, not a partially written one. This also means that you can safely rewrite an entire section using WritePrivateProfileSection().

Another advantage of the native APIs is that they are very lightweight.

modified on Tuesday, August 11, 2009 1:58 AM

GeneralRe: ini file Pin
Adam Roderick J10-Aug-09 19:54
Adam Roderick J10-Aug-09 19:54 
Question#define problem Pin
kk.tvm10-Aug-09 19:02
kk.tvm10-Aug-09 19:02 
AnswerRe: #define problem Pin
Code-o-mat10-Aug-09 20:33
Code-o-mat10-Aug-09 20:33 
GeneralRe: #define problem Pin
kk.tvm10-Aug-09 22:24
kk.tvm10-Aug-09 22:24 
AnswerRe: #define problem Pin
Adam Roderick J10-Aug-09 20:36
Adam Roderick J10-Aug-09 20:36 
GeneralRe: #define problem Pin
kk.tvm10-Aug-09 22:26
kk.tvm10-Aug-09 22:26 
AnswerRe: #define problem Pin
Stuart Dootson10-Aug-09 21:29
professionalStuart Dootson10-Aug-09 21:29 
GeneralRe: #define problem Pin
kk.tvm10-Aug-09 22:26
kk.tvm10-Aug-09 22:26 
AnswerRe: #define problem Pin
David Crow11-Aug-09 3:18
David Crow11-Aug-09 3:18 
QuestionLNK errors while using an "extern "C"" function Pin
MozhdehQeraati10-Aug-09 18:43
MozhdehQeraati10-Aug-09 18:43 
AnswerRe: LNK errors while using an "extern "C"" function Pin
«_Superman_»10-Aug-09 18:52
professional«_Superman_»10-Aug-09 18:52 
GeneralRe: LNK errors while using an "extern "C"" function Pin
MozhdehQeraati10-Aug-09 19:48
MozhdehQeraati10-Aug-09 19:48 
GeneralRe: LNK errors while using an "extern "C"" function Pin
«_Superman_»10-Aug-09 19:54
professional«_Superman_»10-Aug-09 19:54 
GeneralRe: LNK errors while using an "extern "C"" function Pin
Cedric Moonen10-Aug-09 20:15
Cedric Moonen10-Aug-09 20:15 
QuestionReturn value from a funtion Pin
AkashAg10-Aug-09 18:06
AkashAg10-Aug-09 18:06 
AnswerRe: Return value from a funtion Pin
«_Superman_»10-Aug-09 18:41
professional«_Superman_»10-Aug-09 18:41 
GeneralRe: Return value from a funtion Pin
AkashAg10-Aug-09 18:46
AkashAg10-Aug-09 18:46 

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.