mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-23 01:29:34 +00:00
26 lines
350 B
C
26 lines
350 B
C
|
/*
|
||
|
*
|
||
|
* (c) 2004,2005 Laurent Vivier <LaurentVivier@wanadoo.fr>
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#include <string.h>
|
||
|
|
||
|
#include <macos/devices.h>
|
||
|
|
||
|
OSErr CloseDriver(short refNum)
|
||
|
{
|
||
|
OSErr err;
|
||
|
ParamBlockRec param;
|
||
|
|
||
|
memset(¶m, 0, sizeof(ParamBlockRec));
|
||
|
|
||
|
param.ioRefNum = refNum;
|
||
|
|
||
|
err = PBCloseSync(¶m);
|
||
|
if (err != noErr)
|
||
|
return err;
|
||
|
|
||
|
return param.ioResult;
|
||
|
}
|