Browse Source

修复保存设计闪退问题

Kevin 6 years ago
parent
commit
93b519dcb0
4 changed files with 3 additions and 2 deletions
  1. BIN
      dll/GetEasy.Node.Printer.64.dll
  2. BIN
      dll/GetEasy.Node.Printer.86.dll
  3. 2 1
      index.js
  4. 1 1
      package.json

BIN
dll/GetEasy.Node.Printer.64.dll


BIN
dll/GetEasy.Node.Printer.86.dll


+ 2 - 1
index.js

@@ -18,6 +18,7 @@ var dllPath = path.join(execDir, dllName);
 if (!fs.existsSync(dllPath)) {
     dllPath = path.join(__dirname, 'dll', dllName);
 }
+var callbackPointer;
 var dll = ffi.Library(dllPath, {
     designerReport: ['void', ['string', 'string', 'pointer']],
     reportShowPreview: ['void', ['string', 'string']],
@@ -34,7 +35,7 @@ var ReportApi = /** @class */ (function () {
      * @memberof ReportApi
      */
     ReportApi.designerReport = function (template, tempData, saveCallback) {
-        var callbackPointer = ffi.Callback('void', ['string', 'pointer'], function (data, func) {
+        callbackPointer = ffi.Callback('void', ['string', 'pointer'], function (data, func) {
             var nativeCallback = ffi.ForeignFunction(func, 'void', ['bool']);
             try {
                 saveCallback(data, function (result) {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "geteasy.node.printer",
-  "version": "1.0.7",
+  "version": "1.0.8",
   "description": "",
   "main": "index.js",
   "scripts": {