I work with an API that has a COM based interface. I used the win32ole module to instantiate the API, but one of the API functions requires a null value, and win32ole complains when the null argument is passed. I found this workaround , but it just replaces the null value with the object. This allows me to pass null as an argument to a function call without a win32ole complaint, but the function still fails because it requires a null value, which is now replaced by the object in a workaround.
How to pass an empty argument to this API function?
api.Order_Import('import.xml', 'import.xsd', 0, false, '', '', null)
The first thing I tried was to leave the last argument. This makes win32ole happy, but still causes the function to fail with an error message. The parameter "loOptParam" must be null.
Is there any other module that I can use besides win32ole to work with COM objects in node? My research has not changed anything.
source share