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
steven
NA
24
41.8k
Can i directly use PInvoke DllImport attribute to call a function from a COM DLL?
Sep 16 2011 5:16 AM
it is a COM dll, so i can call the function in javascript like this:
var typelib = new ActiveXObject("scriptlet.typelib");
typelib.Reset();
document.getElementById("myID").innerHTML = typelib.guid;
It works well.
But i tried to call a function from the COM, it did not work.
[DllImport
(
"scrobj.dll"
)]
internal
static
extern
void
Reset();
...
...
Reset();
It said
Unable to find an entry point named 'Reset' in DLL 'scrobj.dll'.
1) Can i directly use PInvoke DllImport attribute to call a function from a COM DLL?
2) WHY?
Thanks.
Reply
Answers (
6
)
Call VC ++ dll from C#.NET
Dual interface in COM interoperability