Getting list of files from a folder...WinNT vs Win98 
Author Message
 Getting list of files from a folder...WinNT vs Win98

Hi,
    Created a function a while back that looks into a certain filespace
and gets a list of files from that filespace.  This list is loaded into
a drop-down menu on a GUI.  Later, when running the program, if info is
needed from one of these files, the user chooses it from the menu on the
GUI and the file is opened and info is extracted.  The program was
developed on Windows NT and works great here.  Today I tested on Windows
98 and saw that there is a problem.  The program cannot get the list of
file names to fill the drop-down menu.  The error produced is CB_ERR.
The weird thing is that if I run the program from this point and
manually enter a file name, the file is opened and extracted from just
like it should be.  The only problem is with getting the file names.
Code from the function where we get the file names appears below.  Does
anyone have any suggestions how to get this to work on Windows 98?

Thanks,
            Scott

char strMainDir[_POSIX_PATH_MAX];
DWORD dwLength = GetCurrentDirectory((DWORD)_POSIX_PATH_MAX,strMainDir);

m_strPath = strMainDir;
int i = m_strPath.Find("Debug");
if(i != -1)//Found 'Debug' in path
{ //remove 'Debug' directory from SearchPath
    m_strPath.Delete(i-1,6);

Quote:
}

 m_strPath += _SIM_FILE_DIR; // "\\SimFiles"
switch(m_cbAlertsFrom.Dir(DDL_ARCHIVE,m_strPath + _SIM_FILE_TYPE ))
{
    case CB_ERR :
        MessageBox("CB_ERR: Simulation Files not available!",
            "WARNING",MB_ICONWARNING);
        break;
    case CB_ERRSPACE:
        MessageBox("CB_ERRSPACE: Insufficient space is available!",
            "ERROR",MB_ICONERROR);
        break;
Quote:
}//end switch



Wed, 24 Mar 2004 00:23:14 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. DAO Win95 vs Win98 vs WinNT

2. Getting a list of files from a folder

3. CWnd::Print() Win98 vs WinNT

4. how can i get the list of all files/folders in a given folder

5. Win98 (Chin) Vs Win98 (Eng)

6. File/Folder path of a file/folder on the explorer

7. How to sort VS.NET project folder files?

8. Unsigned OCX downloads OK to WINNT, fails on WIN98

9. RegLoadKey and RegSaveKey incompatibility between Win98 and WinNt

10. differences between win98/ME and winNT

11. SetViewportExtEx, SetWindowExtEx on printing producess different output on WinNT and on Win98

12. Works on WinNT but dies on Win98!

 

 
Powered by phpBB® Forum Software