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
Andrew
NA
4
0
Convert an Object to IntPtr
Jul 24 2009 6:35 PM
Hello,
I am trying to convert an object to IntPtr so that I can pass it to the Win32 function GetWindowRect. I have used the code below, but my program just hangs
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int Left;
public int Top;
public int Right;
public int Bottom;
}
RECT rct;
IntPtr pt = Marshal.AllocHGlobal(Marshal.SizeOf(IE));
Marshal.StructureToPtr(IE, pt, true);
GetWindowRect(pt, out rct);
IE is of type object
Hope someone can help
Thanks
Reply
Answers (
0
)
Need guidance
How to retrieve database Oracle database shcema using WCF