Announcement

Collapse
No announcement yet.

Missing parts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Missing parts

    typedef struct _SHITEMID // mkid
    {
    USHORT cb; // Size of the ID (including cb itself)
    BYTE abID[1]; // The item ID (variable length)
    } SHITEMID;
    typedef UNALIGNED SHITEMID *LPSHITEMID;
    typedef const UNALIGNED SHITEMID *LPCSHITEMID;

    In Winapi cb is declared as dword.

    SFGAO_... constants are missing
    SHGDN_.. too like %SHGDN_INFOLDER

    Please?


    ------------------
    http://www.hellobasic.com
    hellobasic

  • #2
    Code:
    // IShellFolder::GetDisplayNameOf/SetNameOf uFlags                                      
    cpp_quote("typedef enum tagSHGDN")
    cpp_quote("{")
    cpp_quote("    SHGDN_NORMAL             = 0x0000,  // default (display purpose)")
    cpp_quote("    SHGDN_INFOLDER           = 0x0001,  // displayed under a folder (relative)")
    cpp_quote("    SHGDN_FOREDITING         = 0x1000,  // for in-place editing")
    cpp_quote("    SHGDN_FORADDRESSBAR      = 0x4000,  // UI friendly parsing name (remove ugly stuff)")
    cpp_quote("    SHGDN_FORPARSING         = 0x8000,  // parsing name for ParseDisplayName()")
    cpp_quote("} SHGNO;")
    
    typedef DWORD SHGDNF;
    
    // IShellFolder::GetAttributesOf flags
    // SFGAO_CANLINK: If this bit is set on an item in the shell folder, a
    //            'Create Shortcut' menu item will be added to the File
    //            menu and context menus for the item.  If the user selects
    //            that command, your IContextMenu::InvokeCommand() will be called
    //            with 'link'.
    //                 That flag will also be used to determine if 'Create Shortcut'
    //            should be added when the item in your folder is dragged to another
    //            folder.
    cpp_quote("#define SFGAO_CANCOPY           DROPEFFECT_COPY // Objects can be copied    (0x1)")
    cpp_quote("#define SFGAO_CANMOVE           DROPEFFECT_MOVE // Objects can be moved     (0x2)")
    cpp_quote("#define SFGAO_CANLINK           DROPEFFECT_LINK // Objects can be linked    (0x4)")
    cpp_quote("#define SFGAO_STORAGE           0x00000008L     // supports BindToObject(IID_IStorage)")
    cpp_quote("#define SFGAO_CANRENAME         0x00000010L     // Objects can be renamed")
    cpp_quote("#define SFGAO_CANDELETE         0x00000020L     // Objects can be deleted")
    cpp_quote("#define SFGAO_HASPROPSHEET      0x00000040L     // Objects have property sheets")
    //         unused                          0x00000080
    cpp_quote("#define SFGAO_DROPTARGET        0x00000100L     // Objects are drop target")
    cpp_quote("#define SFGAO_CAPABILITYMASK    0x00000177L")
    //         unused                          0x00000200
    //         unused                          0x00000400
    //         unused                          0x00000800
    //         unused                          0x00001000
    cpp_quote("#define SFGAO_ENCRYPTED         0x00002000L     // object is encrypted (use alt color)")
    cpp_quote("#define SFGAO_ISSLOW            0x00004000L     // 'slow' object")
    cpp_quote("#define SFGAO_GHOSTED           0x00008000L     // ghosted icon")
    cpp_quote("#define SFGAO_LINK              0x00010000L     // Shortcut (link)")
    cpp_quote("#define SFGAO_SHARE             0x00020000L     // shared")
    cpp_quote("#define SFGAO_READONLY          0x00040000L     // read-only")
    cpp_quote("#define SFGAO_HIDDEN            0x00080000L     // hidden object")
    cpp_quote("#define SFGAO_DISPLAYATTRMASK   0x000FC000L")
    cpp_quote("#define SFGAO_FILESYSANCESTOR   0x10000000L     // may contain children with SFGAO_FILESYSTEM")
    cpp_quote("#define SFGAO_FOLDER            0x20000000L     // support BindToObject(IID_IShellFolder)")
    cpp_quote("#define SFGAO_FILESYSTEM        0x40000000L     // is a win32 file system object (file/folder/root)")
    cpp_quote("#define SFGAO_HASSUBFOLDER      0x80000000L     // may contain children with SFGAO_FOLDER")
    cpp_quote("#define SFGAO_CONTENTSMASK      0x80000000L")
    cpp_quote("#define SFGAO_VALIDATE          0x01000000L     // invalidate cached information")
    cpp_quote("#define SFGAO_REMOVABLE         0x02000000L     // is this removeable media?")
    cpp_quote("#define SFGAO_COMPRESSED        0x04000000L     // Object is compressed (use alt color)")
    cpp_quote("#define SFGAO_BROWSABLE         0x08000000L     // supports IShellFolder, but only implements CreateViewObject() (non-folder view)")
    cpp_quote("#define SFGAO_NONENUMERATED     0x00100000L     // is a non-enumerated object")
    cpp_quote("#define SFGAO_NEWCONTENT        0x00200000L     // should show bold in explorer tree")
    cpp_quote("#define SFGAO_CANMONIKER        0x00400000L     // defunct")
    cpp_quote("#define SFGAO_HASSTORAGE        0x00400000L     // defunct")
    cpp_quote("#define SFGAO_STREAM            0x00400000L     // supports BindToObject(IID_IStream)")
    cpp_quote("#define SFGAO_STORAGEANCESTOR   0x00800000L     // may contain children with SFGAO_STORAGE or SFGAO_STREAM")
    cpp_quote("#define SFGAO_STORAGECAPMASK    0x70C50008L     // for determining storage capabilities, ie for open/save semantics")
    
    typedef ULONG SFGAOF;

    ------------------

    Comment


    • #3
      Code:
      // IShellFolder::EnumObjects grfFlags bits
      cpp_quote("typedef enum tagSHCONTF")
      cpp_quote("{")
      cpp_quote("    SHCONTF_FOLDERS             = 0x0020,   // only want folders enumerated (SFGAO_FOLDER)")
      cpp_quote("    SHCONTF_NONFOLDERS          = 0x0040,   // include non folders")
      cpp_quote("    SHCONTF_INCLUDEHIDDEN       = 0x0080,   // show items normally hidden")
      cpp_quote("    SHCONTF_INIT_ON_FIRST_NEXT  = 0x0100,   // allow EnumObject() to return before validating enum")
      cpp_quote("    SHCONTF_NETPRINTERSRCH      = 0x0200,   // hint that client is looking for printers")
      cpp_quote("    SHCONTF_SHAREABLE           = 0x0400,   // hint that client is looking sharable resources (remote shares)")
      cpp_quote("    SHCONTF_STORAGE             = 0x0800,   // include all items with accessible storage and their ancestors")
      cpp_quote("};")
      typedef DWORD SHCONTF;

      ------------------

      Comment


      • #4
        Edwin,

        in short see below.
        ->typdef enum can be converted as each item is a PB const.
        If you have C/C++ code like "SHGNO i;" it can be converted
        to "DIM i As Long".

        regards,

        Torsten


        Code:
        //oleidl.h
        #define	DROPEFFECT_NONE	( 0 )
        #define	DROPEFFECT_COPY	( 1 )
        #define	DROPEFFECT_MOVE	( 2 )
        #define	DROPEFFECT_LINK	( 4 )
        #define	DROPEFFECT_SCROLL	( 0x80000000 )
        
        //shlobj.h
        
        // IShellFolder::GetDisplayNameOf/SetNameOf uFlags
        typedef enum tagSHGDN
        {
            SHGDN_NORMAL             = 0x0000,  // default (display purpose)
            SHGDN_INFOLDER           = 0x0001,  // displayed under a folder (relative)
            SHGDN_FOREDITING         = 0x1000,  // for in-place editing
            SHGDN_FORADDRESSBAR      = 0x4000,  // UI friendly parsing name (remove ugly stuff)
            SHGDN_FORPARSING         = 0x8000,  // parsing name for ParseDisplayName()
        } SHGNO; 
        
        // IShellFolder::GetAttributesOf flags
        // DESCRIPTION:
        // 	 SFGAO_CANLINK: If this bit is set on an item in the shell folder, a
        //            "Create Shortcut" menu item will be added to the File
        //            menu and context menus for the item.  If the user selects
        //            that command, your IContextMenu::InvokeCommand() will be called
        //            with 'link'.
        //            	 That flag will also be used to determine if "Create Shortcut"
        //            should be added when the item in your folder is dragged to another
        //            folder.
        #define SFGAO_CANCOPY           DROPEFFECT_COPY // Objects can be copied    (0x1)
        #define SFGAO_CANMOVE           DROPEFFECT_MOVE // Objects can be moved     (0x2)
        #define SFGAO_CANLINK           DROPEFFECT_LINK // Objects can be linked    (0x4)
        #define SFGAO_CANRENAME         0x00000010L     // Objects can be renamed
        #define SFGAO_CANDELETE         0x00000020L     // Objects can be deleted
        #define SFGAO_HASPROPSHEET      0x00000040L     // Objects have property sheets
        #define SFGAO_DROPTARGET        0x00000100L     // Objects are drop target
        #define SFGAO_CAPABILITYMASK    0x00000177L
        #define SFGAO_LINK              0x00010000L     // Shortcut (link)
        #define SFGAO_SHARE             0x00020000L     // shared
        #define SFGAO_READONLY          0x00040000L     // read-only
        #define SFGAO_GHOSTED           0x00080000L     // ghosted icon
        #define SFGAO_HIDDEN            0x00080000L     // hidden object
        #define SFGAO_DISPLAYATTRMASK   0x000F0000L
        #define SFGAO_FILESYSANCESTOR   0x10000000L     // It contains file system folder
        #define SFGAO_FOLDER            0x20000000L     // It's a folder.
        #define SFGAO_FILESYSTEM        0x40000000L     // is a file system thing (file/folder/root)
        #define SFGAO_HASSUBFOLDER      0x80000000L     // Expandable in the map pane
        #define SFGAO_CONTENTSMASK      0x80000000L
        #define SFGAO_VALIDATE          0x01000000L     // invalidate cached information
        #define SFGAO_REMOVABLE         0x02000000L     // is this removeable media?
        #define SFGAO_COMPRESSED        0x04000000L     // Object is compressed (use alt color)
        #define SFGAO_BROWSABLE         0x08000000L     // is in-place browsable
        #define SFGAO_NONENUMERATED     0x00100000L     // is a non-enumerated object
        #define SFGAO_NEWCONTENT        0x00200000L     // should show bold in explorer tree
        #define SFGAO_CANMONIKER        0x00400000L     // can create monikers for its objects


        ------------------

        Comment


        • #5
          I do have the defines
          But they are not included in the win32api.inc (yet?)

          So, that was what i'm asking.

          I'm investing amount of time into com so these where missing to me..


          ------------------
          http://www.hellobasic.com
          hellobasic

          Comment


          • #6
            I'll check on it. Thanks!

            ------------------
            Tom Hanlin
            PowerBASIC Staff

            Comment


            • #7
              Yes, the cb member of SHITEMID (in Win32API.inc as ShortItemID) should be
              a WORD, not a DWORD.

              The shobjidl.h constants are scheduled to be added for the next Win32API
              update.

              ------------------
              Tom Hanlin
              PowerBASIC Staff

              Comment


              • #8
                Thanks,
                Had some problem with bad lengths, thought the pidl was badly used, it was the dword

                I will do more on com, so if you have suggested interface to be supported, please add.
                I can not forsee it myself yet..

                Thanks,


                ------------------
                http://www.hellobasic.com
                hellobasic

                Comment


                • #9
                  Don't forget SHGetmalloc(), very important


                  ------------------
                  http://www.hellobasic.com
                  hellobasic

                  Comment

                  Working...
                  X