473,724 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need to call mixed-mode dll from native code.

Hello all. Basically, I need to call a mixed-mode dll's function
(which uses managed code) from a native or mixed-mode dll function
(which does not use managed code). I'm wondering if this could be
accomplished and how.
Here's the problem.

We have a third party app (TPA) capable of loading native and
mixed-mode dlls somehow (we don't know how). It loads our native dll
(OND) and allows us to use our code inside the app (that is, we could
call some of our functions).

Now, we have a mixed-mode dll (MMD) which we built for the purpose of
exposing OND's functionality to our .net apps.

We built some other app (SOA) on top of MMD as a dll (the gui in the
exe around it was easy). SOA is purely managed.

We then decided that it would be useful if TPA was using some of SOA's
functionality. Consequently, we decided to write another mixed-mode
dll (AMMD) which depends on SOA, and indirectly on MMD and OND.

Now, we got TPA to load AMMD no problem, however, AMMD is not capable
of calling either SOA's or MMD's functions. It does not have any
problem calling OND's functionality.

Here's the list of possible errors I encountered while trying all
combinations of solutions I could think of:

1: FileNotFoundExc eption. SOA or one of its dependencies was not
found. When SOA is turned off, I get the same problem with MMD.
2: Unresolved token for various functions in MMD and SOA.
3: App hangs whenever any function from SOA or MMD is called.
4: Removing managed calls from MMD no longer produces those errors.

Ok...I've tried almost every possible combination of compiler switches,
ignoring libraries, importing libraries, using directives, etc. I
don't mind reading the MSDN articles for the fifth time, maybe I missed
one or two....

Does anyone know how to do this? Obviously, I'm using C++ here (except
the managed app which is in C#, but I could live without that).

Michael Kamzyuk

Jul 23 '05 #1
1 2199
Mike Kamzyuk wrote:
Hello all. Basically, I need to call a mixed-mode dll's function
(which uses managed code) [...]


Wrong newsgroup. Please find an appropriate one from the hierarchy
of Microsoft forums: microsoft.publi c.*

V
Jul 23 '05 #2

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

Similar topics

3
2571
by: Perttu Pulkkinen | last post by:
No questions, but just consider if this is useful to you:-) but of course feedback & corrections are welcome. function php_mixed_to_js_value($jsname, $mixed) { if(is_null($mixed)) { return "\n $jsname = null;\n"; } elseif(is_string($mixed)) { return "\n $jsname = '$mixed';\n"; } elseif(is_numeric($mixed) || is_boolean($mixed))
0
1778
by: Swaroop Kumar | last post by:
Hi: I'm trying to write a schema that contains information as described below: 1. The first element is a mandatory fixed string. 2. The second element is a mixed content element that can contain multiple occurrences of two possible elements interspersed with regular text.
2
1765
by: Paul A. Hoadley | last post by:
Hello, I am trying to convert a RELAX NG schema to DTD using Trang. I am currently trying to add some inline elements to the schema, such as <emph> for marking emphasised text. Here is an excerpt from the schema: <define name="description"> <element name="description"> <mixed>
15
5413
by: Bill Cohagan | last post by:
I'm trying to generate class definitions from an XSD that contains something like: <xs:complexType name="foo" mixed="true"> <xs:choice minOccurs = "0" maxOccurs="unbounded"> <xs:element name = "bar" type = "something"/> ... <xs:element name = "baz" type = "somethingelse"/> </xs:choice> </xs:complexType>
5
5767
by: Jeff | last post by:
I am trying to crete a method that will convert an improper fraction to a mixed number... I am not sure how about how to acomplish this. I know I can get the remainder with the modulus operator (%), but I am not sure how to get the quotent. any insight would be appreciated. thanks
2
2122
by: AAguiar | last post by:
Thanks for your replies. Last week, I continued working with this problem. Trying to reproduce the error, I developed a short example and found that the problem is related to strong name dll. Following is the example to reproduce it. I have a C++ project (mixed dll, managed and unmanaged), with classes: EncodeDecode.cpp, EncodeDecode.h, DecoderRing.cpp as follows: ---------------------------
14
2587
by: AAguiar | last post by:
Thanks for your replies. Last week, I continued working with this problem. Trying to reproduce the error, I developed a short example and found that the problem is related to strong name dll. Following is the example to reproduce it. I have a C++ project (mixed dll, managed and unmanaged), with classes: EncodeDecode.cpp, EncodeDecode.h, DecoderRing.cpp as follows: ---------------------------
4
10296
by: natG | last post by:
Hi; I am transferring data from MySql to db2 using my own java/jdbc program. Working out ok, except for the fact that our apps use mixed-case names for tables and columns. Although my CREATE TABLE commands issued via jdbc uses mixed case for the names, db2 insists on using only upper case. (This also happens from the CLP or DB2CC, but my concern is for it to work via jdbc.) Is there a simple setting at the database level to allow mixed...
7
8115
by: Laurent Pointal | last post by:
on win32] Given the following: 45 .... (<generator object at 0x00A79788>,) .... File "<stdin>", line 1 SyntaxError: invalid syntax
13
12016
by: Kurda Yon | last post by:
Hi, I found one example which defines the addition of two vectors as a method of a class. It looks like that: class Vector: def __add__(self, other): data = for j in range(len(self.data)): data.append(self.data + other.data)
0
8741
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9389
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
9090
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...
1
6689
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5996
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
4504
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...
1
3210
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2613
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2149
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.