EMILE/libmacos/CloseDriver.c
Laurent Vivier 9bd9755dbb Update email address
Signed-off-by: Laurent Vivier <Laurent@Vivier.EU>
2013-09-05 14:45:27 +02:00

27 lines
366 B
C

/*
*
* (c) 2004,2005 Laurent Vivier <Laurent@Vivier.EU>
*
*/
#include <string.h>
#include <sys/types.h>
#include <macos/devices.h>
OSErr CloseDriver(short refNum)
{
OSErr err;
ParamBlockRec param;
memset(&param, 0, sizeof(ParamBlockRec));
param.ioRefNum = refNum;
err = PBCloseSync(&param);
if (err != noErr)
return err;
return param.ioResult;
}