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
Andy Webster
NA
117
0
VC# 2008 interop code not working on VC# 2010
Feb 2 2011 12:58 PM
Hi
I am using VS 2010 Express and have ported some code proven in VS 2008 but it fails in VS 2010 and I cannot understand why.
The code uses InvokeMember:
<object>.Interface.GetType().InvokeMember("<Method Name>",
System.Reflection.BindingFlags.InvokeMethod,
null, <Object>.Interface, new object[] { <params> });
It works fine in VS 2008 but not in VS 2010, exception thrown is "Value does not fall within the expected range." The code and references are identical, the <object> is not null.
Baffled.
Any ideas?
Reply
Answers (
10
)
Blocks line in Visual Studio how?
student help