nodpc / jn-npp-plugin

Automatically exported from code.google.com/p/jn-npp-plugin
0 stars 0 forks source link

seems failure to call .net assembly dll #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
register .net activeX:

regasm.exe activexposhv3.dll /tlb /verbose

2.
invoke jScript via command line as:
cscript ActiveXposhV3.js

content of ActiveXposhV3.js:
    var ActiveXPosh = new ActiveXObject("SAPIEN.ActiveXPoSHV3");
    ActiveXPosh.Init(false);
        ActiveXPosh.Execute("Get-Process");

result:
successful with list of process

3.
call it by jn-npp-plugin:
try {
    var ActiveXPosh = new ActiveXObject("SAPIEN.ActiveXPoSHV3");
    ActiveXPosh.Init(false);
    var ddd = ActiveXPosh.Execute("Get-Process");
    alert(ddd);
} catch (e) {
    alert(e);
}
result:
Error: Automation server can't create object 

What is the expected output? What do you see instead?

it should have outputted the list of process, but instead displayed as "Error: 
Automation server can't create object "

What version of the product are you using? On what operating system?
notepad++ 6.6.9
jn-npp-plugin Version 2.0.146
on windows 8 64bit

Please provide any additional information below.

Original issue reported on code.google.com by michael....@gmail.com on 2 Jan 2015 at 7:31

GoogleCodeExporter commented 9 years ago
As I see you use windows 64bit. 

Is your Assembly compiled as x86 or x64? Notepad++ is x86 Application. As I 
know it is not possible to call 64bit ActiveX from x86 one.

Please compile your Assembly for x86 platform and try it again!   

Original comment by eugen.kr...@gmail.com on 2 Jan 2015 at 6:29

GoogleCodeExporter commented 9 years ago
Hi, I don't have the source. I just downloaded it from http://www.sapien.com/. 
I have used the x86 version of dll but it didn't even run with cscript of MS, 
maybe I just leave it at that. Thanks for this great plugin anyway!

Original comment by michael....@gmail.com on 6 Jan 2015 at 7:08

GoogleCodeExporter commented 9 years ago
OK. I will close this issue.

Original comment by eugen.kr...@gmail.com on 6 Jan 2015 at 11:15