CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #6
    Join Date
    Feb 2009
    Location
    Portland, OR
    Posts
    1,488

    Re: Obtain hinstance for hdc

    VladimirF, is technically right -- a handle for HINSTANCE is most likely to be the same value for most 32-bit processes. It is actually passed into your application in the WinMain() function. Technically speaking the HINSTANCE is partially a rudiment that was carried over from 16-bit Windows and by itself could not be used to uniquely identify a process. Here's some information for you to understand what it is used for:
    http://blogs.msdn.com/b/oldnewthing/...18/409205.aspx

    So if you need to specifically link a resource to a certain process a better way would be to tie it up to a process ID.
    Last edited by ahmd; May 11th, 2011 at 12:36 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured