TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Libor Theimer
NA
32
7.4k
HandleRef or IntPtr. When and Why?
Jun 11 2014 7:51 PM
In what cases is it better to use HandleRef instead IntPtr in PInvoke. Is
there something like best practices ? I need use it in Win32 functions like GetWindow, GetWindowText, SetWindowText etc. User can close any window anytime so hwnd in not valid anymore.
For example:
1. get
hwnd
by function
GetWindow
for Notepad window
2. user close Notepad window so my hwnd is invalid
3. using this hwnd in
SetWindowText
will crashed
Is it possible solve this problem by HandleRef? I think no, but I am
beginner
in .NET.
Thanks to all
:o)
Reply
Answers (
13
)
computer
pls provide step by step procedure to buid an windows phone