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

type error when call Key.setValue() #37

Open
askdaddy opened this issue Nov 8, 2016 · 2 comments
Open

type error when call Key.setValue() #37

askdaddy opened this issue Nov 8, 2016 · 2 comments

Comments

@askdaddy
Copy link

askdaddy commented Nov 8, 2016

   var ky = new Key(windef.HKEY.HKEY_CURRENT_USER, 'Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings', windef.KEY_ACCESS.KEY_WRITE);

        ky.setValue('ProxyEnable',windef.REG_VALUE_TYPE.REG_DWORD,1 );
        ky.close();

And I got a TypeError:

TypeError: Cannot read property 'deref' of undefined
    at Object.setValueForKeyObject (C:\Users\askda\git\proxy_mgr\node_modules\windows-registry\lib\registry.js:113:100)
    at Key.setValue (C:\Users\askda\git\proxy_mgr\node_modules\windows-registry\lib\key.js:44:24)
    at Object.setProxy (C:\Users\askda\git\proxy_mgr\index.js:10:12)
    at Object.<anonymous> (C:\Users\askda\git\proxy_mgr\test\test.js:14:5)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
@askdaddy
Copy link
Author

askdaddy commented Nov 8, 2016

PS.

C:\Users\askda\git\proxy_mgr\node_modules\windows-registry\lib\registry.js:113
result = advApi.RegSetValueExA(key.handle.deref(), valueName, null, valueType, byte.deref(), buffer.length);

byte.deref() byte was undefined

@da411d
Copy link

da411d commented Feb 20, 2018

image
Mmmmm.... I copied this line in \node_modules\windows-registry\lib\registry.js

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

No branches or pull requests

2 participants