I converted the jar file into .net dll file using IKVM. Now i am trying to consume it in my .net app, but it seems that the qrcodereader.decode requires BinaryBitmap which further requires Luminance as parameter. Please guide me in this situation since i couldn't find the right classes that implements the abstract classes.
Luminance sources are platform specific. You can find examples in the android, java2se, and iphone directories. I don't know if there are any luminance sources in the csharp directory but that code is not actively maintained so even if there is, it'll likely take cleanup adaptation (not to mention I have no idea if it's compatible with IKVM).
Related
I need to be able to check who has a file open using C#. I found a few people asked this question before but they were all a long time ago with the latest being in 2012. I was wondering if, in the last 5 years, has Microsoft added this ability to .net or maybe someone came out with a nuget package that is capable.
Here is the latest answer I found
You can use windows internal function NTQuerySystemInformation with undocumented parameter SystemHandleInformation for it. I don't know about c# implementation, but I know delphy code for it, and vb6 code. Check this links, it will help you to make your c# implementation.
Delphi - get what files are opened by an application
https://forum.sysinternals.com/topic14546.html
As far as I know, the standard library still does not have suitable functions for this. There is a popular question about this: https://stackoverflow.com/a/937558/5665527.
Also, if you want to know who opened the file remotely - net file function may be useful (which is accessible via cmd). I believe that there are similar WinAPI functions on MSDN that could be implemented in a similar way.
I'm looking for a specific form of facial recognition. I want to detect where all the faces are located (and that's all) on an image of students in a class-picture.
So in other words, I'm not trying to compare two faces and see if they match either.
How can I do this in C#? I can't seem to find any open-source projects on NuGet regarding this, and I've looked on CodePlex too.
My personal preference for any Computer Vision related needs is to use http://opencv.willowgarage.com/wiki/ , however, it isn't natively made for C#.
However, after a quick Google search, I found http://www.emgu.com/wiki/index.php/Main_Page which says "Emgu CV is a cross platform .Net wrapper to the Intel OpenCV image processing library. Allowing OpenCV functions to be called from .NET compatible languages such as C#, VB, VC++, IronPython etc. The wrapper can be compiled in Mono and run on Linux / Mac OS X."
Now that Face has retired since it was purchased by Facebook, I use Sky Biometry, which has a C# .NET API and is free.
It's cloud based and obviously requires an Internet connection, but who cares.
I recommend checking FaceRecognition.Net (https://github.com/takuya-takeuchi/FaceRecognitionDotNet) that is base on Face Recognition (https://github.com/ageitgey/face_recognition) that is implemented in Python. Both are Open Source with MIT license.
Another option is Cognitive Services – Face that is from Microsoft and you can use it from Azure directly or from a local Docker. Here you can find more about it: https://learn.microsoft.com/en-us/azure/cognitive-services/face/
I currently have a project that operates in Windows using P/Invokes to call the Smartcard API; however, since I've now open-sourced the project and put it on Google Code, I'd be interested in making it work for Linux peeps on Mono.
The blockade to doing that however, is the smartcard code; I have absolutely zero familiarity with talking to smartcards under Linux and Google searches haven't revealed anything enlightening.
Well, I found my answer; PCSC-lite implements the entire WinSCard API in a compatible format, so all I've needed to do is bundle a small .exe.config with the program so that mono will replace the DllImport for WinSCard.dll with pcsclite.so.1 at runtime and everything works out of the box.
I think PCSC is what youre are looking for. Haven't used it because I don't have to deal with Mono/Linux, though I can't give you any details about it.
Ok this situation is a bit difficult. But I am trying to embed a Java Jar into a C# form. Not as a new window or new process.
The Jar will be a game that uses the LWJGL library.
The C# Form will be a "wrapper" for it with tools and more.
Anyone have any ideas? Is this even possible?
According to the IKVM Home Page
IKVM.NET is an implementation of Java
for Mono and the Microsoft .NET
Framework. It includes the following
components:
A Java Virtual Machine implemented in
.NET A .NET implementation of the Java
class libraries Tools that enable Java
and .NET interoperability
One would approach it from using a DLL not a jar. Also this sounds like a bit of a security issue.
They're completely different runtimes; you'll need a process for both the CLR and the JVM; no way around that.
You can try the Java to C# converter provided by MS, and then rebuild: http://www.microsoft.com/downloads/details.aspx?FamilyID=46bea47e-d47f-4349-9b4f-904b0a973174&displaylang=en
How do I use Windows Vista's FOLDERID API in order to retrieve filepaths for "known folders" such as System or Windows? I've seen some APIs but I don't know how to import them properly. And yes, I know this is a very newbie question, but I spent a half hour googling and couldn't find the answer; I'd also appreciate a way to find an answer to questions like this in the future. :-)
Edit 1: So apparently the relevant functions are included inside of a DLL, and not any "proper" C# class/library that can be imported. The pinvoke syntax might work, although I was hoping for an OOP interface, not a function. Will test.
Edit 2: So I am very new to C# and don't know what a managed interface is. System.Environment.GetFolderPath is perfect.
Take a look at PInvoke SHGetKnownFolderPath
There's also a managed API:
Environment.GetFolderPath
but it doesn't contain all the folders.
This morning I read about Vista Bridge. It may help.
"Many of you don’t know about the Vista Bridge sample library, what can it do or even where you can find it. Let’s start with the basics; i.e. definitions. Vista Bridge is a sample library that contains managed wrappers for a number of Windows Vista APIs that are not exposed in the .NET Framework. The wrappers include common Open and Save file dialogs and new Vista advanced task dialogs. So, where to download it? There are three ways to obtain the sample library. It’s included in both the Windows SDK for Windows Vista Update and in the newer Window SDK for Windows Server 2008 and .Net Framework 3.5; or a third option is to download the Vista Bridge sample library which is part of the Windows SDK Cross Technology samples. I recommend downloading the Windows SDK for Windows Server 2008 and .Net Framework 3.5, but if you don’t have the network bandwidth or just want the samples, then the last option should be the most suitable.
..."