Call A Method In Dll Using HTML5 - html

I have a dll file and i need to call a method in the dll and return some value.
Before i have used a VB script and called it from a html file that runs only on IE.
Now i need to call the dll directly from HTML5 without using any VBScript or Javascript.
Which tag can achieve this and that can be run in almost all browsers.
Please help me.
Thanks in advance.

There is an <embed> Tag, but it's not for DLLs. In fact there is no tag which allows you to call DLLs at all.
So you should step away from the idea to do your processing on the client-side and just move it to the backend. Create a ASP.NET-Service if you have to use your DLL. You can even use PHP5 (using COM functions) if it's running on a Windows server.

Related

How can I use a console application with my website in Visual Studio?

Please read the following in the Visual Studio 2012 context:
I have two projects--one is a website (File --> New Website) and another is a console application (File --> New Project --> Windows --> Console Application). I am the author of the former.
The standalone app fakes the input by hardcoding it, runs through some code, and creates an output. It uses dlls from a local installation of software that I have installed on my machine to generate this output.
I read on MSDN that I cannot add a console app to a website solution in a useful manner. So, if I compile the console app to output a dll instead of an exe, can I reference that dll in my website? How can I do this exactly? I would need to pass the input value from the website to the dll, and return meaningful results from the dll. Is this possible?
Yes, you describe a feasible way to solve this. You need to create a class library project, add source code from console application to it, except the the class that has static Main method and modify (add to) that source code such that there is a class that you will be able instantiate from the code in your web application after you add the class library assembly to the web application as a reference. This class will have a method with appropriate parameters, that you will call. All this assuming that the task that console application code performs is fast and will not create noticeable delay in the web application response. If the task takes a long time, you will either have to run it in a background thread or move it outside the web application - the latter is significantly more involved.

Can we use wxWidget to save a webpage onto the disk

I was using wget with system call (c++) to save a webpage from internet to my HD in a program. Now I want to use wxWidget to do the same. Is there anyway I can do that and still have the generic behaviour of wget? (i.e. i give a link to a pdf file n then a pdf file is saved)
I found this link http://wiki.wxwidgets.org/Download_a_file_from_internet
but I have no idea how to convert wxString to a pdf/mp3 file according to the url entered.
Could anyone help please. I am working on an open source project for the first time and I encountered this wxWidget just now
If you are happy using wget with a system call, then why not continue to do so?
wxWidgets is a GUI framework, with a lot of extra convenience functions included. You don't HAVE to use them. You can still use whatever C++ features, utilities and packages that your are familiar with.
Here is a link to Wget for Windows
You can use wxHTTP (as described here) or use wxURL and GetInputStream()

How to set up MonsterDebugger and FlashDevelop?

I'm trying to follow directions given by MonsterDebugger I've linked the SWC, added the code. Then built the project.
The last thing they say: "Publish your project and watch the magic happen."
What I got is a SWF that is built to an http directory where my PHP file picks it up and displays it in browser.
What I'm expecting/want is to interact with my SWF application through browser and debug it with MonsterDebugger.
I'm obviously missing something since there it looks like there is no way for Monster tool to attach itself to the SWF? I'm not sure how does Monster will know about my published SWF?
I'm using FlashDevelop/FlashCS5 and Actionscript 3.
Sorry if this is a stupid question, but did you actually started Monster Debugger.exe after publishing and opening your project in browser? Also MonsterDebugger.initialize(); has second argument which is an address if you publishing and accessing your project on the server I suppose. Did you try to change it?
My bad. I had MonsterDebugger.initialize() statement to execute last in constructor of my document file. I moved initialize statement to be the very first line in my constructor. Now it attaches. Apparently there was some code that executed before initialize that caused issue. All is well now that it is the first line in the document file.

Accessing NPN_ methods from NPAPI plugin

I have a NPAPI plugin developed for Chrome. It works ok. But now I need to call NPN_GetValue from the plugin. The question is, how can I link (either statically, or dynamically) my code and what library/binary should be used for imports? I searched through all Chrome binaries and I did not find a single one, which contains NPN_ exports. Surely NPN_ methods must be provided by hosting browser.
Thanks in advance.
The function pointers are provided to you as an argument to NP_Initialize; it's your job to keep them around so that you can call them later. The functions aren't exported for you to link to.

Possible to natively create hidden file or directory using AS3 / AIR?

Am I blindly missing a method for creating a hidden file or directory in an AIR / AS3 desktop app? Re-combing the docs, all I see is the File.isHidden read-only property. I know I could do this via NativeProcess and native code, but I'm hoping to avoid creating native code.
Thanks!
In Mac and Linux you only need to put a dot (".") in front of the file/folder name.
For Windows is a little bit more complicated since it is a property of the file. I've done it in the past by calling the "attrib" command, but yeah, you would need NativeProcess for that AFAIK.
Juan