473,837 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling a "Mixed mode" dll from c#

I have just implemented a "mixed mode" dll in VC++. I
have implemented this dll in accordence with several
articles found on the MSDN website including KB 814472.
The crux of the problem is that when the dll is built
with the \noentry linker option, I can not load the dll
in a c# client. There is plenty of help available for
loading this dll in a c++ client.

Does anyone know how to load this dll in C# or VB?? Am I
forced to use reflection on this assembly??

Thanks in advance,

Ron Jacobs
Nov 16 '05 #1
5 4841
ron jacobs wrote:
Does anyone know how to load this dll in C# or VB?? Am I
forced to use reflection on this assembly??


The simplest way is to put a reference to the DLL into your project. Then
you can access all __gc classes/types.

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/useritems/leakfinder.asp
Nov 16 '05 #2
I guess I should have mentioned that... I have added a
reference to the dll in my c# project, the error I get is
that the namespace (defined in the dll) is unrecognized.
I have no problem if I remove the "\noentry" link option
from the dll.
-----Original Message-----
ron jacobs wrote:
Does anyone know how to load this dll in C# or VB?? Am I forced to use reflection on this assembly??
The simplest way is to put a reference to the DLL into

your project. Thenyou can access all __gc classes/types.

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/useritems/leakfinder.asp
.

Nov 16 '05 #3
>
Does anyone know how to load this dll in C# or VB?? Am I
forced to use reflection on this assembly??


What is the exact error message you are receiving and when?

What type of C# project did you create?
Nov 16 '05 #4
It complains about my using namespace call.
snip...
using System;
using System.Data;
using Xcellenet.Data. Client;

snip...

error:
Z:\Platform\Ser ver\DLLs\Databa se\XSDataAccess \Tester\Class
1.cs(3): The type or namespace name 'Xcellenet' could not
be found (are you missing a using directive or an
assembly reference?)

I have the correct assembly already as a reference, when
I browse this assembly with the object browser, I can see
my namespace and all of my types.

This problem occurs on any C# project, but this example
is a console application.

-----Original Message-----

Does anyone know how to load this dll in C# or VB?? Am I forced to use reflection on this assembly??

What is the exact error message you are receiving and

when?
What type of C# project did you create?
.

Nov 16 '05 #5
yes.
-----Original Message-----
ron jacobs wrote:
I have the correct assembly already as a reference, when I browse this assembly with the object browser, I can see my namespace and all of my types.


Are your MC++ classes really defined as:

public __gc class MyClass

!?

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/useritems/leakfinder.asp
.

Nov 16 '05 #6

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

Similar topics

0
1433
by: chaitan | last post by:
Hi, I have a search engine site written in Perl. How could I display a temporarily page while the system retrieving data, then a page refresh, display the search result in a new page? I try to do it using "Content-Type: multipart/mixed;", it's working well in Netscape and firefox,but no luck in IE. Is there any standard way in doing that? Thanks a lot.
0
1514
by: Jean-Marc Blaise | last post by:
Dear all, The LOAD indexing mode is by default, I presume, "autoselect", and the LOAD should choose between REBUILD or INCREMENTAL. In version 7.2 FP11, so in "offline" mode, with a LOAD INSERT, we got the LOAD choose the REBUILD despite the lack of pages in the tablespace (we had 2Million 16K page free, but this was not enough). Is the behavior the same in V8.1 (I've noticed the READ ACCESS mode only
3
4575
by: Carpe Diem | last post by:
Hello I have an aspx page that loses Session("user") value after a few minutes even after I set <sessionState mode="InProc" cookieless="false" timeout="300"> in web.config and wrote function Session_Start() { Session.Timeout = 3000; } in global.asax
21
4990
by: nicholas | last post by:
Although in my web.config I have <customErrors mode="off" /> I still get no detailed errors. How comes ? THX This is what I get: Server Error in '/mywebfolder'Application.
5
39038
by: Savas Ates | last post by:
I have a web application It works well in my local folder.. When i upload it to my web server i got To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
10
13406
by: albert.neu | last post by:
To what extent does Microsoft Visual C++ also called: VC++ also called: Microsoft (R) 32-bit C/C++ Optimizing Compiler support C99? VC++ compiles either in C mode (which is def. *not* C99!):
3
3464
by: Moe Sisko | last post by:
Using dotnet 2.0 sp1, I've got ASP.NET session state working ok in SQLServer mode, but the sessions never seem to expire. e.g if I add a timeout attribute like so : <sessionState mode="SQLServer" sqlConnectionString="Integrated Security=SSPI;data source=localhost" timeout="1" >
15
3193
by: =?ISO-8859-15?Q?L=E9na=EFc?= Huard | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all, For some reasons, somewhere in a program, I'd like, if possible, to quickly parse a whole file before rewinding it and letting the full analysis start. My problem is that the FILE* I want do parse has been fopen'ed far away from where I am and I don't know in which MODE my FILE* has been opened. And additionally, my FILE* may not be a regular file, but a continuous
4
11213
by: wilderness | last post by:
I have a Windows 2000 Server (SP4) with .NET Framework 1.1 (with hotfixes) installed, along with .NET Framework 2 I have a Delphi .DLL that interfaces with several .aspx files as part of a member database. Each .aspx file contains categorized properties about members. The first page is named profile1.aspx, the second page profile2.aspx and so forth. NEXT and PREVIOUS buttons allow the user to move back and forth. For some unknown...
0
9852
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
10902
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10583
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10288
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7014
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5680
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3128
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.