Click here to Skip to main content
15,904,497 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Restrict user from accessing drives Pin
David Crow18-Apr-03 5:01
David Crow18-Apr-03 5:01 
GeneralQuestion about the state of a stream. Pin
George217-Apr-03 17:18
George217-Apr-03 17:18 
GeneralTwo programs - Same file Instantaneous write and read. Pin
Pecan20417-Apr-03 16:52
Pecan20417-Apr-03 16:52 
GeneralRe: Two programs - Same file Instantaneous write and read. Pin
Michael Dunn17-Apr-03 17:01
sitebuilderMichael Dunn17-Apr-03 17:01 
GeneralRe: Two programs - Same file Instantaneous write and read. Pin
John M. Drescher17-Apr-03 18:09
John M. Drescher17-Apr-03 18:09 
GeneralRe: Two programs - Same file Instantaneous write and read. Pin
Pecan20418-Apr-03 1:46
Pecan20418-Apr-03 1:46 
GeneralRe: Two programs - Same file Instantaneous write and read. Pin
David Crow18-Apr-03 5:08
David Crow18-Apr-03 5:08 
GeneralCan't write to registry when I use CRegKey... Pin
IrishSonic17-Apr-03 14:56
IrishSonic17-Apr-03 14:56 
Hiya when I use these Win32 functions for the registry:

#define REGKEY_SOFTWARE "Pass1"
#define REGKEY_DIRECTORY_PATH "Software\\Projects\\Password"

rc = RegOpenKeyEx( HKEY_LOCAL_MACHINE,
REGKEY_DIRECTORY_PATH,
0,
KEY_QUERY_VALUE | KEY_SET_VALUE,
&hKeyParent );

and then this:

rc = RegSetValueEx( hKeyParent,
_T("Project Password"),
0, REG_SZ,
(const unsigned char *)(REGKEY_SOFTWARE),
sizeof( REGKEY_SOFTWARE) );

it is fine. It inserts my key into the registry no problem. But when I swop RegOpenKeyEx for:

CRegKey *pRegKey;
pRegKey = new CRegKey;

rc = pRegKey->Open( hKeyParent,
REGKEY_DIRECTORY_PATH,
KEY_READ | KEY_WRITE );

it doesn't put my key in. What am I doing wrong with this function??

I have error checking on Open and it returns no errors..

Thanks,
grahamoj.
GeneralRe: Can't write to registry when I use CRegKey... Pin
David Crow18-Apr-03 4:35
David Crow18-Apr-03 4:35 
QuestionMFC: How to make CView appear outside CFrame? Pin
vawksel17-Apr-03 14:26
vawksel17-Apr-03 14:26 
AnswerRe: MFC: How to make CView appear outside CFrame? Pin
valikac17-Apr-03 16:19
valikac17-Apr-03 16:19 
GeneralFindFirstChangeNotification advice Pin
Bartosz Bien17-Apr-03 12:17
Bartosz Bien17-Apr-03 12:17 
GeneralRe: FindFirstChangeNotification advice Pin
Anders Molin17-Apr-03 14:06
professionalAnders Molin17-Apr-03 14:06 
GeneralURLDownloadToFile is making me mad Pin
MattyBee17-Apr-03 11:38
MattyBee17-Apr-03 11:38 
GeneralRe: URLDownloadToFile is making me mad Pin
Michael Dunn17-Apr-03 11:48
sitebuilderMichael Dunn17-Apr-03 11:48 
GeneralRe: URLDownloadToFile is making me mad Pin
Big Art17-Apr-03 12:18
Big Art17-Apr-03 12:18 
GeneralRe: URLDownloadToFile is making me mad Pin
MattyBee18-Apr-03 4:00
MattyBee18-Apr-03 4:00 
GeneralRe: URLDownloadToFile is making me mad Pin
Big Art18-Apr-03 5:55
Big Art18-Apr-03 5:55 
General"Run As Other User" (NT) Pin
John R. Shaw17-Apr-03 11:33
John R. Shaw17-Apr-03 11:33 
QuestionActiveX control arrays in vc++? Pin
Salvador Dali17-Apr-03 11:10
Salvador Dali17-Apr-03 11:10 
Generalbinary data in XML Pin
Gilfrog17-Apr-03 10:34
Gilfrog17-Apr-03 10:34 
GeneralRe: binary data in XML Pin
Anthony_Yio17-Apr-03 18:09
Anthony_Yio17-Apr-03 18:09 
GeneralLink Errors Pin
Anonymous17-Apr-03 9:30
Anonymous17-Apr-03 9:30 
GeneralRe: Link Errors Pin
Chris Losinger17-Apr-03 9:40
professionalChris Losinger17-Apr-03 9:40 
GeneralFile open dialog - ansi vs unicode Pin
Richard O.17-Apr-03 9:25
Richard O.17-Apr-03 9:25 

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.