Click here to Skip to main content
16,006,442 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to store a c constant in an int variable Pin
Michael P Butler12-May-02 11:29
Michael P Butler12-May-02 11:29 
GeneralRe: How to store a c constant in an int variable Pin
Sam M C12-May-02 13:34
Sam M C12-May-02 13:34 
GeneralRe: How to store a c constant in an int variable Pin
Jon Hulatt12-May-02 22:06
Jon Hulatt12-May-02 22:06 
GeneralRe: How to store a c constant in an int variable Pin
Sam M C14-May-02 13:55
Sam M C14-May-02 13:55 
GeneralAdding a new registry VALUE Pin
albean12-May-02 8:23
albean12-May-02 8:23 
GeneralRe: Adding a new registry VALUE Pin
Brian Delahunty12-May-02 8:52
Brian Delahunty12-May-02 8:52 
GeneralRe: Adding a new registry VALUE Pin
albean12-May-02 9:16
albean12-May-02 9:16 
GeneralRe: Adding a new registry VALUE Pin
Aizik Yair13-May-02 22:42
Aizik Yair13-May-02 22:42 
Hi,
This will solve your problem.

unsigned long ValueSize = 10; // you can use also sizeof ( long ) or anything you need.
if ( RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\BFW\\SampleTool\\Info , 0, KEY_READ|KEY_SET_VALUE, &hKey) != ERROR_SUCCESS )
{

// error message.
return;
}

RegSetValueEx(hKey,"Info",NULL,REG_SZ,(unsigned char*)5,ValueSize);

Aizik Yair
Software Engineer
GeneralDesign consideration Pin
12-May-02 6:26
suss12-May-02 6:26 
GeneralRe: Design consideration Pin
Michael Dunn12-May-02 7:21
sitebuilderMichael Dunn12-May-02 7:21 
GeneralRe: Design consideration Pin
Neville Franks12-May-02 11:49
Neville Franks12-May-02 11:49 
GeneralRe: Design consideration Pin
Matt Gullett12-May-02 12:53
Matt Gullett12-May-02 12:53 
GeneralRe: Design consideration Pin
12-May-02 16:43
suss12-May-02 16:43 
Generalhad enough of C Pin
Peter Liddle12-May-02 6:02
Peter Liddle12-May-02 6:02 
GeneralRe: had enough of C Pin
Michael Dunn12-May-02 7:22
sitebuilderMichael Dunn12-May-02 7:22 
GeneralRe: had enough of C Pin
Chris Losinger12-May-02 7:40
professionalChris Losinger12-May-02 7:40 
GeneralRe: had enough of C Pin
Max Santos12-May-02 8:15
Max Santos12-May-02 8:15 
GeneralRe: had enough of C Pin
Peter Liddle12-May-02 10:05
Peter Liddle12-May-02 10:05 
GeneralRe: had enough of C Pin
12-May-02 10:59
suss12-May-02 10:59 
GeneralRe: had enough of C Pin
12-May-02 11:04
suss12-May-02 11:04 
GeneralRe: had enough of C Pin
12-May-02 23:55
suss12-May-02 23:55 
Generalclosing documents before closing main window... Pin
marcela12-May-02 5:50
marcela12-May-02 5:50 
GeneralRe: closing documents before closing main window... Pin
marcela12-May-02 7:03
marcela12-May-02 7:03 
Generalglobal functions Pin
pnpfriend12-May-02 4:55
pnpfriend12-May-02 4:55 
GeneralRe: global functions Pin
Max Santos12-May-02 8:21
Max Santos12-May-02 8:21 

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.