Home  /  Autodocs  /  dos.library

NAME

AllocDosObject
Creates an AmigaDOS object (V36)

SYNOPSIS

ptr = AllocDosObject(type, tags)
D0 D1 D2

void *AllocDosObject(ULONG, struct TagItem *)

ptr = AllocDosObjectTagList(type, tags)
D0 D1 D2

void *AllocDosObjectTagList(ULONG, struct TagItem *)

ptr = AllocDosObjectTags(type, Tag1, ...)

void *AllocDosObjectTags(ULONG, ULONG, ...)

FUNCTION

Create one of several AmigaDOS objects, initializes it, and returns it to you. Note the DOS_STDPKT returns a pointer to the sp_Pkt of the structure.

This function may be called by a Task for all types and tags defined in the V37 includes. As of V47, the following AmigaDOS objects can be created, see dos/dos.h:

DOS_FILEHANDLE
a struct FileHandle, see dos/dosextens.h. Only few people should require this. Note that the dos.library uses a somewhat larger internal structure that is intentionally not documented.

DOS_EXALLCONTROL
a struct ExAllControl that is used for ExAll, see dos/exall.h. You MUST use this function to allocate this structure.

DOS_FIB
a struct FileInfoBlock, see dos/dos.h.

DOS_STDPKT
a struct StandardPacket, see dos/dosextens.h

DOS_CLI
a struct CommandLineInterface, see also dos/dosextens.h. Note that the shell uses internally a somewhat larger structure, and only shells equipped with this larger structure will be able to handle DoShellMethod(). You must use AllocDosObject() to create a valid CLI structure, creating this structure yourself is no longer acceptable.

DOS_RDARGS
A struct RDArgs, see dos/rdargs.h

INPUTS

type
type of object requested

tags
pointer to taglist with additional information

RESULT

packet
pointer to the object or NULL

BUGS

Before V39, DOS_CLI should be used with care since FreeDosObject() can't free it.

SEE ALSO

FreeDosObject(), dos/dostags.h, dos/dos.h