0

I have to call the C# classes from javascript through Firebreath Framework. I am new to the Firebreath Framework.

Suppose In the C#, Public Class ImageDraw { } Public Class Test { public void TestDrawImage(ImageDraw imageDraw) { } }

Then I have to call this TestDrawImage(ImageDraw imageDraw) from javascript through firebreath framework. The same way i have to call the events,properties ,classes of C# from javascript through Firebreath framework.. I want the generalized solution for this problem How should i implement this? If you have any solution, sort of information ,ways to communicate the C# classes from Javascript through Firebreath Framework then please let me know..

I already created the wrapper for the same. But the problem is for each new method i have to instantiate the wrapper in the Firebreath. Same might be happened for each new class from C# in Firebreath i have to instantiate the wrapper. So Is it possible to have some centralized method that gathers the full instance of wrapper in Firebreath.

1 Answers1

1

FireBreath is C++, not C#. If you want to call C# functions from a firebreath plugin you'll have to create some sort of bridge between the firebreath c++ and the c# stuff. Learn how to do that, then learn enough C++ to tie it into your firebreath plugin.

taxilian
  • 14,229
  • 4
  • 34
  • 73
  • Could you please suggest what kind of bridge i have to build between the firebreath C++ and the C# stuff – user2372247 May 14 '13 at 13:15
  • I sure can't. I don't know. Try asking (or searching for) a question about calling C# code from c++. Something like http://stackoverflow.com/questions/778590/calling-c-sharp-code-from-c or http://stackoverflow.com/questions/4465639/call-c-sharp-dll-from-unmanaged-c-app-without-com?lq=1. Note that you probably can't build FireBreath with CLR on, so you will likely need to create an intermediate C++ DLL. – taxilian May 14 '13 at 15:34