Post by Igor TandetnikPost by NicIn the VS 2005 I have been using, handles such as HWND and HISTANCE
are defined with DECLARE_HANDLE (..) which concerns me because I have
been casting these handles to LPVOID. Should I be concerned about
this?
I'm not sure I understand the problem. How does the handles being defined
with DECLARE_HANDLE hinder your ability to cast them to LPVOID? Come to
think of it, _why_ are you casting them to LPVOID in the first place?
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily
a good idea. It is hard to be sure where they are going to land, and it
could be dangerous sitting under them as they fly overhead. -- RFC 1925
Thanks Igor and Dave for the reply. In answer to the above question, I have
been looking into the InterlockedExchangePointer function, which requires
casting to LPVOID, as I am declaring a global variable as:'volatile
HINSTANCE ghInstance' in a multithreaded application . However, the variable
is only assigned a values at startup and it is declared as volatile
therefore, I do not think it is necessary to use the
InterlockedExchangePointer function here after all.
Nic