npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-dcom

v1.0.9

Published

Simple lib to support DCOM communication (Heavly based on J-Interop)

Downloads

1,892

Readme

node-dcom

node-com is a partial DCOM-compatible lib for Node.js environment. Most of the implementation do not follow the official specification so not all the protocol features are supported. This was implemented as a part of our OPC-DA node for Node-RED so features were implemented as they were needed for what we wanted to achieve with that node. Most of the code base is a NodeJS implementation of the J-Interop Java library.

This node was created by Smart-Tech as part of the ST-One project.

Table of Contents

Install

Using npm:

npm install node-dcom

Creating a Session

To create a session you will need the following information from the server: user name, password, and domain. In the example we call createSession :

let session = new Session();
session = session.createSession(domain, username, password);

By default the global timeout is set to 0 so you should also set the correct connection timeout according to how you network behaves. If no values are defined for the timeout or if the value is too low for the average response time of your connection you'll be able to create a session but the next step (creating a server) will have frequent timeouts.

session.setGlobalSocketTimeout(timeout);

Creating a Server

Now that you've already created a session you can create a server reference. To create this you'll need the ClassID of the server you want to connect and it's IP address. With those at hand you create a clsid object and pass it as one of the parameters for the server:

let Clsid = new Clsid(ClassID);
let comServer = new ComServer(Clsid, address, session);
comServer.init();

With that the server will create an endpoint that will be attached to the given address, authenticate, and will issue an activation request. To be able to query object on this server you'll have to create create a COM Object reference for the server:

let server = comServer.getInstance();

Creating a COM Object

WIth both the session and server instance created you can finally create a COM Object. For this we'll use the queryInterface function giving the ClassID (here you can give the string) of the desired object as an argument.

server.queryInterface(ClassID);

Destroying a Session

To release all the objects created in a given session call the function destroySession().

session.destroySession(session);

Contributing

This is a partial implementation and there are lots that could be done to improve what is already supported or to add support for more DCOM features. Feel free to dive in! Open an issue or submit PRs.

License

Copyright 2017 Smart-Tech, Apache 2.0 license.