HANDLEs in x64, are they really ever 64 bits?

Discussion in 'Windows 64bit' started by Guest, Sep 7, 2005.

  1. Guest

    Guest Guest

    Microsoft-

    I have a few COM interfaces which use the OLE_HANDLE type to pass HWNDs or
    HBITMAPs. Several Microsoft defined interfaces also use OLE_HANDLE (e.g.
    IPicture::get_Handle), but in VS.NET 2005, OLE_HANDLE is still 32 bits!

    Wondering about this, I created a simple experiment where I create very
    large numbers of windows or bitmaps. In both cases, I never received a
    handle which could not be represented in 32 bits (never exceeded 0xFFFFFFFF).
    Is this a guarantee on x64? If not, how can Microsoft’s picture object
    continue to work? Is all the hoopla about using (for example)
    SetWindowLongPtr really just for IA developers? Please clarify.

    Thanks,

    R.
     
    Guest, Sep 7, 2005
    #1
    1. Advertisements

  2. Andre Da Costa, Sep 7, 2005
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    SetWindowLongPtr is of course irrelevant (and still needed). Still need the
    rest of the question answered.
     
    Guest, Sep 7, 2005
    #3
  4. Guest

    Guest Guest

    Guest, Sep 7, 2005
    #4
  5. I think that perhaps your experiment asks the wrong questions. As I
    understand it, the API requires you to provide room for 64bit wide
    arguments, and stuff - that is no guarantee that anything has to actually
    scale to that size, if you go asking for credentials, it could be anything,
    and it could be a long time before you see a 64bit number from a Handle.

    The number of Handles has to be limited in reality, but you are in an 64bit
    environment and handles are used in all sorts of situations, so to ! risk
    breaking compatibility, you are required to dance to the tune???

    It's been a long time since I did any of that stuff, but I think I can
    remember sort of the same discussion arising when we went 32bit. Feel free
    to scorn me, should I be wrong.

    Tony. . .
     
    Tony Sperling, Sep 7, 2005
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.