473,320 Members | 2,097 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.

tool to build a wrapper for a C DLL

Suppose I have some random C DLL. I want to generate a C# wrapper for
it automatically. (By wrapper I mean a large file with a bunch of
[dllimport...] static extern ...., etc.) What tools exist to do this
automatically?

May 17 '07 #1
1 1911
"not_a_commie" <no********@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
Suppose I have some random C DLL. I want to generate a C# wrapper for
it automatically. (By wrapper I mean a large file with a bunch of
[dllimport...] static extern ...., etc.) What tools exist to do this
automatically?

As far as I know there is no such tool, more, if there existed one, I would
not trust it, translating C function calls into DllImport declarations is
something you can only do by hand, even then it's error prone, C function
declarations don't reveal everything you need to know to correctly declare
your DlImport.
Note also that the translation of a function declaration is not that
problematic, translating the data types like structs is the real issue. Note
also, that it's easier to write a managed wrapper using C++/CLI when you
need to import a bunch of native C function into the managed world.

Willy.
May 17 '07 #2

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

Similar topics

3
by: _andrea.l | last post by:
how to build a interfaces (or web pages) in easy way? how to build a form in easy way? how to automate and create web pages whit a tool? which tool to use to create form for a database? I mean...
42
by: Steven O. | last post by:
I am seeking some kind of tool that I can use for GUI prototyping. I know how to use Visual Basic, but since a lot of software is being coded in Java or C++, I'd like to learn a Java or C++ -based...
4
by: Edvard Majakari | last post by:
Hi, I was wondering what would be the most elegant way for creating a Python class wrapper for a command line utility, which takes three types of arguments: 1. options with values (--foo=bar)...
8
by: ted | last post by:
How does the speed of the Scons build tool compare with Ant? Right now with out Ant builds take around an hour. Hoping to speed that up. TIA, Ted
3
by: Eric Chong | last post by:
I have been trying to automate our builds using BuildIt tool available from Microsoft. This tool only log whether build is success or fail. Since all developers would like to see what the build...
1
by: Jose | last post by:
Hi, Our small company is growing quickly, and we need a source control and build tool for all our c# .net code. For build tool, i was thinking Nant. For source control, i was thinking...
0
by: Droopy Toon | last post by:
Hi, I think it is a FAQ but I found no answer to my problem. I created a C# program that called some C++ legacy code. I created 2 projects : 1) a DLL (IPRCommWrapper.dll) including an...
0
by: pagates | last post by:
Hello, I use a COM-based ActiveX control as part of a C# Controls project. Part of this control is a ListView, and the ActiveX control has a property that returns the ListItems of this control....
0
by: genc ymeri | last post by:
Hi over there, I'm building a webservice (C#/>Net 1.1) and I'm trying to add a web reference , a WSDL file from a location "c:\inetpub\WSDLfile.wsdl" . (This is the WSDL file of another webserver...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.