Archived

This topic is now archived and is closed to further replies.

Utwo

Would this be legal? (HINSTANCE)

Recommended Posts

Would it be legal to pass an HINSTANCE, and more specifically, the application''s HINSTANCE to a another function by value? I mean, of course it would compile but would the recieving function then have a handle to the application''s instance, or just some copy of an HINSTANCE that it can''t use?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
an H is a pointer, so it shouldnt matter.

Share this post


Link to post
Share on other sites
Yes, it is legal. Think of all the times you have to pass a handle of some sort into Windows...

Share this post


Link to post
Share on other sites
Yes. You can pass a pointer by value too though. You just wouldn''t get the result you wanted.

Share this post


Link to post
Share on other sites