That did it! You really saved my day, Richard. My MSDN docs don't include that extra flag (VS 2005 still...), so I didn't know about it.
Daniel Tak M
Posts
-
Can't read certain registry keys -
Can't read certain registry keys64 bit; the program is 32 bit, though.
-
Can't read certain registry keysHere it is (pretty straightforward):
HKEY hKey; if (RegCreateKeyEx(HKEY\_LOCAL\_MACHINE, "SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\Winlogon", 0, NULL, REG\_OPTION\_NON\_VOLATILE, KEY\_READ, NULL, &hKey, NULL) == ERROR\_SUCCESS) { BYTE lpBuffer\[1024\]; DWORD dwType; DWORD dwBufferSize = 1024; if (RegQueryValueEx(hKey, "DefaultUserName", 0, &dwType, lpBuffer, &dwBufferSize) == ERROR\_SUCCESS) { ... } }
The query succeeds, but the buffer is simply empty (though the setting isn't); if I change Winlogon to "Ports" and the key name to "COM1:", I get the correct value.
-
Can't read certain registry keysThe code works with other keys which are _not_ in Winlogon. Like HKLM\Software\Microsoft\Windows NT\CurrentVersion\Ports (read COM1:, retrieved the correct string).
-
Can't read certain registry keysHi everyone, I am currently trying to read the following registry key in one of my programs:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName
I need to find out whether automatic logon is enabled on a machine or not, and reading whether above setting is empty or not seems to be the best way to do this. However, querying the value simple returns an empty string (though it definitely isn't empty); the code is working, as it works fine with other keys. So I guess that my program, for whatever reason, cannot access the Winlogon keys (other keys also don't work). Is there any workaround for this? Or any other way to find out if autologon is enabled? Hope anyone can shed some light on this, as it is driving me nuts right now :mad: I couldn't really find a better forum for this question; at least the program is written in C++, so... ;)
-
Go Macros... go, go... goneChecked all of those things, and I also repaired the installation of VS and reinstalled SP1 + Vista Fix; didn't change anything. Nor did anything change on my system - except the installation of the latest hotfixes for Windows. So I guess one of those was just a bit too hot...
-
Go Macros... go, go... goneJust for you, I added a more explicit question (which I thought was implicitly included).
-
Go Macros... go, go... goneSince the last Windows updates (as of 2014-02-14), my macros in Visual Studio 2005 (yeah, I know...) ceased to work; they just won't do anything anymore. Repairing VS2005, reinstalling service packs etc. didn't help... good job MS, now I have to type so much more by hand. D'oh! :mad: Does anybody have experienced something similar? Though I suppose that the number of VS 2005 users is rather... limited. I have no clue which update might have caused this, but maybe someone else has a few more ideas than I have.
-
Best music news of the year(s)...Yeah, same here :(
-
With regards to using a gym...You'd do Darwin a favor...
-
Body mass indexes (indices???): What a load of.... well, you know!The main problem with the BMI is that it does not differentiate between the TYPE of mass... fat, muscles, water... it's all the same - which is, of course, not true at all.
-
Worst source code EVERI think the code written by one of my former colleagues was the worst I ever had to work with (nah, only seeing wasn't enough)... First of all, it was written in Delphi, which means: case-INsensitive - and my colleague definitely used that feature; next, he did not care about formatting anything; sometimes, you had 500 lines without any single empty line (to make the code more readable), but in the next file, you had 10 consecutive empty lines; his naming was OK, but working with the code was still hard, because you never knew what to pass to most functions (for example, passing a "-1" as an ID created a new record in one case, in another function you had to pass a 0 for the same purpose... he never thought about using constants or that alike in such cases); and no, of course there were no comments (which I don't see as problematic - as long as the code is well-written and speaks for itself). When he left our company, I had to take over his project, which was pretty much impossible... the project was soon cancelled.
-
Wow, that's amazing! [modified]That is at least as old as IRC.
-
That's a lotta Pr0nWell, worth a try I'd say
-
Empty messages from MFCMy main problem is not to find out where it occurs, the main problem is why all warnings and errors from MFC are empty... It doesn't happen only this one time, it happens for every DDV call as well, for example, and I'd really prefer some more meaningful message boxes (crazy, I know). Is there, for example, a resource DLL that has to be shipped with my program so that MFC can load its error messages properly? Something like that...
-
Empty messages from MFCNo and no; the VS version is 2005. If I knew where exactly this errors pops ups, I'd be much further... I am also not sure if it is a DDV call, since I barely use them.
-
Empty messages from MFCWhile I usually try to avoid any message boxes that do not stem from my own code, I now am facing a box that comes from MFC, but the weird thing is that it is empty... which is not that helpful. I stumbled upon this a few times during testing, but never cared since I removed the various DDV_XXX functions later that caused those boxes. This only happens in Release build, which uses statically linked MFC, so I suppose it has something to do with that... Is there any way to get some more meaningful message boxes with statically linked MFC?
-
In paradise...Well, derive from my paradise and change that to your needs ;)
-
In paradise...Just got a bit dreamy, so here is my personal paradise (well, part of it); feel free to extend it: In paradise... - There is a button that punishes stupid users - Debuggers find ALL of your bugs (though there actually aren't any bugs anyway) - Pigs do fly and hell does freeze (will get some people into heavy trouble) - If you see a hot girl on the net, you can press the "magic button" and the girl will appear right away to serve your desires - Customers will never ask for support - No matter what you eat, your weight will always stay the same - No matter how much alcohol you drink, you will always stay sober (unless you want to get drunk) - Your bandwidth is unlimited - There is no DRM ... I guess I could continue this list for a few more hours. But nah, I won't do that.
-
Dear DenizensIt really depends on where you live and what your native language is. I personally think that a beginning like "Daniel,..." is rather unfriendly and arrogant. You'd never do that in German. A "Dear Daniel,..." is totally fine and not intimate at all - at least not for us Germans. I always use lines like "Hello XXX,...", which seems adequate enough. In German business, you usually either use the more formal "Sehr geehte/r Herr/Frau XXX" or, if the mail isn't too formal, "Hallo Herr/Frau XXX". And if it is a new mail, a greeting is necessary. Just a block of text without at least a "Hello" seems very unfriendly. Constantly repeating it in the following mails, though, indeed seems like "unnecessary fluff".