[ros-bugs] [Bug 1154] New: program is not executed.

ReactOS.Bugzilla at reactos.org ReactOS.Bugzilla at reactos.org
Mon Dec 19 06:30:59 CET 2005


http://www.reactos.org/bugzilla/show_bug.cgi?id=1154

           Summary: program is not executed.
           Product: ReactOS
           Version: 0.2.8
          Platform: QEmu
        OS/Version: ReactOS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Win32
        AssignedTo: ros-bugs at reactos.org
        ReportedBy: timo.kreuzer at web.de
         QAContact: ros-bugs at reactos.org


I have experienced a strange bug where a program is not executed when there is
an additional while loop in a function that is not even used. Here's my code.
This is the code that let's the program start. The bad thing is commented out.
Tested with 0.2.8 Livecd.

[code]
// This function is not called!!!
BOOL FolderCB_Init(HWND hwndCB)
{
	IShellFolder *psfRoot, *psfDrives;
	IEnumIDList	*lpeRoot, *lpeDrives;
	LPITEMIDLIST pidlDrives, pidlTmp, pidlTmp1, pidlAbsTmp;
	ITEMIDLIST idlAbsTmp[2];
	LPMALLOC pMalloc;

	SendMessageA(hwndCB,CB_SETITEMHEIGHT,-1,(LPARAM)GetSystemMetrics(SM_CYSMICON));
	SendMessage(hwndCB,CB_SETITEMHEIGHT,0,(LPARAM)GetSystemMetrics(SM_CYSMICON));

	SendMessageA(hwndCB,CB_SETEXTENDEDUI,(WPARAM)(TRUE),0);
	SHGetSpecialFolderLocation(0,CSIDL_DESKTOP,&pidlTmp);
	FolderCB_AddItem(hwndCB, pidlTmp,-1,0);
	SHGetSpecialFolderLocation(0,CSIDL_DRIVES,&pidlDrives);
	SHGetDesktopFolder(&psfRoot);

	if (SUCCEEDED(SHGetMalloc(&pMalloc)))
	{
		if (psfRoot)
		{
			if(SUCCEEDED(IShellFolder_EnumObjects(psfRoot, hwndCB, SHCONTF_FOLDERS,
&lpeRoot)))
			{
				while (S_OK == IEnumIDList_Next(lpeRoot, 1, &pidlTmp, NULL))
				{
					FolderCB_AddItem(hwndCB, pidlTmp,-1,1);

					if (memcmp(pidlTmp, pidlDrives, sizeof(ITEMIDLIST)) == 0)
					{
						if(SUCCEEDED(IShellFolder_BindToObject(psfRoot, pidlTmp, NULL,
&IID_IShellFolder, (LPVOID*)&psfDrives)))
						{

							if(SUCCEEDED(IShellFolder_EnumObjects(psfDrives, hwndCB,SHCONTF_FOLDERS,
&lpeDrives)))
							{
//this doesnt work in ROS:						while (S_OK == IEnumIDList_Next(lpeDrives, 1,
&pidlTmp1, NULL))
IEnumIDList_Next(lpeDrives, 1, &pidlTmp1, NULL); // this fnction is not the problem
while (FALSE) // the while is the problem, but not "while(FALSE)".
								{
									pidlAbsTmp = ILCombine(pidlTmp, pidlTmp1);
									FolderCB_AddItem(hwndCB, pidlAbsTmp,-1,2);
									pMalloc->lpVtbl->Free(pMalloc, (void*)pidlAbsTmp);
									pMalloc->lpVtbl->Free(pMalloc, (void*)pidlTmp1);
								}
								IEnumIDList_Release(lpeDrives);
							}
							IShellFolder_Release(psfDrives);
						}
					}
					pMalloc->lpVtbl->Free(pMalloc, (void*)pidlTmp);
				}
				IEnumIDList_Release(lpeRoot);
			}
			IShellFolder_Release(psfRoot);
		}
		pMalloc->lpVtbl->Free(pMalloc, (void*)pidlDrives);

		SendMessage(hwndCB, CBEM_SETIMAGELIST, 0, (LPARAM)himlSystem);
	}
}
[/code]

-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.


More information about the Ros-bugs mailing list