SCOUG-Programming Mailing List Archives
Return to [ 11 | 
March | 
1999 ]
 
 
 
Content Type:   text/plain 
Presentation Manager has a bunch of functions.  One of them is:  
 
  BOOL WinOpenObject (  
         HOBJECT  Object,  
         ULONG    View,  
         BOOL     OpenExisting )  
 
which opens the workplace shell object specified by Object.  
 
WinOpenObject returns a boolean value indicating success or failure.  
 
If it fails, how do I figure out why?  
 
For example, suppose I want to open a "view folder" of H:\STAROFC\ and I  
don't know if one is already open.  If I set OpenExisting to TRUE and  
execute WinOpenObject, and it fails, my program assumes that there isn't  
an existing "view folder" for H:\STAROFC\ and I execute again with  
OpenExisting equal to false (to create a new "view folder").  If it  
fails again, I don't know if H:\STAROFC\ doesn't exist, or WinOpenObject  
doesn't like the trailing "\" I gave it, or my value for View is invalid  
(OPEN_CONTENTS?), or I'm running on OS/2 2.1, or if there's some other  
error.  How do I figure out the error?  
 
There's a WinGetLastError function but my documentation doesn't show  
that it returns any info for WinOpenObject.  
 
=====================================================  
 
To unsubscribe from this list, send an email message  
to "steward@scoug.com". In the body of the message,  
put the command "unsubscribe scoug-programming".  
 
For problems, contact the list owner at  
"rollin@scoug.com".  
 
=====================================================  
 
  
Return to [ 11 | 
March | 
1999 ] 
  
  
The Southern California OS/2 User Group
 P.O. Box 26904
 Santa Ana, CA  92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group.  ALL RIGHTS 
RESERVED. 
 
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International 
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
 
 |