ADC Home > Reference Library > Technical Notes > Legacy Documents > Mac OS 9 & Earlier >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Desktop Manager Q&As

CONTENTS

This Technical Note contains a collection of archived Q&As relating to a specific topic--questions sent the Developer Support Center (DSC) along with answers from the DSC engineers. Current Q&A's can be found on the Macintosh Technical Q&A's web site.

[Sep 01 1993]






Determining whether Desktop Manager calls are supported

Date Written: 3/17/93

Last reviewed: 6/24/93

Is there a Gestalt selector for determining specifically whether desktop database calls such as PBDTGetAPPL are present?

To determine whether the Desktop Manager calls are supported, use the following Pascal code, or modify it to C. If the PBGetVolParms call isn't supported, the Desktop Manager isn't there either, and the function returns a false condition.

It's important to note the warnings described in Inside Macintosh Volume VI, regarding the use of Desktop Manager calls. The Desktop Manager call descriptions are provided for informational use only. Applications that call PBDTAddAPPL to register new application creator types face compatibility risks with future releases of the Finder.

{------------------------------------------------------------------------------
* The DoesVolSupportDBMgr function assumes that the target volume does not
*   support the Desktop Manager.  If an error occurs, the function returns
*  false.
*  Input:  tgtVRefNum - VRefNum of the target volume to check
*  Output: function returns true if the target volume supports the
*          Desktop Manager, false otherwise.
*
------------------------------------------------------------------------------}
FUNCTION DoesVolSupportDBMgr(tgtVRefNum : INTEGER) : Boolean;
VAR
  myHPB:    HParamBlockRec;
  infoBuffer:  GetVolParmsInfoBuffer;

BEGIN
  DoesVolSupportDBMgr := FALSE;    { Assume that there is no desktop mgr support }
  WITH myHPB DO
  BEGIN
    ioNamePtr := NIL;
    ioVRefNum := tgtVRefNum;
    ioBuffer := @infoBuffer;
    ioReqCount := SizeOf(infoBuffer);
  END;
  IF PBHGetVolParms(@myHPB, FALSE) = noErr THEN
                  { a paramerr could occur here, which would }
                  { happen if the call is not supported }
                  { if so, return the default response - FALSE }
    DoesVolSupportDBMgr :=  BTST(infoBuffer.vMAttrib, bHasDesktopMgr);

Back to top

Macintosh Desktop Manager vs desktop file

Date Written: 12/11/92

Last reviewed: 3/1/93

What are the advantages of the Desktop Manager's desktop database over the Desktop file? Inside Macintosh simply states that the desktop database can hold more icons than the Desktop file.

The advantages of the Desktop Manager over the Desktop file are:

  • There's a documented interface for the Desktop Manager functions that developers can use.
  • The Desktop Manager can be used on shared volumes. (The Desktop file, since it's simply a resource file, can allow write access to only one user or process; it can't be shared. Under MultiFinder, that process is the Finder.)
  • The Desktop Manager functions can be implemented by an external file system in the most efficient way possible for that particular file system.
  • The Desktop Manager doesn't have the file size limitations imposed by the Resource Manager (2727 resources and approximately 16 MB of resource data).

Back to top

Removing icon data from Macintosh Desktop database or file

Date Written: 12/11/92

Last reviewed: 3/1/93

In what circumstances does the Finder remove icons from the Desktop file? The Desktop file my external file system creates for the Finder never seems to shrink, even when applications are removed from my remote volume.

With both the Desktop file and the Desktop Manager, icon data isn't removed from the database unless the Desktop database or file is rebuilt from scratch. That's because the Finder (and file system for that matter) has no way of being notified when the last file of a given creator and type is removed from a volume. If the Finder removes an application (a file with type APPL), then the Finder attempts to remove the application mapping information for that copy of the application from the Desktop database or file.

Back to top

System 6 versus System 7 Desktop Manager

Date Written: 8/30/91

Last reviewed: 8/1/92

If the Desktop Manager (the version that comes with AppleShare) is installed under System 6.0.x, is it backward-compatible that of System 7.0?

The Desktop Manager in System 7 is completely backward-compatible with that of System 6.0.x. The System 7 version has been highly optimized, and is more robust than the original.

Back to top

Determining if Macintosh Desktop Manager is present

Date Written: 3/7/91

Last reviewed: 8/1/92

How does one determine if the Macintosh Desktop Manager is available? I know under System 7.0 it's always available, but how about under 6.0?

The best method for determining whether the Desktop Manager is available or not is to use PBGetVolParms on your boot volume and check bit 12 of the vMAttrib field. See page 25-37 of Inside Macintosh Volume VI for additional information on PBGetVolParams.



Back to top

Downloadables

Acrobat gif

Acrobat version of this Note (44K).

Download



Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.