First of all am new to PPAPI plugin development. Earlier i have been using NPAPI plugin to perform certain functionality which in turn uses windows APIs.Now since NPAPI is obsolete, i am trying PPAPI. My question is can i link windows APIs to PPAPI? Is it possible ?
As Bennet mentioned, it is not possible to make calls to the Windows API. If this is necessary for your application, try making a Chrome Extension and using Native Messaging instead.
From the link:
Extensions can exchange messages with native applications. Native
applications that support this feature must register a native
messaging host that knows how to communicate with the extension.
Chrome starts the host in a separate process and communicates with it
using standard input and standard output streams.
It is not possible to call Windows functions. If it were, then it would be trivial to escape the NaCl security sandbox.
Related
There are many .Net wrappers in C# for WinPcap like SharpPcap and PcapDotNet
I have tried to add these Nuget packages to my Xamarin Forms projects but it does not work. I want to create a wifi/packet scanner but I am not sure how to do this in Xamarin. Is it even possible?
When I clone the GitHub repo and build my own version of SharpPcap, the application runs, but I get the error:
System.DllNotFoundException: wpcap
The wpcap.dll is the dll that all these packages are wrapped around and use [DllImport("wpcap.dll")] to work. This wont work in Xamarin (I think).
Another way to use dll's is when you embed them as an application resource, is there any library which I can use that does that?
WinPcap consists of a driver, that extends the operating system to
provide low-level network access, and a library that is used to easily
access the low-level network layers. This library also contains the
Windows version of the well known libpcap Unix API.
Source: https://www.winpcap.org/
There is nothing impossible, however in mobile world you don't have that low level access to drivers and etc. unless you have a root on your device. It is unclear what exactly you want to build. But I know that on both iOS & Android there is an app called Fing. It scans your WiFi network for connected devices. It is written natively per platform. On Android there used to be many different applications that used MITM technique. For example DroidSheep. But I am not aware of any cross-platform solution that is able to scan the network or sniff packages.
Probably this question may be a simple one. Still I have not got answer from WWW.
tideSDK provides UI Module, and through which we can create same UI across platforms [ mac, windows, Linux].
MY Question:
What is the backend library tideSDK uses to bring UI?. Does it abstracts native UI Components and provides on presentation layer? Confused.
Kindly help.
UI Module of TideSDK provides abstract layer on top of native UI components. This means that the implementation of windowing apis are all native to the platform.
Taking example: Users of TideSDK would write the code in JavaScript language. all the commands would be natively implemented using the standard windows apis for "Windows XP / Win7 / win 8", and the JavaScript code will translate the instructions in native code for windows and execute appropriate commands. The same JavaScript code in osx will translate to native commands of Mac OS. and the same way it would work for linux.
Backend Parts of TideSDK has been implemented in variety of languages (c++ or languages inherited from c++) including VC++, Objective C++, C++.
We use different compilers (including Microsoft Visual Studio, g++, xcode) for different OS.
So basically to answer your question: TideSDK is the bridge between natively implemented code and JavaScript. It tries to interpret the JavaScript and translates everything to native language which the underlying operating system understands. By doing this the users of TideSDK will see consistent interface while dealing with various native parts while TideSDK abstracts out the detail.
I have taken UI Module as an example here but there are many modules available in TideSDK which provides variety of native functionalities.. checkout the api docs here
I am writing an application which requires access to the microphone of a device to determine instantaneous volume levels. The app will have a web version, iOS version, and Android version, and must be compatible with as many devices as possible, since the particular user base our application targets may not be able to switch browsers easily.
At first, I looked into using HTML5 for my application. However, it does not seem to be viable for my purposes, because I can't find any cross-platform way to get instantaneous microphone input and many users may be using an out-of-date version of their browser, which would not support HTML5. Is there any tool which alleviates these challenges and would allow me to use HTML5?
As a replacement, I began looking into Apache Flex. It seems to have all of the features I seek: It is cross-platform, allows me to access microphone volume levels, and will work even on very old devices, as long as they have Flash installed. However, many people predict the imminent death of Flex and strongly argue against using it, opting rather for HTML5. For my purposes, is Flex an appropriate tool, or would it still not be recommended?
You can achieve it by using PhoneGap or similar backend app which can host a webview and allow you to access native api through JavaScript or JSObject.
For front end, you can use HTML and keep your UI standard across all devices/platforms.
PhoneGap is little bulky but on Android and iOS, you can create a minimal app by hosting WebView and customize it to create JavaScript bridge and write your own native api.
I talking about Native Client thing for google chrome...
Developers claim it can run native code compiled from c / c++ in browser's sandbox.
They describe a lot of things, but never point at what I need... So, if I create window in my application with CreateWindow, would this window appear when my Native Client application loaded into browser?
In short, no. Two key things to know about apps that use Native Client in Chrome:
They are platform independent (platform-specific calls are
disallowed).
They are still web apps with the restrictions and possibilities that come with that.
If Native Client allowed operating system-specific calls like CreateWindow, it would no longer be platform independent (and it would also present a security risk).
Instead Native Client provides a set of platform-independent APIs called Pepper or PPAPI that work the same for all supported operating systems (currently that's Mac OS, Windows, Linux, and Chrome OS). As mentioned, apps that use Native Client are still web apps, so Pepper gives the same possibilities and restrictions that you'd expect from JavaScript. E.g., you can fetch URLs or ask the user for fullscreen permission, but you cannot access any random file from the local file system (app-specific isolated local storage is possible; as is having the user upload a file for the app to use).
Moving an existing C or C++ codebase to Native Client is very much like porting to a different operating system. Instead of using, say, Windows API calls, your app should use Pepper API calls.
For additional background it may be worth noting that Chrome Packaged Apps can request access to a much wider set of APIs in the chrome.* namespace. These APIs include USB, sockets, opening new windows, and more. A Chrome Packaged App will still not be allowed to make OS-specific calls, but they have access to quite a few more APIs, all of which are platform-independent.
In short, if your app can be made to work with the Pepper API plus the chrome.* APIs, you could write it in Native Client and JavaScript, and you'd have an app that worked the same way across the four operating systems mentioned above. If your app cannot be made to work with those APIs, Native Client in Chrome is not the right choice.
Seems not.
This is a bit related: http://ssj-gz.blogspot.com/2013/01/emscripten-qt-progress-faster-better.html. It's translated to javascript, though, and only for QT. And slow.
I'm working on a project that requires a desktop client to scan certain directories on a users computer at set intervals. My plan is to separate the actual directory scanning code out of the GUI and into a service so that it can run even when the GUI isn't open. Does this sound like the right way to do this? Additionally I'd like all this to be cross platform. I'm using QT to create the GUI. Is it possible to write cross platform services? I've looked into QTService a bit. The documentation for QTService says it's for implementing Windows services and Unix daemons. I assume the Unix portion means support for both linux and mac systems? Any other suggestions?
Yes ,Qt definitely seems a good option for developing cross platform applications.You can write once and recompile it for windows ,Mac and linux.A Qt app will actually look like a native app because it uses the native look and feel to decorate its widgets.
You can alter the build process to build a GUI app or a console application that can be invoked from commandline.
EDIT
QtService is not part of the standard SDK . It is available here