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.
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.
When I open the Chrome's Task Manager, I can see something like this?
Now, programatically, is it somehow possible to target the Chrome instance that is being used to run the Flash Plug-In? Maybe using System.Diagnostics.Process class or native API calls?
I was able to do this with native api calls. My solution worked perfectly on my machine. Here is what I did:
First, get Microsoft Process Explorer. Using this tool, I was able to get the flash plugin dll's name that chrome uses which is called pepflashplayer.dll in my case.
Next, a little search on Bing got me this article. It's C code so I converted to C# and after some coding I was able to retrieve the correct Chrome process ID that uses flash plug-in.
I have uploaded my solution to SkyDrive for you to check here. Note that I am not closing any handles in my sample so you'll have to add that for a real project.
There might be better solutions out there but this one should work. Hope it helps.
I currently have written an API to a SIP phone system, and would like to integrate a full on SIP softphone into what I already have.
I'm looking to integrate an open source softphone that:
includes a full featured SIP stack
is written in C#, or easily integrable into a C# application
is BSD or similarly licensed
exposes basic features (dialing, transferring, holding, etc) in a fairly high level way (i.e. it would be easy to just write a UI for it and viola I have a custom softphone)
My goal is to make a proof of concept softphone quickly to be able to demo. I'd take a completely built softphone that was BSD if I could just rewrite the C# front end.
Thanks and I look forward to the invariably useful feedback.
As far as I know there isn't an open source C# softphone out there. My own SIP stack is C# and open source but it's used for a SIP application server and is missing chunks of functionality needed for a softphone such as an RTP implementation, codecs, audio device interop etc.
The closest thing I know of that may suit your needs is sipek voip (I'm pretty sure that used to be called pjsip.net) which is a C# wrapper on the pjsip open source SIP and media libraries which are themselves written in C and licensed under GPL; so pjsip doesn't meet your licensing requirement even if you were prepared to use the wrapper library.
The most efficient path for you may be to look around the existing softphones out there and find one that offers skinning services. IN this question which is similar to yours it sounds like the developer is using zoiper. I know counterpath also offer skinning but it's not cheap. Of course if you've got a few months of developer resources sitting idle I'm sure you could build on my or soeon
We are using the mizu webphone. It is not written in C# but it says that it is cross platform so i think that you should be able to use it with C# as well (we are using it from ASP .NET)
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).
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.
..."