Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am writing a program that utilises a c# sdk. The functionality of this program will be used in a larger program written in c++ using QtCreator. I would like to create a c# dll to interact with the sdk and then consume this in the c++ program. Has anyone done this before and can point me in the right direction.
Many thanks.
You can, I do this regularly at work. You can consume C# from C++ using COM and Interop. Worth noting now that this is all windows only.
If you've not used COM from C++ before you are in for a nasty surprise. It's fairly unpleasant.
This is a very big topic, so I can't really cover it in a post, but if you want to learn more, I'd look here for starting on the C++ side:
COM(C++) programming tutorials?
I'd recommend using ATL to make your COM life a lot easier.
EDIT: Actually I didn't know this, but Qt has COM support, so you'd be much better off using that - Have a look at https://doc.qt.io/qt-5.10/activeqt-index.html
Google around for the C# side, but it's mostly about using the ComVisible and Guid attributes on your classes to make them COM ready and then registering them using regasm.exe (Part of the .NET Framework).
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I've built a robust system that has many core functions that might actually get mess to use if I keep on expanding the code - therefore I decided to implement a scripting language and ability for program to read scripts from external files.
My first idea was to use C# by default, but then I've remembered how easy and readable Lua was, so I went with that - sadly, I can't find a simple yet effective library that would allow me to incorporate lua into my software.
tl;dr — is there a simple library one could use to implement lua and thus make usage of software built-in functions way easier? What are your thoughts and opinions on that?
First, there's MoonSharp.
I did experiments with it a while ago. Ultimately, I found it unsuitable for my needs, but it was straightforward to make use of.
Edit: dug up my GitHub repo where I tried this out.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I need to integrate CCTV Camera controls to the Web API. The Panasonic provides two means of control (activeX and DLL). The Panasonic ActiveX plugin and MS Windows Server 2008 R2 does not like each other, so this leaves me with the DLL.
DLL are C++ libraries.
Panasonic PS-API:
http://security.panasonic.com/pss/security/library/developer.html#SDK
I am looking for guidance, how to integrate the controls.
Using C++ Class DLL in C# Application thread describes inclusion of the .NET Class, where in my case is COM Class I think. The thread also mentioning a wrapper for functions within the dll.
I am looking for some super simple example of the dll referencing, inclusion, dll wrapping and usage.
Thank You all.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
JNA has a great collection of native functions, constants and structures. I need a similar library for C#. But I can not find anything after a lot of searching. Does anybody know any alternative for JNA library in C#?
I don't know a direct equivalent of JNA for C#. However, by using P\Invoke you can call any (or almost any) native function. Another aproach migh be to use COM Interop. Here is a general article about interoperability in C#.
As you said using P\Invoke might be troublesome. But, there is pinvoke web site which might be very helpful. It contains declarations of many native funcions, structures... ready to use.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have been experimenting with OpenCL for quite a few days now, I'm using AMD's SDK and I'm now able to run a simple kernel in parallel and passing input/output to/from it.
I have to say though that I'm very disappointed by the lack of proper documentation for it, CUDA seems much more mature than OpenCL, but I cannot use CUDA because I don't have nVidia and because I want portable code.
I have read that AMD's OpenCL SDK now supports "static C++" extension which allows you to have some C++ features for writing the kernels, like inheritance and passing classes instances from the host to the device. However I cannot find ANY documentation for that or any examples.
To be short, my question is:
Where can I find documentation about using OpenCL's static C++ extension?
An extra question would be, where can I find PROPER documentation for the C++ wrapper (1.2 and not 1.1)
a super extra (:P) question would be, is there any complete/mature C# wrappers for OpenCL 1.2?? so far I found OpenCL.NET which is working fine, but again it doesn't have documentation so I have to look at the OpenCL C Reference and try to find the equivalent in C#
Thanks for reading this, I understand it's kind of ambiguous, all I want is an easy to use OpenCL SDK with proper documentation (Except C of course, I hate using plain C).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there a wrapper class somewhere for WIA/TWAIN functionality in a C# application?
Every search I make points to the same old 2001 CodeProject page, there has to be something new out there, right?
Maybe I'm not looking in the right place. :P
I need something really simple, like:
Image myImage = wiaWrapper.GetImageFromScanner();
Done and done.
Any guidance?
TwainDotNet
I've wrapped up the code from Thomas Scheidegger's article (CodeProject: .NET TWAIN image scanning) into a GitHub project.
I've cleaned up the API a bit, added WPF support and several people have added other improvements. I've tried to keep the API simple but it is still a bit more complicated that what you've got there.
Also this question has some other options: .NET Scanning API
Besides TwainDotNet maintained by Luke, I have recently noticed NTwain on NuGet (project page on Bitbucket).
Disclaimer: I work for Atalasoft
We publish DotTwain, which is a .NET TWAIN SDK. It's royalty-free and is used in InspectorTWAIN.com to help certify TWAIN drivers (we're members of the TWAIN working group).
Our product is a .NET Assembly that wraps interop calls.
You could also take a look at EZTwain from Dosadi, which is free. I don't know how native the .NET support is, but they have a way of calling from .NET.
As for a WIA C# wrapper, I came across ScanWIA on Codeplex. It doesn't have a whole lot of documentation. However, reading the source code might help.