Click here to Skip to main content
15,900,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Solution ot the following error Pin
ShilpiP21-Sep-07 1:43
ShilpiP21-Sep-07 1:43 
AnswerRe: Solution ot the following error Pin
David Crow21-Sep-07 3:01
David Crow21-Sep-07 3:01 
Questionhow to get port number Pin
p_20-Sep-07 23:37
p_20-Sep-07 23:37 
AnswerRe: how to get port number Pin
kakan21-Sep-07 0:42
professionalkakan21-Sep-07 0:42 
AnswerRe: how to get port number Pin
p_21-Sep-07 1:14
p_21-Sep-07 1:14 
GeneralRe: how to get port number Pin
David Crow21-Sep-07 2:57
David Crow21-Sep-07 2:57 
GeneralRe: how to get port number Pin
Dave Kreskowiak21-Sep-07 12:42
mveDave Kreskowiak21-Sep-07 12:42 
QuestionCOM port problems Pin
Cedric Moonen20-Sep-07 22:59
Cedric Moonen20-Sep-07 22:59 
QuestionCalling java method from c++ ! stuck in between while invoking jvm! Pin
amitamit19820-Sep-07 22:50
amitamit19820-Sep-07 22:50 
AnswerRe: Calling java method from c++ ! stuck in between while invoking jvm! Pin
Cedric Moonen20-Sep-07 23:23
Cedric Moonen20-Sep-07 23:23 
AnswerRe: Calling java method from c++ ! stuck in between while invoking jvm! Pin
David Crow21-Sep-07 2:55
David Crow21-Sep-07 2:55 
QuestionHow to write in windows registry Pin
Exelioindia20-Sep-07 21:00
Exelioindia20-Sep-07 21:00 
AnswerRe: How to write in windows registry Pin
Llasus20-Sep-07 21:12
Llasus20-Sep-07 21:12 
GeneralRe: How to write in windows registry Pin
Exelioindia20-Sep-07 21:50
Exelioindia20-Sep-07 21:50 
GeneralRe: How to write in windows registry Pin
Llasus20-Sep-07 22:02
Llasus20-Sep-07 22:02 
GeneralRe: How to write in windows registry Pin
Exelioindia21-Sep-07 0:09
Exelioindia21-Sep-07 0:09 
QuestionRe: How to write in windows registry Pin
David Crow21-Sep-07 2:51
David Crow21-Sep-07 2:51 
AnswerRe: How to write in windows registry Pin
nbugalia20-Sep-07 21:28
nbugalia20-Sep-07 21:28 
GeneralRe: How to write in windows registry Pin
Exelioindia20-Sep-07 21:50
Exelioindia20-Sep-07 21:50 
AnswerRe: How to write in windows registry Pin
Hamid_RT20-Sep-07 21:57
Hamid_RT20-Sep-07 21:57 
AnswerRe: How to write in windows registry Pin
ThatsAlok20-Sep-07 23:08
ThatsAlok20-Sep-07 23:08 
AnswerRe: How to write in windows registry Pin
Rahul Vaishnav21-Sep-07 1:03
Rahul Vaishnav21-Sep-07 1:03 
Use below function


BOOL WriteToRegistry(HKEY hRegRootPath, CString strRegPath, CString strRegAttribute, long lValue)
{
CRegKey key;
CString strAttributeValue;
strAttributeValue.Format("%u", lValue);
if(key.Create(hRegRootPath, strRegPath) == ERROR_SUCCESS)
{
if (key.SetValue(strAttributeValue,strRegAttribute) == ERROR_SUCCESS)
{
key.Close();
return TRUE;
}
}
return FALSE;
}


call the function as shown in example below...

WriteToRegistry(HKEY_LOCAL_MACHINE, "SOFTWARE\\ABC\\DEF", "NUM",1);





Rahul Vaishnav
GeneralRe: How to write in windows registry Pin
Exelioindia21-Sep-07 1:33
Exelioindia21-Sep-07 1:33 
GeneralRe: How to write in windows registry Pin
David Crow21-Sep-07 2:49
David Crow21-Sep-07 2:49 
General[Message Deleted] Pin
Californian221-Sep-07 5:57
Californian221-Sep-07 5:57 

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.