Cast HDC to long

  • Thread starter Thread starter Emmanuel DURAND
  • Start date Start date
E

Emmanuel DURAND

Hye,
In an external DLL from a VC++.NET DLL call, I want to pass HDC value. How
to cast HDC to long?

I've read in forums' messages some thing like "static_cast<IntPtr>" but
IntPtr is unknown...
What's up so?
 
Hye,
In an external DLL from a VC++.NET DLL call, I want to pass HDC
value. How to cast HDC to long?

I've read in forums' messages some thing like "static_cast<IntPtr>"
but IntPtr is unknown...
What's up so?

Just cast it -

HDC hd = ...

long l = (long)hd;


IntPtr is a .NET framework type that's used to represent native pointers in
managed classes. If you're not developing managed code, IntPtr has no
relevance.

-cd
 
So easy...
thx a lot.

Carl Daniel said:
Just cast it -

HDC hd = ...

long l = (long)hd;


IntPtr is a .NET framework type that's used to represent native pointers in
managed classes. If you're not developing managed code, IntPtr has no
relevance.

-cd
 
Back
Top