Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant run win32ole with node-webkit #4

Open
danielabelski opened this issue Mar 21, 2013 · 7 comments
Open

Cant run win32ole with node-webkit #4

danielabelski opened this issue Mar 21, 2013 · 7 comments
Labels

Comments

@danielabelski
Copy link

Hi! Tried to use the module in node-webkit and could not. After calling the module [ var win32ole = require('win32ole'); ] node-webkit crashes. With pure node it works ok. But we never had issues with other modules working with node-webkit. Any clue why this might be happening?

@RyanSylvestre
Copy link

Have you tried building the app with nw-gyp? Since node-win32ole is a native app it appears there is a separate process for building it for node-webkit.

https://github.com/rogerwang/node-webkit/wiki/Build-native-modules-with-nw-gyp

I am also interested in using node-webkit in a project. If you do get this to work with nw-gyp please report back. Thanks!

@danielabelski
Copy link
Author

Chose the way of using win32ole with pure nodejs and not node-webkit, but it leaks memory a lot and I cant fix this as C++ is not my thing))) They #5 have the same problems, so I am waiting for the author to answer, or a solution to come.

@felixlemaignen
Copy link

Hi,
I have builded the app with nw-gyp and I got the same result : node-webkit crashes when it call "require('win32ole');"
Do you plan to do make it compatible with nw ?
Thanks
Félix

@downtownallday
Copy link

FWIW, win32ole also works for me under node.js (v0.10.20) but won't compile for node-webkit (v0.7.5) because of errors when running nw-gyp (v0.10.9) rebuild. I'm using python 2.7.5 and Visual Studio Express 2012. Perhaps an issue for node-webkit and not this project, though.

From "nw-gyp rebuild --target=0.7.5" ::

..\src\client.cc(63): error C2664: 'void v8::Persistent::MakeWeakole32core::OLE32core(P *,void (__cdecl *)(v8::Isolate *,v8::Persistent *,P *))' : cannot convert parameter 2 from 'void (__cdecl *)(v8::Persistent,void *)' to 'void (__cdecl *)(v8::Isolate *,v8::Persistent *,P *)' [C:\v\savant\tools\node\win\node_modules\win32ole\build\node_win32ole.vcxproj]
with
[
T=v8::Object,
P=ole32core::OLE32core
]
and
[
T=v8::Value
]
and
[
T=v8::Object,
P=ole32core::OLE32core
]
None of the functions with this name in scope match the target type

..\src\v8variant.cc(363): error C2664: 'void v8::Persistent::MakeWeakole32core::OCVariant(P *,void (__cdecl *)(v8::Isolate *,v8::Persistent *,P *))' : cannot convert parameter 2 from 'void (__cdecl *)(v8::Persistent,void *)' to 'void (__cdecl *)(v8::Isolate *,v8::Persistent *,P *)' [C:\v\savant\tools\node\win\node_modules\win32ole\build\node_win32ole.vcxproj]
with
[
T=v8::Object,
P=ole32core::OCVariant
]
and
[
T=v8::Value
]
and
[
T=v8::Object,
P=ole32core::OCVariant
]
None of the functions with this name in scope match the target type

@petershaw
Copy link

I have an error with node-webkit when i use win32ole:
%1 is not a valid Win32 application

What can i do?

@caofb
Copy link

caofb commented Jun 4, 2014

+1

@seletz
Copy link

seletz commented Jun 4, 2014

I've been trying to get this working for some time -- I'd actually pay for the ability to use this within node-webkit. Or any other module which lets me talk to windows from JS via COM. I have looked at the way python does this with the win32 module, looked at how this can be implemented in C etc.

It turns out that this is not a trivial task. The windows program (PTC Creo 3D cad system, has a VB interface) I want to talk to uses custom "objects" which get serialized etc. One would need to parse the relevant object descriptors in JS -- the python win32 module does this.

Also the C++ code is quite confusing IMHO, so ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants