472,378 Members | 1,203 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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: FileNotFoundException. 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 2100
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.public.*

V
Jul 23 '05 #2

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

Similar topics

3
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...
0
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...
2
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...
15
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 =...
5
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...
2
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. ...
14
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. ...
4
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...
7
by: Laurent Pointal | last post by:
on win32] Given the following: 45 .... (<generator object at 0x00A79788>,) .... File "<stdin>", line 1 SyntaxError: invalid syntax
13
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)):...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...
0
by: F22F35 | last post by:
I am a newbie to Access (most programming for that matter). I need help in creating an Access database that keeps the history of each user in a database. For example, a user might have lesson 1 sent...

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.