Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BrowseDir Problems with Windows 2000

Status
Not open for further replies.

DjMosfet

Programmer
Mar 28, 2002
2
GR
I am using a CbrowseDir Class in my program for browsing directories.It works fine in Windows 98!But in Windows 2000 professional ,although there are no compiling errors when i execute the program it says that bla bla bla this memory cannot be "written". I found out that the problem comes when i use the DoModal in the instance of the CbrowseDir Class.Got a clue???

By the way i have Microsoft Visual C++ 6.0 Enterprise Edition
 
May have something to do with your permissions in Win2K possibly? Do you have admin permissions?

Niky Williams
Lead Engineer
NTS Marketing, Inc
 
First of all thanks for the reply...

Yes i have admin authorities.I would also like to point out that when i run the program inside Visual C++ it says:
First-chance exception-Access Violation.But i looked in the MSDN help,in DoModal and it says in a note that i shouldn't use an exception hadler like try or catch because the operating system takes care of it.(As it did, i suppose ,by popping up the error messages i mentioned in my previous mail).

Do you think that has something to do with the way Windows 2000 professional handles files and drives,or that my Vstudio version is incompatible with Windows 2000?

I call DoModal like this:

void CTekTips::OnBrowse()
{
CBrowseDir pathdlg;
char buf[100];
GetCurrentDirectory(99,buf);
int nResponse = pathdlg.DoModal();
if (nResponse == IDOK)
{
SetDlgItemText(IDC_PATHFILES,pathdlg.pathname);
SetCurrentDirectory(buf);
OnKillfocusPathfiles();
}
else
SetCurrentDirectory(buf);
}

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top