17

Relevant to this question: NtOpenKey fails with 0xC0000034 - how to fix this?

It's basically a perfectly good debugging question: it includes the code, it isn't too long, and the problem statement is clear. (I've already posted the answer.) The bug wasn't IMO either so obscure or so simple as to make the question useless to future viewers. The OP's attitude in the comments could be better, but that's not really a reason to close the question.

However, the API call the OP is having trouble with (part of the Windows native API) is unsupported in this context. This has drawn several objections in the comments and is probably the source of the close votes. There is a supported API which would normally be more appropriate, but it has a specific limitation (the inability to handle names with embedded nulls) and AFAIK using the native API is the only way to bypass this.

I asked a question on the old meta last year about unsupported operating systems and the consensus was that questions relating to unsupported operating systems are on-topic. By my reasoning, this should make questions related to unsupported APIs on-topic too, at least under circumstances where the equivalent supported API won't solve the problem at hand.

Thoughts?

6
  • 51
    It doesn't matter wether or not an API is supported; it is a programming question within the scope of the site, short and simple. Commented Sep 13, 2014 at 23:04
  • 5
    The OP had no clue whatsoever that he should not be doing this. Now he knows, pretty doubtful he'll actually use your answer. So was your post actually helpful? Codeproject.com can be a very dangerous site, it isn't anything like SO and there is no meaningful review. Hopefully those comments won't be deleted, it got out of hand pretty badly. Commented Sep 14, 2014 at 9:47
  • @HansPassant: I respect your opinion, but I disagree; I think the OP understood that this was unsupported territory, and at rate he didn't seem at all discouraged when this was pointed out. AFAIK there isn't any supported way to examine or delete keys with embedded nulls in the name, so unsupported is the only option. Commented Sep 14, 2014 at 20:35
  • 1
    What I will do is edit my answer to point this out explicitly, in case the remaining comments on the question do get deleted. (Though I can see that at least one moderator has already been in there, around half a dozen comments deleted and the rest left.) Also, I won't take it amiss if you want to comment on my answer. Commented Sep 14, 2014 at 20:40
  • @HarryJohnston I think there is a supported way: write a driver, and talk to the driver. Commented Sep 16, 2014 at 3:46
  • @Yakk: good point, although that's a lot more work. (Also, the problem described in this particular question applies equally well either way.) Commented Sep 16, 2014 at 3:50

3 Answers 3

57

I don't understand why a vendor's statements of support or non-support are relevant. If someone asks a coherent, answerable question, what's the problem? In this particular area, there is no shortage of people to answer it. It's not like this is stuff that only four people can answer and only then if they violate a nondisclosure. The Nt functions, in any case, are 'supported' for kernel & driver development, which is why they come with headers and such in the DDK package.

2
  • 10
    "If someone asks a coherent, answerable question, what's the problem?" The problem is that some day, such a question could be linked on Raymond Chen's blog when he talks about some backwards compatibility thing they had to do because of people using unsupported APIs.
    – user247702
    Commented Sep 16, 2014 at 7:12
  • 9
    @Stijn: Definitely worth it then. ;-)
    – jnm2
    Commented Sep 16, 2014 at 12:30
2

The only even remotely plausible argument against it is that undocumented functions and such are subject to change without notice, thus potentially rendering answers to such questions invalid at some point in the future.

However, that argument is specious because it could also easily be said of documented functions and whatnot, therefore making them contextually equal here.

2

An answer which recommends use of internal/undocumented APIs without warning about that and the fact that they might disappear in future versions of the platform is not particularly useful.

An answer which clearly states that it uses APIs available on a particular version and patchlevel, and might stop working in future versions, is perfectly fine.

Votes should be used to penalize answers missing critical information (and therefore useless).

You should NOT penalize a question just because the only answer (that you know of) involves internal non-public APIs. There might be a way using documented APIs that you do not know about / has not been posted yet. And it is not fair to expect the asker to limit himself to problems which can be solved using public APIs, since if he knew what API to use he likely would not have to ask the question in the first place.

Now, in this case the question is specific to a particular API, but it's not even a nonpublic API at all. In a hypothetical question asking about a nonpublic API, the onus is on the question to disclose what exact version and patchlevel of the platform they are discussing, just as with any undocumented implementation detail of a public API, and failing to do so could make the question unclear and not useful to future readers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .