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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top