473,320 Members | 1,865 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,320 software developers and data experts.

Calling Unmanaged code from a .net application

I need to write a .net windows service that calls and receives callbacks from
a API for specialized hardware through a conventional unmanaged dll. The
manufacturer for this hardware provides a standard c .h header file and a
..lib file to be linked with my code. From all I can gather no matter what
..net language I use basic, c#, or c++ I cant use the supplied .h file, I
would need to define all functions and structures for the API in my own code
using marshaling attributes. Unfortunately this means that every time the
manufacturer sends me a new software release, its not just a simple recompile
on my part, I would have to go through all my definitions for their API and
make sure the marshaling attributes still matched there .h file.

Is there another way I could do this and use the manufacturers supplied .h
file?

Jul 21 '05 #1
1 1048
IMO no. If they do this it would break all exisitng code. Generally the
exisitng signature are left unchangeg en if the singature needs a change
they introduce a new function su as <FunctionName>Ex...

Talk with them but you'll likely have to do this one time...

Patrice
--

"JohnH" <Jo***@discussions.microsoft.com> a écrit dans le message de
news:D9**********************************@microsof t.com...
I need to write a .net windows service that calls and receives callbacks from a API for specialized hardware through a conventional unmanaged dll. The
manufacturer for this hardware provides a standard c .h header file and a
.lib file to be linked with my code. From all I can gather no matter what
.net language I use basic, c#, or c++ I cant use the supplied .h file, I
would need to define all functions and structures for the API in my own code using marshaling attributes. Unfortunately this means that every time the
manufacturer sends me a new software release, its not just a simple recompile on my part, I would have to go through all my definitions for their API and make sure the marshaling attributes still matched there .h file.

Is there another way I could do this and use the manufacturers supplied .h
file?

Jul 21 '05 #2

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

Similar topics

15
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that...
1
by: Jesse McGrew | last post by:
Hi all, I'm trying to make a plugin DLL for a third-party application, using VC++ .NET 2003. This DLL acts as a bridge between the C++ plugin API of the application, and my actual plugin code...
1
by: MC-Advantica | last post by:
Does anyone have a simple "Hello World" like application that demonstrates unmanaged C++ calling managed C++ developed in VS2005? I'm confused by many posts as they discuss managed extensions from...
3
by: Klaus | last post by:
Hi, I have an existing VC 6 MFC application which communicates asynchronly with a VC 2005 managed code dll. I use an unmanaged base class with virtual functions to access methods in the MFC...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.