SunilRai86
SunilRai86

Reputation: 1020

handle in win32 sdk .how to declare handle in c#

handle in win32 sdk .how to declare handle in c#

Upvotes: 1

Views: 530

Answers (1)

Hans Passant
Hans Passant

Reputation: 941267

A Windows handle is an IntPtr in C#.

If your code created the handle then you should use one of the SafeHandle derived classes to wrap it so it is guaranteed to be released. Avoids having to write a finalizer.

Upvotes: 2

Related Questions