Questions tagged [xpcom]

XPCOM (Cross Platform Component Object Model) is a cross-platform component model from Mozilla. It is similar to Microsoft COM and CORBA.

XPCOM (Cross Platform Component Object Model) is a cross-platform component model from Mozilla. It is similar to Microsoft COM and CORBA.

It has multiple language bindings, allowing XPCOM components to be used and implemented in JavaScript, Java, and Python in addition to C++. Interfaces in XPCOM are defined in a dialect of IDL called XPIDL.

409 questions
0
votes
1 answer

XPIDL (typelib.py) type not found error

I am trying to build a Firefox extension that makes use of IDL. However, the build dies with this error: [apply] Executing 'python' with arguments: [apply] 'C:\Users\Dad\Documents\Sage\xulrunner-sdk/sdk/bin/typelib.py' [apply] '-I' [apply]…
Dr. Pain
  • 689
  • 1
  • 7
  • 16
0
votes
1 answer

Firefox binary extension: nsISupports to JS::Value

I am trying to implement nsIDOMGlobalPropertyInitializer::Init(). I have an existing object (based on Google Gears) that I am trying to extend to support JAVASCRIPT_GLOBAL_PROPERTY_CATEGORY (since JAVASCRIPT_DOM_CLASS does not seem to work in FF17…
Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
0
votes
1 answer

no effect on: appShellService.unregisterTopLevelWindow(topXulWindow); (hide window)

I overlay chrome://browser/content/browser.xul with an .xul adding a button to the main-menu. clicking it opens another ChromeWindow with a .xul-window. var ww =…
spaxxUnited
  • 625
  • 1
  • 7
  • 16
0
votes
1 answer

Firefox crashes when XPCOM function called from thread

I want to create a thread from XPCOM Component ... Here is a code for that nsresult rv = NS_OK; nsCOMPtr obj = do_CreateInstance("@jscallback.p2psearch.com/f2f;1", &rv); NS_ENSURE_SUCCESS(rv, rv); char* str="Hello from C++"; …
Xinus
  • 29,617
  • 32
  • 119
  • 165
0
votes
2 answers

Javascript alert not defined . .

I am creating a javascript xpcom component Its source is as follows- Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); function callback() { } callback.prototype = { classDescription: "My Hello World Javascript XPCOM Component", …
Xinus
  • 29,617
  • 32
  • 119
  • 165
0
votes
1 answer

Not able to modify POST data in Firefox extension

I am trying to implement a Firefox Extension which modify the POST request data. Code follows, it fails where marked "Fails here!!!" Any insight would be helpful. Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); var…
reevh
  • 735
  • 2
  • 8
  • 20
0
votes
1 answer

Need Help on Creating XPCOM...!

I want to create an XPCom, which I want to use to get Mozilla DOM, object in my C# application. I am really very new bee for this. Can some one tell me exact steps? Like from starting with C++ to create XPCOM and to end with C# which can get the…
Sanket Shah
  • 461
  • 2
  • 7
  • 17
0
votes
1 answer

XPCOM writeString error

I am using this function to write text to a file via iMacros addon in FireFox. //This function writes string into a file function WriteFile(path,string) { //import…
edinvnode
  • 3,497
  • 7
  • 30
  • 53
0
votes
1 answer

Use XPCOM to upload file/image on webpage

I am using an example found here. Mozilla developers I am interested in this example. function upload(postUrl, fieldName, filePath) { var formData = new FormData(); formData.append(fieldName, new File(filePath)); var req = new…
edinvnode
  • 3,497
  • 7
  • 30
  • 53
0
votes
1 answer

XPCOM in JavaScript, launchFunctionW?

I studied in an open-source Firefox plugin, I wanted to know what action does the following code snippet. I knew nothing of the code?? enter: function() { if (this.xpcomObject != undefined || this.createXPCOMObject()) …
HamiD
  • 197
  • 1
  • 2
  • 11
0
votes
1 answer

Running EXE from Firefox - in a certain path

I found the solution to run an executable file (.bat or .exe) from a local html page in Firefox - it is documented very well here However, I need to start the executable in the folder where it is located. My executable is a .bat file…
BearCode
  • 2,734
  • 6
  • 34
  • 37
0
votes
1 answer

Service Control Security Issues in XPCOM

I'm am developing a Firefox extension which interfaces with an underlying Windows service (which I have already made). During the development so far I encountered one bug in the installer program (which installs the FF extension AND the service).…
rwired
  • 1,112
  • 3
  • 15
  • 28
0
votes
1 answer

How to call a user javascript from a firefox plugin

I am very new to writing plugins for firefox. I am writing a plugin to intercept a URL protocol (I got it here: http://www.nexgenmedia.net/docs/protocol/) inside the plugin and then call some user loaded Jscript functions to pass data. My question…
2ndlife
  • 1,378
  • 3
  • 14
  • 20
0
votes
1 answer

javascript xpcom component to download weather underground weather data

I am building a javascript component for Firefox that will take in a zip code, and will return the current weather conditions. The sample code that weather underground uses jQuery, but as I understand it, I cannot include this code in my javascript…
basil
  • 690
  • 2
  • 11
  • 30
0
votes
2 answers

Loaded data truncated when using nsIFileInputStream & nsIConverterInputStream

I'm working on a project (BrowserIO - go to browserio dot googlecode dot com if you want to check out the code and work on it. Help welcome!) in which I'm using Firefox's nsIFileInputStream in tandem with nsIConverterInputStream, per their example…
John Nicely
  • 1,006
  • 8
  • 18