I am currently working on CEN/XFS. I have read the documentation. As far as I know, for each device (for example: Card Reader, Dispenser, Pinpad...) there is a special library (.dll) for interacting with CEN/XFS
Where can I get a library (.dll) for a specific device (for example, for a card reader)?
The dll is usually provided by the device manufacturer. It then gets loaded by the Xfs Manager.
If you are implementing a service provider for a specific device you have to implement this dll.
Related
I've been doing some testing recently with a C# app. This app uses a load of C# DLLs, and I'm trying to find a way to find the base address of these DLLs. Enumerating through all the modules via functions like EnumProcessModulesEx only shows the windows DLLs, but that's when I discovered through the Windows Resource Monitor that the C# DLLs that I'm looking for can only be found in the 'Associated Handles' section and not the 'Associated Modules' section, so that begs the question. How can you grab the base address of a C# DLL that would appear under the Associated Handles of a process?
NOTE - I know that this is possible to do because apps like Extreme Dumper that specialize in C# applications have the ability to get the base address of these DLLs, but the method that's used in that is way over the top.
I use "82357B USB/GPIB" in order to communicate with a device with "Agilent Communication Expert".
How can I communicate with the device in C# code? What should I need to install? Which references to add? etc.
And how to diploy the application to another computer? Does the computer need some installations?
Thanks
See "Keysight IO library suit Getting started with Visa.Net C# Instrument control program"
This document describe how to build visual studio solution with visa to communicate with device over GPIB
https://keysightsales.my.salesforce.com/sfc/p/#1a000000awb5/a/2L0000009JeU/UxdJUjDDylNahqCuK6OHVbjWCycgVq7mZhTdkMgNDDI
Another important document is "Keysight IO Library Suite VISA.NET / C# Quick Reference Guide" (google it)
I have manifest-based ETW providers written in C++ and C#. Both providers use same manifest (generated by Microsoft.Diagnostics.Tracing.TraceEvent package from C# code). Channel is Debug.
Event publishing is success (return value is 0) in both providers and I can see them in perfview.
If manifest isn't installed, C++ provider's events are shown in perfview with provider's GUID, event id, etc. There is no "stringed" property like provider name, event name.
But C# provider's events have those properties.
Why C# provider can do this? In EventSource.cs, there is SendManifest method and additional ManifestData event is logged only when I use C# provider. Is this a reason? If so, can C++ provider achieve this behavior?
Edit
I know how to install manifest with wevtutil.exe or eventregister.exe. After some research, I found my necessary is implement "self-describing" event in C++.
The Windows 10 SDK includes support for a new ETW system that doesn't require a manifest at all. You can use the TraceLoggingProvider.h header to generate these events. This new system is also supported in .NET 4.6 or later in EventSource if you use the eventSource.Write method or if you set the manifest-free flag. (There is also an EventSource NuGet package if you want to use the new features but don't want to make .NET 4.6 a prerequisite for your program.)
Note that while the technology requires a new sdk, and you'll need new decoder tools to decide the new log file format, the technology works with programs running on Vista or later. In other words, you'll need to use the Windows 10 SDK to get the new TraceLoggingProvider.h header, but the resulting program will run ok on Vista or later as long as you set the WINVER macro to the right value for the OS you want to target.
The main benefit is that no manifest is needed. The main downside is that your log files will be a little bit larger (since each event needs to include a bit of information about how to decode itself).
The other answer is also correct and valid if you want to use manifest-based ETW. The only officially-supported system for manifest-based events is to register the manifest. The system that EventSource uses (where it throws a copy of the manifest into ETW) isn't well-documented, isn't supported by all of the ETW decoding tools, and I'm not sure that there's any support for you doing it yourself. If you're just interested in collecting and decoding log files, you only need to have the manifest registered on the machine where you'll be doing the decoding (the manifest is only used for merging and decoding -- it isn't needed when the log is being captured).
As far as I know TraceEvent emits the manifest during the rundown to the ETL stream which can then be decoded by WPA. Then WPA can display then the stringified name. If you let run both the C# and the C++ provider you should see one ETW provider with name. Personally I have worked around that by creating a manifest from my C# ETW provider and then registered it with in thy system with wevtutil. Then I always get a name but I need to have admin rights to do that.
See
http://etwcontroler.codeplex.com/SourceControl/latest#ETWControler/ETW/HookEvents.cs
I wrote an app on my iPhone. It's a more portable and smaller version of my pc software. I activated the File Sharing feature on my app so now I can transfer files through iTunes. But I want my pc software to be able to read or write files to that shared folder on my iPhone without having to do it manually through iTunes.
I have big constraints:
I can't use a Jailbroken iPhone/iPod/iPad
The vast majority of my customers don't have Internet access (It's a farm management software so even cellular are not available in some area)... :(
I heard there is a way using Manzana and MobileDevice.dll (itunesmobiledevice.dll). I don't really know how to use these dll. I tried to use Manzana a little but I can't access my folder since it's not a jailbroken iPhone.. Can someone help me with a little bit of code example?
Or is there other ways to make my iPhone app communicate with my C# application using the USB cable without internet access or Wifi?
mobiledevice.codeplex.com. This project should let you send and retrieve files from the phone
I'd suggest seeing if you can use the iTunes scripting interface. Add the COM reference iTunes 1.1 Type Library to a project and you can control many parts of itunes automatically. I can't find the documentation for it, but you can play around with the library and see if there is something to access the file sharing section.
Here's a decent introduction to using it:
http://www.codeproject.com/Articles/7723/Controlling-iTunes-through-COM
I have a USB device which which uses the libusb WIN32 drivers and
Interrupt data is available from the
accelerometer through the USB-HID
interface endpoint 83 (in EP83). Data
is in little end-in format with the
following fields (x,y,z,Vbat,CpuTemp.)
Data are acquired every 62.5ms (16Hz).
There a number of USB HID "get" and
"set" Reports available (through ep0)
How can I access this data via .NET and C#?
libusb32 is c/c++ library of generic usb driver. it comes in 2 layers. low layer in kernel mode is generic client driver libusb0.sys + .inf file that you change and it tells to what device to upload this generic usb driver.They have inf-wizard.exe tool that helps for you to make this .inf file for your device. Upper layer in user space is libusb.lib (you can make also static link) that talks to libusb driver. You can find in sources usb.h that actually defines interface between you code and usb (usb driver). To access unmanaged code or you should write your layer of interop in c# or in c++/cli or use ready layer that been made by somebody. Here the link to one of the projects, http://sourceforge.net/projects/libusbdotnet/
How to use libusb library i advice you to see some example from them. Usually it like you open handle to usb bus, then find there your device by VendorId & ProductId, get it's handle. Then make write/read to endpoints of device.
If it is HID device I recommend you to use Windows's default driver - hid.dll, I used it and it was ok. This way you should not care about deploying also a driver, it's there anyway and you just have to understand the API and use it. For this I recommend you Jan Axelson book USB Complete, she has pretty good explanation and samples there, it is a mixture of C/C++ and C# but the trend is for .net Also she has a HID Page on her website and there you find the code samples you just need.