HANDLE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric Kaplan

    HANDLE

    In C++, there is datatype HANDLE
    void* HANDLE

    then HANDLE is similar to "file handle"?

    which is unique identifier for a file, for a process, for a thread ...
    etc

    which is returned by a function when it's creating something - like
    creating a thread, creating a process, creating a file ... etc

  • Ian Collins

    #2
    Re: HANDLE

    Eric Kaplan wrote:
    In C++, there is datatype HANDLE
    void* HANDLE
    >
    then HANDLE is similar to "file handle"?
    >
    which is unique identifier for a file, for a process, for a thread ...
    etc
    >
    which is returned by a function when it's creating something - like
    creating a thread, creating a process, creating a file ... etc
    >
    In standard C++ terms, it's probably just used as an opaque, unique
    identifier. You would get more input on a windows programming group.

    --
    Ian Collins.

    Comment

    • Christopher Pisz

      #3
      Re: HANDLE


      "Eric Kaplan" <tobycraftse@ya hoo.comwrote in message
      news:ip2ov3ljpr 51sr00h29lo79od v5jtf5u0n@4ax.c om...
      In C++, there is datatype HANDLE
      Funny, it doesn't show up in any of my books as a primitive type.
      I think you mean, "In the Windows SDK there is a data type HANDLE"
      void* HANDLE
      >
      then HANDLE is similar to "file handle"?
      Why not look it up in the MSDN?


      Comment

      • Martin York

        #4
        Re: HANDLE

        On Apr 8, 7:48 pm, "Christophe r Pisz" <some...@somewh ere.netwrote:
        "Eric Kaplan" <tobycraf...@ya hoo.comwrote in message
        >
        news:ip2ov3ljpr 51sr00h29lo79od v5jtf5u0n@4ax.c om...
        >
        In C++, there is datatype HANDLE
        >
        Funny, it doesn't show up in any of my books as a primitive type.
        I think you mean, "In the Windows SDK there is a data type HANDLE"
        >
        void* HANDLE
        >
        then HANDLE is similar to "file handle"?
        >
        Why not look it up in the MSDN?
        In computer science terms a 'handle' is a pointer to a pointer to a
        resource.
        The concept was used by many OS to allow the easy movements of
        resources in memory.

        But this is not specifically a C++ concept and you would need to look
        up a comp-sci book to get full details.

        Comment

        • James Kanze

          #5
          Re: HANDLE

          On Apr 9, 6:58 am, Martin York <Martin.YorkAma ...@gmail.comwr ote:
          On Apr 8, 7:48 pm, "Christophe r Pisz" <some...@somewh ere.netwrote:
          [...]
          In computer science terms a 'handle' is a pointer to a pointer to a
          resource.
          The concept was used by many OS to allow the easy movements of
          resources in memory.
          Do you have a reference for that? I've always understood a
          handle to be an opaque data type, used by some service providers
          as an identifier of something. It could be a pointer to a
          pointer, a simple pointer, an int, or even a string: just about
          anything else the service provider wants to use. The critical
          point was always that the type and semantics were opaque to the
          client.

          --
          James Kanze (GABI Software) email:james.kan ze@gmail.com
          Conseils en informatique orientée objet/
          Beratung in objektorientier ter Datenverarbeitu ng
          9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

          Comment

          • Nick Keighley

            #6
            [OT] what's a handle? [Was: HANDLE]

            On 9 Apr, 10:05, James Kanze <james.ka...@gm ail.comwrote:
            On Apr 9, 6:58 am, Martin York <Martin.YorkAma ...@gmail.comwr ote:
            On Apr 8, 7:48 pm, "Christophe r Pisz" <some...@somewh ere.netwrote:
            In computer science terms a 'handle' is a pointer to a pointer to a
            resource.
            The concept was used by many OS to allow the easy movements of
            resources in memory.
            >
            Do you have a reference for that?  
            the MAC used to do this. I'm not sure it's particularly
            widely used.

            I've always understood a
            handle to be an opaque data type, used by some service providers
            as an identifier of something.  It could be a pointer to a
            pointer, a simple pointer, an int, or even a string: just about
            anything else the service provider wants to use.  The critical
            point was always that the type and semantics were opaque to the
            client.
            on Unix it was common for a handle to be a small integer.
            Think file handles.

            C's FILE* is very handle like



            --
            Nick Keighley

            "One of the main causes of the fall of the Roman Empire was that,
            lacking zero, they had no way to indicate successful termination of
            their C programs."


            Comment

            Working...