SHBindToObject

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff Gaines

    SHBindToObject


    Having applied SP1 to VS2008 I have discovered a couple of things that, on
    the face of it, appear quite marvellous. They are SHBindToObject and
    SHBindToFolderI DListParent, there may even be more.

    They require Vista though and I am running XP Pro x64 so I am facing an
    upgrade dilemma.

    From the help it doesn't seem to be necessary to play about with
    allocating/freeing memory which I have had problems with using the
    IShellFolder interface under XP.

    Has anybody used these new functions? Does the OS take care of memory
    allocation/de-allocation?

    --
    Jeff Gaines Damerham Hampshire UK
    Indecision is the key to flexibility
  • Jeroen Mostert

    #2
    Re: SHBindToObject

    Jeff Gaines wrote:
    Having applied SP1 to VS2008 I have discovered a couple of things that,
    on the face of it, appear quite marvellous. They are SHBindToObject and
    SHBindToFolderI DListParent, there may even be more.
    >
    This post is better directed to comp.os.ms-windows.program mer.win32.

    --
    J.

    Comment

    • Jeff Gaines

      #3
      Re: SHBindToObject

      On 24/08/2008 in message <48b18ad9$0$196 $e4fe514c@news. xs4all.nlJeroen
      Mostert wrote:
      >Jeff Gaines wrote:
      >>Having applied SP1 to VS2008 I have discovered a couple of things that,
      >>on the face of it, appear quite marvellous. They are SHBindToObject and
      >>SHBindToFolde rIDListParent, there may even be more.
      >>
      >This post is better directed to comp.os.ms-windows.program mer.win32.
      I'm not sure why, I thought microsoft.publi c.dotnet.framew ork.interop was
      for matters relating to using the API in NET. Have I misunderstood its
      purpose?

      --
      Jeff Gaines Damerham Hampshire UK
      There are 3 types of people in this world. Those who can count, and those
      who can't.

      Comment

      • Jeroen Mostert

        #4
        Re: SHBindToObject

        Jeff Gaines wrote:
        On 24/08/2008 in message <48b18ad9$0$196 $e4fe514c@news. xs4all.nlJeroen
        Mostert wrote:
        >
        >Jeff Gaines wrote:
        >>Having applied SP1 to VS2008 I have discovered a couple of things
        >>that, on the face of it, appear quite marvellous. They are
        >>SHBindToObjec t and SHBindToFolderI DListParent, there may even be more.
        >>>
        >This post is better directed to comp.os.ms-windows.program mer.win32.
        >
        I'm not sure why, I thought microsoft.publi c.dotnet.framew ork.interop
        was for matters relating to using the API in NET. Have I misunderstood
        its purpose?
        >
        Not at all, but where in your question is there anything that relates to
        ..NET? Likewise, how is C# involved? That you may ultimately be calling these
        functions from C# (and may have separate issues arising from that) is
        another matter altogether.

        --
        J.

        Comment

        • Jeff Gaines

          #5
          Re: SHBindToObject

          On 24/08/2008 in message <48b19ddc$0$187 $e4fe514c@news. xs4all.nlJeroen
          Mostert wrote:
          >Jeff Gaines wrote:
          [snipped]
          >>I'm not sure why, I thought microsoft.publi c.dotnet.framew ork.interop was
          >>for matters relating to using the API in NET. Have I misunderstood its
          >>purpose?
          >>
          >Not at all, but where in your question is there anything that relates to
          >.NET? Likewise, how is C# involved? That you may ultimately be calling
          >these functions from C# (and may have separate issues arising from that)
          >is another matter altogether.
          I am using C# in NET so it's an interop question.

          --
          Jeff Gaines Damerham Hampshire UK
          If you ever find something you like buy a lifetime supply because they
          will stop making it

          Comment

          • Mattias Sjögren

            #6
            Re: SHBindToObject

            >Has anybody used these new functions? Does the OS take care of memory
            >allocation/de-allocation?
            Not sure I understand exactly what you're asking, but both these
            functions are merely helpers. They don't do anything you couldn't do
            yourself before, but they might save you some work. And hopefully they
            handle their memory allocations correctly, if they don't it would be a
            bug.


            Mattias

            --
            Mattias Sjögren [C# MVP] mattias @ mvps.org
            http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
            Please reply only to the newsgroup.

            Comment

            • Jeff Gaines

              #7
              Re: SHBindToObject

              On 05/09/2008 in message <#Xp1Pt6DJHA.61 6@TK2MSFTNGP06. phx.gblMattias
              Sjögren wrote:
              >
              >>Has anybody used these new functions? Does the OS take care of memory
              >>allocation/de-allocation?
              >
              >Not sure I understand exactly what you're asking, but both these
              >functions are merely helpers. They don't do anything you couldn't do
              >yourself before, but they might save you some work. And hopefully they
              >handle their memory allocations correctly, if they don't it would be a
              >bug.
              >
              >
              >Mattias
              Hello Mattias, nice to hear from you again :-)

              I appreciate you can achieve the same result with IShellFolder, but I
              hoped the new dll function would handle memory allocation for me.

              Now we just need IcontextMenu, IShellFolder... ..


              --
              Jeff Gaines Damerham Hampshire UK
              There are 3 types of people in this world. Those who can count, and those
              who can't.

              Comment

              Working...