Click here to Skip to main content
15,914,452 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionadd button to listcontrol Pin
rajniyadav1a7-Apr-11 21:42
rajniyadav1a7-Apr-11 21:42 
AnswerRe: add button to listcontrol Pin
Hans Dietrich7-Apr-11 21:44
mentorHans Dietrich7-Apr-11 21:44 
QuestionLoading release Build bt not hybrid Pin
002comp7-Apr-11 20:28
002comp7-Apr-11 20:28 
AnswerRe: Loading release Build bt not hybrid Pin
Hans Dietrich7-Apr-11 21:42
mentorHans Dietrich7-Apr-11 21:42 
QuestionDynamic shared memory Pin
pandit847-Apr-11 19:35
pandit847-Apr-11 19:35 
QuestionHow can I read ODBC from registry ? Pin
_Flaviu7-Apr-11 9:59
_Flaviu7-Apr-11 9:59 
GeneralRe: How can I read ODBC from registry ? Pin
David Crow7-Apr-11 18:06
David Crow7-Apr-11 18:06 
GeneralRe: How can I read ODBC from registry ? Pin
_Flaviu7-Apr-11 19:14
_Flaviu7-Apr-11 19:14 
Ok , here is situation :
#define	IS_KEY_LEN	256
#define IS_DISPLAY	_T("DisplayName")
#define	IS_KEY		_T("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall")


void CTestRegView::OnHelpReadodbc() 
{
	// TODO: Add your command handler code here

	HKEY hKey = NULL;
	DWORD dwIndex = 0;
	LONG lRet;
	DWORD cbName = IS_KEY_LEN;
	TCHAR szSubKeyName[IS_KEY_LEN];

	if (::RegOpenKeyEx(HKEY_LOCAL_MACHINE, IS_KEY, 0, KEY_READ, &hKey) != ERROR_SUCCESS)return;

	while((lRet = ::RegEnumKeyEx(hKey, dwIndex, szSubKeyName, &cbName, NULL, NULL, NULL, NULL)) != ERROR_NO_MORE_ITEMS)
	{
		if(lRet == ERROR_SUCCESS)
		{
			HKEY hItem;
			if (::RegOpenKeyEx(hKey, szSubKeyName, 0, KEY_READ, &hItem) != ERROR_SUCCESS)continue;
			TCHAR szDisplayName[IS_KEY_LEN];
			DWORD dwSize = sizeof(szDisplayName);
			DWORD dwType;
			if(::RegQueryValueEx(hItem, IS_DISPLAY, NULL, &dwType, (LPBYTE)&szDisplayName, &dwSize) == ERROR_SUCCESS)
			{
				TRACE("\n %s \n",szDisplayName);
			}
			::RegCloseKey(hItem);
		}
		dwIndex++;
		cbName = IS_KEY_LEN;
	}
	::RegCloseKey(hKey);
}


this code , from above list all uninstall programs , but , if I change
#define	IS_KEY		_T("SOFTWARE\\ODBC\\ODBCINST.INI")

the code doesn't work ...then I ask myself , what is _T("DisplayName") which is paramenter 2 on ::RegQueryValueEx method ?
GeneralRe: How can I read ODBC from registry ? Pin
_Flaviu7-Apr-11 19:52
_Flaviu7-Apr-11 19:52 
QuestionWM_KICKIDLE Message and Cursor? Pin
Arrin7-Apr-11 4:37
Arrin7-Apr-11 4:37 
QuestionGlobal array question [modified] Pin
Cristoff6-Apr-11 23:48
Cristoff6-Apr-11 23:48 
AnswerRe: Global array question Pin
«_Superman_»7-Apr-11 0:18
professional«_Superman_»7-Apr-11 0:18 
GeneralRe: Global array question Pin
Cristoff7-Apr-11 0:30
Cristoff7-Apr-11 0:30 
GeneralRe: Global array question Pin
«_Superman_»7-Apr-11 0:34
professional«_Superman_»7-Apr-11 0:34 
GeneralRe: Global array question Pin
Cristoff7-Apr-11 0:59
Cristoff7-Apr-11 0:59 
AnswerRe: Global array question [modified] Pin
Luc Pattyn7-Apr-11 1:48
sitebuilderLuc Pattyn7-Apr-11 1:48 
GeneralRe: Global array question Pin
Cristoff8-Apr-11 0:14
Cristoff8-Apr-11 0:14 
GeneralRe: Global array question Pin
Luc Pattyn8-Apr-11 0:19
sitebuilderLuc Pattyn8-Apr-11 0:19 
AnswerRe: Global array question PinPopular
Stefan_Lang7-Apr-11 2:18
Stefan_Lang7-Apr-11 2:18 
GeneralRe: Global array question Pin
Albert Holguin7-Apr-11 3:51
professionalAlbert Holguin7-Apr-11 3:51 
GeneralRe: Global array question Pin
Cristoff8-Apr-11 0:16
Cristoff8-Apr-11 0:16 
Questionmemory leak problem Pin
shashankacharya6-Apr-11 18:35
shashankacharya6-Apr-11 18:35 
AnswerRe: memory leak problem PinPopular
Rajesh R Subramanian6-Apr-11 22:02
professionalRajesh R Subramanian6-Apr-11 22:02 
Questionupdate structure in a vector of structures Pin
csrss6-Apr-11 8:53
csrss6-Apr-11 8:53 
AnswerRe: update structure in a vector of structures Pin
csrss6-Apr-11 9:19
csrss6-Apr-11 9:19 

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.