Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

Daniel Tak M

@Daniel Tak M
About
Posts
62
Topics
19
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Can't read certain registry keys
    D Daniel Tak M

    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.

    http://www.renderpal.com http://www.shoran.de

    C / C++ / MFC question c++ com windows-admin

  • Can't read certain registry keys
    D Daniel Tak M

    64 bit; the program is 32 bit, though.

    http://www.renderpal.com http://www.shoran.de

    C / C++ / MFC question c++ com windows-admin

  • Can't read certain registry keys
    D Daniel Tak M

    Here 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.

    http://www.renderpal.com http://www.shoran.de

    C / C++ / MFC question c++ com windows-admin

  • Can't read certain registry keys
    D Daniel Tak M

    The code works with other keys which are _not_ in Winlogon. Like HKLM\Software\Microsoft\Windows NT\CurrentVersion\Ports (read COM1:, retrieved the correct string).

    http://www.renderpal.com http://www.shoran.de

    C / C++ / MFC question c++ com windows-admin

  • Can't read certain registry keys
    D Daniel Tak M

    Hi 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... ;)

    http://www.renderpal.com http://www.shoran.de

    C / C++ / MFC question c++ com windows-admin

  • Go Macros... go, go... gone
    D Daniel Tak M

    Checked 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...

    http://www.renderpal.com http://www.shoran.de

    Visual Studio visual-studio csharp com help question

  • Go Macros... go, go... gone
    D Daniel Tak M

    Just for you, I added a more explicit question (which I thought was implicitly included).

    http://www.renderpal.com http://www.shoran.de

    Visual Studio visual-studio csharp com help question

  • Go Macros... go, go... gone
    D Daniel Tak M

    Since 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.

    http://www.renderpal.com http://www.shoran.de

    Visual Studio visual-studio csharp com help question

  • Best music news of the year(s)...
    D Daniel Tak M

    Yeah, same here :(

    http://www.renderpal.com http://www.shoran.de

    The Lounge com announcement

  • With regards to using a gym...
    D Daniel Tak M

    You'd do Darwin a favor...

    http://www.renderpal.com http://www.shoran.de

    The Lounge xml

  • Body mass indexes (indices???): What a load of.... well, you know!
    D Daniel Tak M

    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.

    http://www.renderpal.com http://www.shoran.de

    The Lounge question career

  • Worst source code EVER
    D Daniel Tak M

    I 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.

    http://www.renderpal.com http://www.shoran.de

    The Lounge question career

  • Wow, that's amazing! [modified]
    D Daniel Tak M

    That is at least as old as IRC.

    http://www.renderpal.com http://www.shoran.de

    The Soapbox

  • That's a lotta Pr0n
    D Daniel Tak M

    Well, worth a try I'd say

    http://www.renderpal.com http://www.shoran.de

    The Lounge com question

  • Empty messages from MFC
    D Daniel Tak M

    My 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...

    http://www.renderpal.com http://www.shoran.de

    C / C++ / MFC c++ com testing beta-testing question

  • Empty messages from MFC
    D Daniel Tak M

    No 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.

    http://www.renderpal.com http://www.shoran.de

    C / C++ / MFC c++ com testing beta-testing question

  • Empty messages from MFC
    D Daniel Tak M

    While 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?

    http://www.renderpal.com http://www.shoran.de

    C / C++ / MFC c++ com testing beta-testing question

  • In paradise...
    D Daniel Tak M

    Well, derive from my paradise and change that to your needs ;)

    The Lounge

  • In paradise...
    D Daniel Tak M

    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.

    The Lounge

  • Dear Denizens
    D Daniel Tak M

    It 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".

    The Lounge c++ com question announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups