[Contents] [Index] [Help] [Retrace] [browse <] [Browse >]


NAME
    GetDiskObjectNew - read in a Workbench disk object from disk.    (V36)

SYNOPSIS
    diskobj = GetDiskObjectNew(name)
      D0                      A0

    struct diskobject *getdiskobjectnew(char *);

FUNCTION
    This routine reads in a Workbench disk object in from disk.  The
    name parameter will have a ".info" postpended to it, and the
    info file of that name will be read.  If the call fails,
    it will return zero.  The reason for the failure may be obtained
    via ioerr().

    Using this routine protects you from any future changes to
    the way icons are stored within the system.

    A freelist structure is allocated just after the diskobject
    structure; freediskobject makes use of this to get rid of the
    memory that was allocated.

    This call is functionally identical to getdiskobject with one
    exception.  If its call to getdiskobject fails, this function calls
    getdefdiskobject.  this is useful when there is no .info file for the
    icon you are trying to get a disk object for.  Applications that use
    workbench application windows MUST use this call if they want to
    handle the user dropping an icon (that doesn't have a .info file) on
    their window.  The V2.0 icon editor program is an example of a
    workbench application window that uses this call.

INPUTS
    name -- name of the object (char *) or NULL if you just want a
            diskobject structure allocated for you (useful when
            calling AddAppIcon in workbench.library).

RESULTS
    diskobj -- the Workbench disk object in question

SEE ALSO
    freediskobject(), getdiskobject(), putdiskobject(), deletediskobject()

BUGS
    None