473,412 Members | 4,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Accessing a dll

Hi,

I have created a DLL in C++ .NET and am trying to use
that in my C# project.

The DLL compiles in C++ and I am able to add a reference
to it in the solution explorer.But when I view it in the
object browser i dont see any methods

I am using the following MSDN link to create the DLL

http://support.microsoft.com/default.aspx?scid=kb;EN-
US;189133

I have also tried using dllimport but it says that the
entry point is not defined

what am i doing wrong
Nov 16 '05 #1
2 1136
This link you provided is for exposing old C methods to .Net, via a Type
library...

If you've written the DLL in C++.Net from scratch, then this is the very
long way around the problem.

An easier way would be to create an ATL project, then from there, add a
class to the project, which is a ATL object. You can then instatiate this
object with methods etc that you need. Once it's built, you'll find it as a
COM object when referencing it from your c# application.

Hope that helps.
Dan.
"Fred" <an*******@discussions.microsoft.com> wrote in message
news:10*****************************@phx.gbl...
Hi,

I have created a DLL in C++ .NET and am trying to use
that in my C# project.

The DLL compiles in C++ and I am able to add a reference
to it in the solution explorer.But when I view it in the
object browser i dont see any methods

I am using the following MSDN link to create the DLL

http://support.microsoft.com/default.aspx?scid=kb;EN-
US;189133

I have also tried using dllimport but it says that the
entry point is not defined

what am i doing wrong

Nov 16 '05 #2
Dear Dan,

Thanks for the quick reply, I started out as a java
programmer so I have no knowledge of ATL at all. I
would appreciate if you could send me a sample or any
links

Also I would appreciate if some one could send me some
links as to how to export C functions to .NET

Thanks in advance

Fred
-----Original Message-----
This link you provided is for exposing old C methods to .Net, via a Typelibrary...

If you've written the DLL in C++.Net from scratch, then this is the verylong way around the problem.

An easier way would be to create an ATL project, then from there, add aclass to the project, which is a ATL object. You can then instatiate thisobject with methods etc that you need. Once it's built, you'll find it as aCOM object when referencing it from your c# application.

Hope that helps.
Dan.
"Fred" <an*******@discussions.microsoft.com> wrote in messagenews:10*****************************@phx.gbl...
Hi,

I have created a DLL in C++ .NET and am trying to use
that in my C# project.

The DLL compiles in C++ and I am able to add a reference to it in the solution explorer.But when I view it in the object browser i dont see any methods

I am using the following MSDN link to create the DLL

http://support.microsoft.com/default.aspx?scid=kb;EN-
US;189133

I have also tried using dllimport but it says that the
entry point is not defined

what am i doing wrong

.

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Amy Tseng | last post by:
Hi, I am having a problem accessing SQL Server 2000 via UNIX. I am accessing SQL Server 2000 from Solaris using Sybase Open Client (CT-Lib). Here is the error message: CT-LIBRARY error:...
5
by: Sandeep | last post by:
Hi, In the following code, I wonder how a private member of the class is being accessed. The code compiles well in Visual Studio 6.0. class Sample { private: int x; public:
6
by: Chris Styles | last post by:
Dear All, I've been using some code to verify form data quite happily, but i've recently changed the way my form is structured, and I can't get it to work now. Originally : The form is...
3
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
47
by: fb | last post by:
Hi Everyone. Thanks for the help with the qudratic equation problem...I didn't think about actually doing the math...whoops. Anyway... I'm having some trouble getting the following program to...
3
by: AdamM | last post by:
Hi all, When I run my VbScript, I get the error: "ActiveX component can't create object: 'getobject'. Error 800A01AD". Any ideas what I did wrong? Here's my VBScript: dim o set...
1
by: Eirik Brattbakk | last post by:
Hi I have some problems accessing a soap service made in c# using an ATL/MFC client over SSL. I have tried both CSoapMSXMLInetClient and CSoapWininetClient as template arguments with my stub...
1
by: CS Wong | last post by:
Hi, I have a page form where form elements are created dynamically using Javascript instead of programatically at the code-behind level. I have problems accessing the dynamically-created...
3
by: niju | last post by:
Hi there, I have three web pages (A,B,C). I need to prevent users accessing page B and C without accessing A. What would be the best way to achieve this rule? Many Thanks Niju
5
by: Daniel Corbett | last post by:
I am trying to save a file dynamically created in a webpage. I get the following headers, but cannot figure out how to save the attachment. I am basically trying to replicate what internet...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.