beautypg.com

Apple AppleShare 3.0 File Server Controls User Manual

Page 26

background image

Flags := UNRFSendMsgMask; { send a message }

Message := 'Moof!';

err := MySCSendMessage(DiscArrayPtr, ArrayCount,

Flags, @Message);

IF err = noErr THEN

{ the message was sent }

ELSE

BEGIN

{ handle any errors from SCSendMessage }

END

END

ELSE { there are no users connected }

; { do nothing }

DisposPtr(Ptr(DiscArrayPtr));

END

ELSE

BEGIN

{ handle memory manager error }

END;

END;

Setting or clearing the copy-protect status of files

This section describes the server control calls that let you set or clear the

copy-protect status of files on a file server.

SCSetCopyProtect

The following function calls SCSetCopyProtect to set the copy-protect status

of a file.

Note This call is not supported by Macintosh File Sharing.

FUNCTION MySCSetCopyProtect (NamePtr: StringPtr;

VRefNum: Integer;

DirID: LongInt): OSErr;