DLL Communication Interface: Win32 DLL <-> .NET class library

E

Ezmeralda

Hello,

I need to an TCP/IP Interface for communication with an embedded
device.
Since I have two different design ideas in mind, I am wondering
whether
you could give me some hints to decide:

Requirements:
- Interface should be used for company internal purposes/software but
also
as an interface for our customers -> interface should be a DLL
- internally, the interface should only be used with C# Applications
- our customers want to use the interface with "native" C++, VB6, VBS,
C#, VB.NET, Labview, ...

Design 1:
- implement the interface as .NET class library in C#
- expose this .NET class library as COM dll
(whatever this means exactly...) so that it can be used by
C++, VB6, VBS, ...
- advantage: easy implementation of the interface in C#;
easy debugging
- disadvantage/open issue: what does it mean to expose the
interface as COM dll (esp. in terms of effort); does
exposing as COM dll really provide an interface for all
possible applications? how can this COM interface be used?

Design 2:
- implement the interface in C++ as standard Win32-dll
- provide a C# wrapper class (maybe compiled as .net class library)
mainly for internal purposes
- advantage: well-known win32-dll-interface -> our customers
know how to use it and there are no tradeoffs
- disadvantage: complex socket programming in C++ required;
C# wrapper required; more complex software debugging

Which design would you prefer? Why? Could you give
me some decision guidance, please?!
 
M

mlimber

Hello,

I need to an TCP/IP Interface for communication with an embedded
device.
Since I have two different design ideas in mind, I am wondering
whether
you could give me some hints to decide:

Requirements:
- Interface should be used for company internal purposes/software but
also
as an interface for our customers -> interface should be a DLL
- internally, the interface should only be used with C# Applications
- our customers want to use the interface with "native" C++, VB6, VBS,
C#, VB.NET, Labview, ...

Design 1:
- implement the interface as .NET class library in C#
- expose this .NET class library as COM dll
(whatever this means exactly...) so that it can be used by
C++, VB6, VBS, ...
- advantage: easy implementation of the interface in C#;
easy debugging
- disadvantage/open issue: what does it mean to expose the
interface as COM dll (esp. in terms of effort); does
exposing as COM dll really provide an interface for all
possible applications? how can this COM interface be used?

Design 2:
- implement the interface in C++ as standard Win32-dll
- provide a C# wrapper class (maybe compiled as .net class library)
mainly for internal purposes
- advantage: well-known win32-dll-interface -> our customers
know how to use it and there are no tradeoffs
- disadvantage: complex socket programming in C++ required;
C# wrapper required; more complex software debugging

Which design would you prefer? Why? Could you give
me some decision guidance, please?!

Your question is Microsoft-specific, so you should ask in a group that
deals with Microsoft products. Here we discuss the standard C++
language itself. See this FAQ for what is on-topic here and for a
partial list of other places you might try:

http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9

Cheers! --M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top