home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
prgramer
/
rcs
/
sources
/
isvalid.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-07-12
|
654b
|
40 lines
/* ISVALID.C
*
* Autor: Kai Uwe Rommel
* Datum: Thu 15-Nov-1990
*
* Compiler: MS C ab 6.00
* System: OS/2 ab 1.2
*/
#define LABEL "isvalid.c"
#define VERSION "1.0"
#define INCL_NOPM
#define INCL_DOSERRORS
#include <os2.h>
int IsFileNameValid(char *name)
{
HFILE hf;
USHORT usAction;
switch( DosOpen(name, &hf, &usAction, 0L, 0, FILE_OPEN,
OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE, 0L) )
{
case ERROR_INVALID_NAME:
case ERROR_FILENAME_EXCED_RANGE:
return FALSE;
case NO_ERROR:
DosClose(hf);
default:
return TRUE;
}
}
/* Ende ISVALID.C */