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
berten01
NA
1
0
C# using C++ DLL
Mar 29 2004 4:23 PM
HI, I'm trying to use one function found in a DLL that I did using C++. THe method is pretty simple: __declspec( dllexport ) int Compute(int a, int b); where Compute is: int Compute(int a, int b) { return a+b; } (This method DLL is named CFct.dll) So when I'm trying to acces this DLL in C#, I'm doing this: public class UsingCFct { [DllImport("CFct.dll")] public static extern int Compute(int a, int b); } and in my Form I'm calling it like this: textBox1.Text = UsingCfct.Compute(2,4).ToString(); But everytime I do so, I get a " 'System.EntryPointNotFoundException' occurred in IndustrialisationCtrl.exe Additional information: Unable to find an entry point named Compute in DLL CFct.dll." So I'm not sure if it's my call to the Dll that is not OK, or my dll itself?? Can someone help me!!!
Reply
Answers (
1
)
Create an ActiveX control in .Net using C#
Check the form is loaded