We are hosting the ActiveX control in a WinForms application to embed flash.
Is there a good way to get the list of visible ExternalInterface functions that are available for any given swf file?
We are working with a 3rd party swf file, and do not have access to source.
If it's not possible from C# (or code), is there a tool out there that can do it?
ANSWER: The only way I've found is to use a flash decompiler and then look for the line:
ExternalInterface.addCallback("methodName", methodName);
I'm marking the top answer as the answer for the help.
As far as I can tell, Flash does not expose its external interface "API" to the environment.
Use event FLASH_CALL on your Flash ActiveX object and decode XML like:
this example.
Related
Is it possible to make from a HTML5-APP (PHP,SQLITE,HTML,CSS,JS) a installable Windows Software in c#?
The software must start PHP (5.4), and must just load the document-root in the webbrowser object.
In theory it should work without problems. But what about protecting this code? Is it possible to protect at least the PHP part? Will ioncube or zend-guard work on PHP 5.4's embeded server? And is it possible to hide the shell window, which will open everytime, when i start the PHP Webserver via cmd?
Or do you know an alternate, how i can make a software from a HTML-5 (with PHP) App?
Your choosing the wrong language. PHP, HTML, JS, CSS and SQLLite are separate technologies.
I'd suggest writing the app in another language capable of producing an executable like C / C++ (and one that can plug into to SQLITE fairly easy).
If you want to create a installer out of HTML5-APP (PHP,SQLITE,HTML,CSS,JS) , take a look at bitnami package, it may solve your problem, if you have any explicit reason to use C#, and then you have see its library or namespace which may give you installer capability. However your question is unclear, can be be more clear?
You can embed a Chrome browser in C# using the CefSharp project. You would also need to embed some webserver (php built-in webserver might work, but it's single threaded so it might be an issue).
If it doesn't necessarily need to be C#, then take a look at the PHP Desktop project that is using C++ to embed a Chrome engine, a multithreaded webserver Mongoose and a PHP interpreter. Sources can be protected using many available php encoders, see the KnowledgeBase wiki page on the project site for details.
Q1) How to get notified about the .xap file has started downloading and finished?
Q2) Are there any specific api's that start loading the xap file inside the ie environment?
References to programming examples are welcome.
I need the information to make text translation possible within silverlight application.
Thanks in advance.
Answer 1 : There is no such event to check if application is downloaded or not. It depends on browser and network speed.
Its treated as simple file to the browser. Someone asked this question before also
How do browsers handle caching of XAP packages?
Answer 2: Nopes there is no specific API, its browser which does the download and treat it as a file
What type of translation you are looking for?
Localisation?
Probably try out WebService API to do wonders.
Is there a way to programmatically add text to the clipboard in C# (3.5) or javascript ? Does the client machine type make a difference?
Edit: Sorry, forgot to mention am using asp.net.
You can use Clipboard.SetText(string) and Clipboard.GetText() to interact with the clipboard.
See the MSDN article
As long as the client supports .NET, it shouldn't make a difference.
Oh, for the web...
Then use something like this jQuery plugin:
http://plugins.jquery.com/project/clipboard
It will allow you to copy and paste from the clipboard across browsers.
C#: In System.Windows.Forms you have a Clipboard class and a SetText method which probably is what you're looking for. Example:
Clipboard.SetText("My text");
Edit: Since you're looking for a way to set clipboard text on a client computer, here's an updated answer:
There is no browser agnostic way of setting clipboard text. It's possible in Internet Explorer using the following snippet:
window.clipboardData.setData('Text', 'Your text');
In Firefox and Webkit browsers, for security reasons, you need to go via flash to set clipboard text. Zeroclipboard is a nice library for this.
As far as I'm aware in the web world it would be a security issue to access the clipboard without some sort of client side control, i.e. ActiveX control or Flash. So it would prompt for the user to allow the access. Here is something to get you started.
In WinForms there is a static Clipboard class with a SetText method. So you can use
Clipboard.SetText("whatever");
There are some differences to the default text format based on which operating system you are running on: http://msdn.microsoft.com/en-us/library/ydby206k.aspx
You can use Flash.
I'm writing a WPF program in C# that needs to render a set of files in a file browser to the end user. The ExplorerBrowser control found inside the Microsoft Windows API CodePack contains much of the functionality I need... e.g. thumbnails of different sizes, sorting, browsing, etc...
The catch is that the files are not coming from the disk, but are available over a custom network transfer protocol.
I was originally thinking that I could simply extend the ShellObjectContainer class and ShellObject classes to provide the features I require, by essentially building an Adapter. However I've run into difficulties because these classes use internal constructors.
Overall it's looking like this API is rather hostile to extension, is there anyway to extend these components to do what I need, or am I better rebuilding much of ExplorerBrowsers functionality by creating a custom WPF component, perhaps by extending ListBox?
Yes, this certainly wasn't made to be extensible. Hard to see how you could get anywhere at all unless you create your own shell namespace extension. So that it is viewable in a shell window. Doing so is quite brutal in managed code, the shell's COM interfaces derived from IUnknown are very hard to use. Which is what the wrapper classes in the API code pack is doing to get a browser window in a managed program.
Creating the shell namespace extension is the greater solution, your custom files would be visible in a regular Explorer window as well. But write that kind of code in C++, both because it is so much easier to get the COM code going and to avoid injecting the CLR in any program that uses a File + Open dialog box. Although that is now technically supported by .NET 4.0
I have a problem with different sound libraries...
I use Visual Studio.NET and C#
I have programmed a small simulator with ebedded sound and want to have a audio library which also has pause and volume control. So I tried SDL.NET and IrrKlang. Both are working, but I want to have the simulator as a "standalone" simulator so I have to embed the audio libraries to the simulator. I tried the testversion of smartassembly, but the SDL.NET library isn't fully integrated and with Irrklang, smartassembly said that there is nonmanaged code in the irrklang library and it aborts.
So I have multiple questions:
-Is there a simple audiolibrary which I can embed easily?
-Is there a, for example, .cs-file of an audio library so I don't have to embed a .dll?
-Can I change a .dll so I have mangaged code?
Thx
EDIT:
Errormessages with SmartAssembly:
SDL.NET:
Tao.NET.dll and SDLdotNET.dll can be embedded, but SDL.NET (The Core) is not a valid .COM-Library so it can't be embedded
IrrKlang:
-IrrLang.dll can be embedded, but after converting the program says that there is "non-managed" code in library so it can't be embedded.
What can I do??
Try nAudio: http://naudio.codeplex.com/, you will have full source code.
But that's a library like others.
Or maybe try to edit your question and add error messages you get
Ok, got it finally to work :)
I used the irrklang.dll but I had chosen the "Depencies Merging"-Option in {smartassembly} instead of the "Depencies EMBEDDING"-Option
Now it works perfectly :)
Thx Pierre that you wanted to help me :)
Wonderwhy