Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Wereotter

  1. Wereotter

    Template-Controled Constructor Use without PTS

    I think I've encountered a problem beyond my template metaprogramming skills... :) Here's the deal: I need to choose a constructor (preferrablly at compile time) based upon an argument to my template. class Example1 { Example1(int a); }; class Example2 { Example2(int a, bool b); }; typedef...
  2. Wereotter

    Missing API definition?

    #define SHGVSPB_PERUSER 0x00000001 // must have one of PERUSER or ALLUSERS #define SHGVSPB_ALLUSERS 0x00000002 #define SHGVSPB_PERFOLDER 0x00000004 // must have one of PERFOLDER ALLFOLDERS or INHERIT #define SHGVSPB_ALLFOLDERS 0x00000008 #define SHGVSPB_INHERIT 0x00000010 #define...
  3. Wereotter

    Missing API definition?

    That does not tell me the numeric value of, for example, SHGVSPB_PERUSER, which I need in order to make use of the function. Or were you just reposting the link to the framed version instead?
  4. Wereotter

    Missing API definition?

    I am using Visual C++ 6.0. I would like to use this function: SHGetViewStatePropertyBag Unfortunately, my header files do not define this function. Does anyone know where I can find the constants for the dwFlags parameter?
  5. Wereotter

    Bound Member Functions

    template<class Type> void* MemberAddress(Type pFunction) { void* pFuncAddress; __asm mov eax, pFunction __asm mov pFuncAddress, eax return pFuncAddress; } void* pAddress = MemberAddress(&Example::foo_member); You may then call this as with any other function, simply passing a pointer to...
  6. Wereotter

    Bound Member Functions

    class Example { public: void __stdcall foo_member(int x) {} }; void __stdcall foo_global(int x) {} int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { Example e; e.foo_member(1); foo_global(1); return 0; } Becomes 14: int APIENTRY...
  7. Wereotter

    Bound Member Functions

    OK, yes. However, when all is said and done, the calling convention is actually (in this case) __cdecl with the addition of a 32-bit pointer to the beginning of the argument list. While this may not hold true on every platform, I'd bet that it holds true on most, and it certainly will hold true...
  8. Wereotter

    Bound Member Functions

    That is definitely an option, but one I was hoping to avoid. Before you posted, I'd already implemented this, and it works fine, but I'd still like to know why exactly I can't get the address of a member function, even a non-virtual one.
  9. Wereotter

    Bound Member Functions

    I am using a C-based library (sqlite) from my C++ program. This library includes a function which takes a pointer to a callback. I'd like to use a member function as the callback. sqlite3_exec(sldbDatabase, "", &(this->AddFarmFromRow), this, &sError); The first parameter passed to the callback...
  10. Wereotter

    Enumerating users (Local and domain) on multiple OS's

    Thanks, I'll look into it. I'm leaning more and more towards only supporting the current and default users, though... Anything more seems like a lot of work. :-(
  11. Wereotter

    Enumerating users (Local and domain) on multiple OS's

    I'm trying to figure out how to enumerate users on several versions of Windows--2000 and XP at the minimum. I've looked at NetEnumUsers, but this appears to only be for XP. I need to retrieve the user name and the registry key representing HKEY_CURRENT_USER. Any help would be appreciated... :)
  12. Wereotter

    Someone who WANTS spyware. :)

    Don't worry, I am fully prepared for any consequences: I have all my data backed up to CD, and disk images of my OS and programs--and I don't mind a reinstall if absolutely necessary. Now, I'll see if I can find some good warez sites and then check for the spyware I want... :)
  13. Wereotter

    20 min. to be hacked.

    relmanz2000, think you could help me here? http://www.tek-tips.com/viewthread.cfm?qid=929785 :)
  14. Wereotter

    20 min. to be hacked.

    XP SP2 has the ICF, which is enabled by default. You can double-check that it is enabled using this process: http://www.microsoft.com/windowsxp/using/networking/learnmore/icf.mspx This is sufficient to protect you against Blaster, Sasser, and similar worms, but I recommend getting a firewall...
  15. Wereotter

    20 min. to be hacked.

    This is also one excellent use for the ICF... It has worked fine on my installations of XP Pro and Home. Usually I disable it later and find something that watches outbound as well, though.

Part and Inventory Search

Back
Top