jsctypes

    1熱度

    1回答

    我想使用js-ctype製作一個基本的Firefox插件示例。首先,我做了一個的.dll文件用一個簡單的C代碼: #include "stdio.h" extern "C" { __declspec(dllexport) int add(int a, int b) { return a + b; } } 庫文件是罰款。我在另一個項目中測試了它。 我被JS-ctypes的代碼加載

    1熱度

    1回答

    我正在嘗試爲Firefox編寫WebExtension。低調地說,我需要一個工作示例來說明如何從Firefox運行本地程序。 我當前實現擴展包括: background.js 內容scripts.js中 manifest.json的 從網頁我送其處理的消息由content-scripts.js轉發給background.js。但是在background.js的msgbox函數中,我無法調用ctyp

    9熱度

    2回答

    我想構建一個Firefox擴展,需要調用本地C代碼。 我的C程序代碼是: #include<windows.h> int add(int a, int b) { return(a + b); } 和我的JavaScript代碼是: var {Cu} = require('chrome'); var self = require('sdk/self'); Cu.import(

    0熱度

    1回答

    有誰知道android向Firefox應用程序公開的本機庫(C)?我打算使用js-ctypes,但不知道我可以使用的libs。如果你可以請分享這些庫,然後我可以查閱文件,並瞭解我所能做的。我的目標是在Android上採用原生截圖。

    1熱度

    1回答

    我跑的代碼,但遇到了以下錯誤: 1423705078419 Services.HealthReport.HealthReporter WARN Saved state file does not exist. 1423705078420 Services.HealthReport.HealthReporter WARN No prefs data found. ReferenceError:

    0熱度

    1回答

    我將這些託皮斯到jsctypes爲X11: How do I bring a processes window to the foreground on X Windows? (C++) How to get an X11 Window from a Process ID? 它的工作確定。當我循環代碼崩潰時,我只是遇到了一個問題。 爲了測試我只是在一次循環,但它仍然崩潰:當我運行的代碼,它崩潰 s

    0熱度

    2回答

    : var rgsFilenamesType = ctypes.ArrayType(ctypes.char.ptr); var rgsFilenames = new rgsFilenamesType(1); rgsFilenames[0] = 'rawr'; //OS.Path.join(OS.Constants.Path.profileDir, 'parent.lock'); 但它不斷告

    1熱度

    1回答

    我寫了一些代碼來枚舉當前窗口的屬性。您可以複製並粘貼到暫存器並運行它。這是枚舉,但它不可讀的字符串。 另外,它只是枚舉當前firefox窗口的4個屬性,這聽起來是對的還是不是所有的? 代碼: Cu.import('resource://gre/modules/ctypes.jsm'); var lib = { user32: ctypes.open('user32.dll') }

    1熱度

    1回答

    我有5個進程。我有他們的進程id。這些進程中的每一個都鎖定它們自己的parent.lock文件。我將這些parent.lock文件路徑放在一個名爲PARENT_LOCKS_PATHS的陣列中。 使用NtQuerySystemInformation和SystemHandleInformation我得到一個列表,它返回SYSTEM_HANDLE_TABLE_ENTRY_INFO爲這5個進程使用的所有句

    1熱度

    1回答

    我正在開發使用libedataserver.so的Thunderbird插件。 Addon使用js-ctypes從上述庫中調用e_source_registry_new_sync。請參見下面的代碼: var lib = ctypes.open("libedataserver-1.2.so.18"); var GCancellable = {}; GCancellable.cl