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

Additional error information in the event of a COM error. #7

Merged
merged 2 commits into from
Dec 1, 2013
Merged

Additional error information in the event of a COM error. #7

merged 2 commits into from
Dec 1, 2013

Conversation

Antony74
Copy link
Contributor

Example:

var win32ole = require('win32ole');
var db = win32ole.client.Dispatch('ADODB.Connection');
db.Provider = "Microsoft.Jet.OLEDB.4.0";
db.Open("nofile.mdb");

Output:

OLE error: [Open] -2147352567 [Open] = [10]
Microsoft JET Database Engine: Could not find file 'D:\git\nodejsplay\nofile.mdb'.
(It always seems to be appeared at that time you mistake calling'obj.get { ocv->getProp() }' <-> 'obj.call{ocv->invoke() }'.) IDispatch::Invoke AutoWrap() failed

TypeError: node_win32ole::V8Variant::OLEInvoke failed
at Object. (D:\git\nodejsplay\test.js:4:4)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3

This suggested patch may also help to address issue #5

idobatter added a commit that referenced this pull request Dec 1, 2013
Additional error information in the event of a COM error.
@idobatter idobatter merged commit bd68394 into idobatter:dev0.1.3 Dec 1, 2013
@idobatter
Copy link
Owner

Hi, Antony74.
Thank you for your code. I merged it.
And you may use 'wcs2mbs' or/and 'WCS2MBCS' in ole32core.cpp for your language locale of console and variable length string. (sample is 'Method_printACP' in node_win32ole.cc)

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

Successfully merging this pull request may close these issues.

2 participants