Comments (2)
Hi,
Thanks for opening an issue. So
-
regQueryValue
type seems correct to me, at least signature wise, it's return value on msdn (lpValue
) isLPTSTR
. However you're in that the behavior is wrong. -
Yes this is suspicious and I don't know why it was done. These two should be functionally the same if the
subkey
value is combined into theHKEY
. But it doesn't seem to do that. -
No reason it can't be added, no one has ever needed it before, that's the only reason it's not there. I'd be happy to accept a pull request to add it. That would be the quickest, otherwise I'll try to find time to add it soon.
-
I wouldn't mind such helper functions, since we already have some for error handling. I don't however want to restrict it to just these registry functions. so I would prefer something like
getStorableValue :: forall a b. Storable b => String -> (a -> b) -> a -> IO b
where the firstString
is the name of the function to put in the error message who's result couldn't be decoded. This would match the other helpers that exist and wouldn't be so specific.
I don't mind breaking changes, but I would mind a breaking change with the same signature, as this is a silent breaking change. Luckily there's some wiggle room here as the documentation for regQueryValue
indicates it should be able to take a NULL
and empty string
. So I don't mind correcting the behavior of the function if the signature also changes to take a Maybe String
so a compile error is issued to people using these functions who may not have read the changelog or are ignoring version bounds.
Since you are already working in this area, a pull request would be much appreciated!, otherwise I will fix these as soon as I can.
from win32.
Ah. I made more than one mistake in reading the docs, my apologies. The comment I criticised is correct, as RegQueryValue
"Retrieves the data associated with the default or unnamed value of a specified registry key." That also explains my confusion over the return type as it looks like the default/unnamed value of a key is always of type REG_SZ
.
I do intend to make a PR but might take me a while to get my head around various bits!
from win32.
Related Issues (20)
- Win32-2.6.2.1, provided by GHC 8.10.6 and 8.10.7, is not on Hackage HOT 2
- `isMinTTY` no longer detects recent `mintty`s HOT 7
- Change maxLength to 16 in function getComputerName HOT 1
- If `--io-manager=native`, `withHandleToHANDLE` does not work for a 'console' `Handle` HOT 7
- `Setup.hs` seems inconsistent with the `build-type` option of the cabal file. HOT 1
- Support for `schannel.h` and `wincrypt.h` functions HOT 1
- Add constant `INVALID_SET_FILE_POINTER`
- Provide `GetTempFileNameW`
- Expose `FindData` struct HOT 5
- createFile without busy-wait HOT 6
- fails to start soon after starlink terminal power on HOT 1
- Change type synonym used in `loadLibrary{Ex}`'s return type from `HINSTANCE` to `HMODULE`
- Is it possible to use this package to control the Microsoft Excel application? HOT 2
- `System.Win32.MinTTY` doesn't detect newer versions of `mintty` (but perhaps that's OK) HOT 5
- Add setWindowPos and getConsoleWindow HOT 1
- Support filepath >= 1.5.0.0 and os-string HOT 1
- #221 Introduced unused-imports warnings which lead to failures in GHC HOT 7
- Make hackage revision for 2.13.3.0 HOT 3
- Can't retrieve registry value size HOT 2
- Please build and upload documentation to Hackage
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 win32.