Creating a Transient Object

REPLY *Reply;                                   /* Reply data structure  */

SOMAny *NewObj;                                 /* Object pointer        */

case WMP_REQUEST_COMPLETE:
     Reply = (REPLY *)mp1;                      /* Get reply data        */

     ClassID = SOM_IdFromString("CustClass");   /* Get class SOM ID      */

     TransClass = _somFindClass(SOMClassMgrObject, /* Get class pointer  */
                                ClassID,        /* Class SOM ID          */
                                1,1);           /* Major & minor version */

     NewObj = _wpclsNew(TransClass,             /* Create new object     */
                        Reply->CustName,        /* Title for object      */
                        "",                     /* No setup string       */
                        Reply->Folder,          /* Location              */
                        TRUE);                  /* Lock flag             */

     _SetCustInfo(NewObj,                       /* Set instance data     */
                  Reply);
     break;
     


[Back: Deregistering an Object Class]
[Next: Workplace Shell Application Structure]