Comments (10)
Hi, found this example:
// Create COM object from JS
var obj = new winax.Object({
test: function(v) { return v*2; }
});
// Convert COM IDispatch pointer to Variant array
var varr = new winax.Variant(obj, 'uint8[]');
// Convert Variant array to JS array address bytes
var arr = new Uint8Array(varr.valueOf());
console.log(arr);
// Create new COM object from IDispatch pointer (address bytes)
var obj2 = new winax.Object(arr);
// Call test method
console.log(obj2.test(2));
from node-activex.
Ok, fund code in disp.cpp line 547:
// Use supplied dispatch pointer
else if (args[0]->IsUint8Array()) {
size_t len = node::Buffer::Length(args[0]);
void *data = node::Buffer::Data(args[0]);
IDispatch *p = (len == sizeof(INT_PTR)) ? (IDispatch *) *(static_cast<INT_PTR*>(data)) : nullptr;
if (!p) {
isolate->ThrowException(InvalidArgumentsError(isolate));
return;
}
disp.Attach(p);
hrcode = S_OK;
}
Issue now is "HOW TO" to pass the pointer from JavaScript ???
from node-activex.
@durs Hi. Thanks for merging the PR. Do you plan to release on npmjs.com?
from node-activex.
Ok, I'll make a release, while I don't plan to change anything else
from node-activex.
Hi, again. When I built winax with npm i against node 14.18.3 in january 2022, I got a node_activex.node of approx 185 kB. Today when I npm i winax against node 14.20.0 I get a node_activex.node of 560 kB! What am I missing here?
from node-activex.
I don't know, last release in my environment 240 Kb with Node 18.13 and Visual Studio 2022 (v143)
from node-activex.
What is your build method?
from node-activex.
npm install
then tried rebuild binding.sln but got the same result
from node-activex.
Same here! npm install ==> node_activex.node is 544 KB
rebuild binding.sln ==> node_activex.node is 544 KB....
node --version ==> v14.20.0
Visual Studio 2022 (v143)
I AM LOST!
from node-activex.
LOL with nodejs v18.15.0 32 bits I am now at 194 KB!
Something very weird is happening with the LIBs used while linking against nodejs v14.20....
from node-activex.
Related Issues (20)
- v8::HandleScope::CreateHandle() Cannot create a handle without a HandleScope
- https://Android-sdk-is
- Question about "Function Setter" limitation HOT 1
- Type Mismatch Error HOT 1
- Q: How to obtain a running instance of Excel (Marshal.GetActiveObject?) HOT 4
- im getting a error !!
- update docx toc failed in word but succeeded in wps HOT 5
- Can't use node-activex for [email protected] HOT 3
- installation fail
- Cannot find module './build/Release/node_avtivex.node' HOT 1
- function cannot be called. HOT 3
- LICENSE file is not found HOT 3
- DispInvoke: XXX Error HOT 1
- When the electron is running,a program crash was encountered. Look at the stack information, which looks like node-activex HOT 2
- Can't build for Electron 28.2 HOT 2
- cannot set properties for objects
- Winax is unable to call a method in the com component HOT 2
- How to rebuild for node 22.0.0? HOT 2
- RollupError: Unexpected character '�'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-activex.