Click here to Skip to main content
15,910,981 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSimple database problem please help me Pin
Scozturk10-Nov-03 4:28
professionalScozturk10-Nov-03 4:28 
GeneralRe: Simple database problem please help me Pin
David Crow10-Nov-03 4:42
David Crow10-Nov-03 4:42 
GeneralRe: Simple database problem please help me Pin
Scozturk11-Nov-03 2:18
professionalScozturk11-Nov-03 2:18 
GeneralRe: Simple database problem please help me Pin
antlers10-Nov-03 6:41
antlers10-Nov-03 6:41 
GeneralRe: Simple database problem please help me Pin
Scozturk11-Nov-03 2:21
professionalScozturk11-Nov-03 2:21 
Generalfunction Pin
Anonymous10-Nov-03 2:27
Anonymous10-Nov-03 2:27 
GeneralRe: function Pin
Alvaro Mendez10-Nov-03 4:23
Alvaro Mendez10-Nov-03 4:23 
GeneralRegEnumKeyEx problem Pin
Anonymous10-Nov-03 2:23
Anonymous10-Nov-03 2:23 

Could anyone tell me what is wrong with the following snippet? printf only prints the the first word of each key and printes it several times.

for example Microsoft Office would be printed as

Microsoft
Microsoft
microsoft and so an..

I am using XP sp1 and VS2003

Thanks,

Max....




long RESULT;
HKEY hKey;


int _tmain(int argc, _TCHAR* argv[])
{

RESULT = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall", 0, KEY_READ, &hKey);

printf("Regopen returned %d ", RESULT );



int KeyIndex = NULL;
CHAR SubKeyName[MAX_PATH];
DWORD SubKeyLenth = [MAX_PATH];
FILETIME InstallDate;



do
{
RESULT = RegEnumKeyEx(hKey,
KeyIndex,
SubKeyName,
&SubKeyLenth,
NULL,
NULL,
NULL,
&InstallDate);


printf( "(%d) %s\n", KeyIndex++ , SubKeyName);

}

while (RESULT != ERROR_NO_MORE_ITEMS);


return 0;

}
GeneralRe: RegEnumKeyEx problem Pin
Brian Shifrin10-Nov-03 4:12
Brian Shifrin10-Nov-03 4:12 
QuestionActive a event while in a while loop ?? Pin
Member 40481310-Nov-03 0:33
Member 40481310-Nov-03 0:33 
AnswerRe: Active a event while in a while loop ?? Pin
jmkhael10-Nov-03 0:37
jmkhael10-Nov-03 0:37 
GeneralRe: Active a event while in a while loop ?? Pin
BadJerry10-Nov-03 0:45
BadJerry10-Nov-03 0:45 
GeneralRe: Active a event while in a while loop ?? Pin
jmkhael10-Nov-03 1:52
jmkhael10-Nov-03 1:52 
AnswerRe: Active a event while in a while loop ?? Pin
BadJerry10-Nov-03 0:48
BadJerry10-Nov-03 0:48 
GeneralGetWindowRect returns incorrect ComboBox size Pin
Yonatan10-Nov-03 0:04
Yonatan10-Nov-03 0:04 
GeneralRe: GetWindowRect returns incorrect ComboBox size Pin
Roger Allen10-Nov-03 0:59
Roger Allen10-Nov-03 0:59 
GeneralRe: GetWindowRect returns incorrect ComboBox size Pin
Yonatan10-Nov-03 1:15
Yonatan10-Nov-03 1:15 
GeneralRe: GetWindowRect returns incorrect ComboBox size Pin
Roger Allen10-Nov-03 5:11
Roger Allen10-Nov-03 5:11 
GeneralRe: GetWindowRect returns incorrect ComboBox size Pin
Yonatan10-Nov-03 10:24
Yonatan10-Nov-03 10:24 
GeneralRe: GetWindowRect returns incorrect ComboBox size Pin
PJ Arends10-Nov-03 10:13
professionalPJ Arends10-Nov-03 10:13 
GeneralRe: GetWindowRect returns incorrect ComboBox size Pin
Yonatan10-Nov-03 10:27
Yonatan10-Nov-03 10:27 
GeneralCopy and Paste in forms Pin
JGranborg10-Nov-03 0:01
JGranborg10-Nov-03 0:01 
GeneralRe: Copy and Paste in forms Pin
Brian Shifrin10-Nov-03 4:36
Brian Shifrin10-Nov-03 4:36 
Generalequivalence EJB in C# Pin
ljesusde9-Nov-03 23:43
ljesusde9-Nov-03 23:43 
QuestionHow to add an item to the desktop's context menu? Pin
julych9-Nov-03 23:18
julych9-Nov-03 23:18 

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.