Click here to Skip to main content
15,923,087 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CreateThread Function question Pin
Jijo.Raj28-Aug-08 18:15
Jijo.Raj28-Aug-08 18:15 
GeneralRe: CreateThread Function question Pin
monsieur_jj28-Aug-08 20:07
monsieur_jj28-Aug-08 20:07 
QuestionRe: CreateThread Function question Pin
Mark Salsbery29-Aug-08 8:59
Mark Salsbery29-Aug-08 8:59 
AnswerRe: CreateThread Function question Pin
monsieur_jj31-Aug-08 16:23
monsieur_jj31-Aug-08 16:23 
GeneralRe: CreateThread Function question Pin
Mark Salsbery1-Sep-08 7:35
Mark Salsbery1-Sep-08 7:35 
GeneralRe: CreateThread Function question Pin
monsieur_jj1-Sep-08 14:17
monsieur_jj1-Sep-08 14:17 
QuestionHtmlHelp v x64 Pin
Chris Losinger28-Aug-08 14:12
professionalChris Losinger28-Aug-08 14:12 
Questionproblem with RegEnumValue to read the values in the registry.. Pin
hariakuthota28-Aug-08 12:23
hariakuthota28-Aug-08 12:23 
Hi all,
in my application i want to read all the key and data values of some registry folder so i am using this RegEnumValue function but when i kept this function in for loop it is reading few values and failing in the middle..
can anybody suggest me the reason for this i attach the code i have used for this...
<br />
	CString names[100],values[100];<br />
	CString Accesspath;<br />
	char szBufferReturn[MAX_VALUE_NAME];<br />
	char szData[MAX_VALUE_NAME]; // Data value returned.<br />
	DWORD nDataSize = MAX_PATH; // Data value buffer size.<br />
	DWORD dwType = 0;<br />
	DWORD nBufferReturnSize = sizeof(szBufferReturn);<br />
	long nReturnCode = 0;<br />
	int i=0;<br />
	Accesspath = "SOFTWARE\\XYZ\\ImageScanner\\checkfinal";<br />
<br />
		HKEY hKey;<br />
	for( i =0 ;i< 10; i++)<br />
	{<br />
			<br />
	if(	ERROR_SUCCESS  == RegOpenKeyEx(HKEY_LOCAL_MACHINE,Accesspath,0, KEY_ALL_ACCESS,&hKey))<br />
	{<br />
		if ((nReturnCode = RegEnumValue(hKey, i,<br />
											szBufferReturn,<br />
											&nBufferReturnSize,<br />
											NULL,<br />
											&dwType,<br />
											(LPBYTE)szData, <br />
											&nDataSize)) == ERROR_SUCCESS)<br />
			{<br />
							<br />
			<br />
				names[i]=szBufferReturn;<br />
				MessageBox(names[i]);<br />
				nBufferReturnSize = sizeof(szBufferReturn);<br />
				<br />
				if (dwType == REG_SZ)<br />
				 {<br />
						values[i]=szData;<br />
					<br />
				}<br />
				else<br />
				{<br />
					printf("Identifier contains a non-string'\n\n");<br />
						MessageBox("failed");<br />
				}<br />
			}<br />
			else<br />
			{<br />
				MessageBox("failed");<br />
			}<br />
		RegCloseKey(hKey);<br />
	}<br />
	else<br />
	{<br />
		MessageBox("not openeded");<br />
	}<br />
<br />
<br />
	} // end of for loop<br />
<br />
<br />

QuestionRe: problem with RegEnumValue to read the values in the registry.. Pin
David Crow28-Aug-08 15:36
David Crow28-Aug-08 15:36 
AnswerRe: problem with RegEnumValue to read the values in the registry.. Pin
Jijo.Raj28-Aug-08 18:24
Jijo.Raj28-Aug-08 18:24 
AnswerRe: problem with RegEnumValue to read the values in the registry.. Pin
krmed29-Aug-08 0:48
krmed29-Aug-08 0:48 
QuestionHow to have use different version resources for different configurations Pin
Wheatbread28-Aug-08 6:06
Wheatbread28-Aug-08 6:06 
AnswerRe: How to have use different version resources for different configurations Pin
enhzflep28-Aug-08 7:29
enhzflep28-Aug-08 7:29 
AnswerRe: How to have use different version resources for different configurations Pin
Michael Dunn29-Aug-08 13:12
sitebuilderMichael Dunn29-Aug-08 13:12 
Questionactivex - internet exploret has blocked my site because of an unsafe manner Pin
simon alec smith28-Aug-08 5:13
simon alec smith28-Aug-08 5:13 
Questionhow to override start button? Pin
dj440028-Aug-08 3:51
dj440028-Aug-08 3:51 
AnswerRe: how to override start button? Pin
Perspx28-Aug-08 4:01
Perspx28-Aug-08 4:01 
AnswerRe: how to override start button? Pin
sashoalm28-Aug-08 5:19
sashoalm28-Aug-08 5:19 
GeneralRe: how to override start button? Pin
dj44003-Sep-08 22:33
dj44003-Sep-08 22:33 
GeneralRe: how to override start button? Pin
sashoalm5-Sep-08 1:06
sashoalm5-Sep-08 1:06 
QuestionRead and write binary Pin
The ANZAC28-Aug-08 3:14
The ANZAC28-Aug-08 3:14 
AnswerRe: Read and write binary Pin
David Crow28-Aug-08 3:25
David Crow28-Aug-08 3:25 
GeneralRe: Read and write binary Pin
The ANZAC28-Aug-08 3:50
The ANZAC28-Aug-08 3:50 
GeneralRe: Read and write binary Pin
sashoalm28-Aug-08 3:56
sashoalm28-Aug-08 3:56 
GeneralRe: Read and write binary Pin
David Crow28-Aug-08 3:57
David Crow28-Aug-08 3: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.