CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Sef

Page 1 of 24 1 2 3 4

Search: Search took 0.20 seconds.

  1. Replies
    2
    Views
    698

    Re: multi dimensional arrays

    There is no difference. It's all a matter of perspective. Multidimensional arrays are represented as arrays of arrays so something like:

    int array[5][20];

    can be thought of as a single array...
  2. Replies
    10
    Views
    2,168

    Re: passing vector by reference

    On my relatively modest 2.4 MHz machine, I can load a "std::vector" with a 100 "std:string" objects and then copy it a million times in about 7 seconds. For the vast majority of programs with far...
  3. Replies
    5
    Views
    795

    Re: How to Verify / Identify a user is Valid

    Sorry, didn't realize you already cited that article. If you're experiencing the problem on WinXP or Win2003 then it may be a Windows bug.
  4. Replies
    5
    Views
    795

    Re: How to Verify / Identify a user is Valid

    On Win2000 or NT you need the SE_TCB_NAME privilege. See KB article 180548 for another way to do it (no special privileges required):
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;180548
  5. Replies
    1
    Views
    754

    Re: Where the user is Authenticated in Domain

    A domain user is authenticated by the domain controller. The short story is that If I'm logged on under a domain account, and then try to access another machine in the same domain (connecting to a...
  6. Replies
    1
    Views
    659

    Re: Invalid Authentication when using LogonUser

    What do you mean by "invalid" user?
  7. Replies
    42
    Views
    4,350

    Re: Ranking from fast to slow .. interview question

    I hope you're right in this case but unfortunately, it's probably an idealistic and optimistic view of the world (with all due respect). The sad truth is that there's rampant incompetence in this...
  8. Thread: running as SYSTEM

    by Sef
    Replies
    7
    Views
    1,111

    Re: running as SYSTEM

    First of all, I suggest you reconsider Win98 and Win Millenium. MSFT's retired their support for it and even paid support ends at the end of this June. As for the various issues you've raised, I...
  9. Replies
    2
    Views
    752

    Re: Domain Authentication - Please help me

    BTW, the user you're logging on also requires the appropriate logon right on the machine you're logging them onto. That is, if you pass LOGON32_LOGON_SERVICE to "LogonUser()" for instance, then the...
  10. Replies
    2
    Views
    752

    Re: Domain Authentication - Please help me

    Why isn't "LogonUser()" working? The most likely causes is that on Win2000 you need the SE_TCB_NAME privilege to use this and only administrators normally have it. This isn't an issue on WinXP and...
  11. Thread: running as SYSTEM

    by Sef
    Replies
    7
    Views
    1,111

    Re: running as SYSTEM

    Actually, the SYSTEM account has unrestricted access to your entire machine and is also an administrator by definition since it contains the local administrators group in its access token. Moreover,...
  12. Replies
    8
    Views
    1,206

    Re: check if user logged on win2k

    You can find all interactive users on the system by enumerating all processes and looking for SECURITY_INTERACTIVE_RID in each process' access token (among the group SIDs). You can then grab the...
  13. Replies
    7
    Views
    1,069

    Re: simple C++ question

    [QUOTE=Marc G]Exactly.
    As a side note, a common trick to perform rounding by exploiting the truncate feature is:

    int i = int(99/10+0.5);Won't work for this particular example (as is) but I know...
  14. Replies
    7
    Views
    1,069

    Re: simple C++ question

    It results in 9, not 10. Integer division truncates the fractional portion. Rounding of native types never occurs in C++ unless you call a function to implement it. The op should Google for "Usual...
  15. Replies
    4
    Views
    2,097

    Re: database handling using API in VC++

    ODBC is antiquated. Depending on what he's doing, new development should usually rely on ADO which is just a high-level (COM) wrapper around OLE/DB (also COM). He should check out the #import...
  16. Thread: C++ pet-peeves

    by Sef
    Replies
    32
    Views
    4,938

    Re: C++ pet-peeves

    Favorite pet peeve? Most programmers are lousy at what they do, even after many years of experience. Fix that problem and the rest go away (as if you ever could).
  17. Replies
    16
    Views
    3,159

    Re: Problem in Reading Regsitry Value ...

    Or alternavely look in the "Memory" window if you know how to properly read this (if not it's good learn)
  18. Replies
    16
    Views
    3,159

    Re: Problem in Reading Regsitry Value ...

    The API *is* returning the correct string (or should be if you're compiling for Unicode). Run an experiment to confirm it in your own mind. Loop through the string character by character and dump...
  19. Replies
    7
    Views
    1,589

    Re: How to kill a process ?

    Heed the advice of the others - don't shut something down unless you really know it's safe to do so (and understand the ramifications involved). If so then try this:
    ...
  20. Replies
    19
    Views
    2,505

    Re: How does delete know how much to deallocate?

    #include <iostream>

    class CKankerNoob
    {
    public:
    ~CKankerNoob()
    {
    std::cout << "bye bye";
    }
    };
  21. Replies
    11
    Views
    1,472

    Re: Best Way To Declare Pointers

    Actually, while this is all a religious issue anyway, in the language itself the "*" actually binds with the variable name. Dan Saks (former secretary of the ANSI and ISO C++ committee and all-round...
  22. Replies
    6
    Views
    1,287

    Re: What is template ?

    This is referred to as a template specialization which you can read about in your favorite C++ book. Unfortunately, VC 6.0's support for templates is weak and sometimes buggy. Moreover, member...
  23. Thread: Newbe question

    by Sef
    Replies
    10
    Views
    1,084

    Re: Newbe question

    [QUOTE=NoHero]Now I will explain you the following code:



    TCHAR szStr[100] = _T("");
  24. Thread: BSTR*

    by Sef
    Replies
    5
    Views
    860

    From the "Tools" menu select "Options", go to the...

    From the "Tools" menu select "Options", go to the "Debug" property page and check "Display unicode strings".
  25. Replies
    10
    Views
    1,333

    Re: Questions about the Platform SDK

    First, you can't pick up PSDK help from Visual Studio. It's a foolish decision by MS however (or more accurately they don't care since VC6 is a legacy product now). The MSDN and PSDK help are...
Results 1 to 25 of 587
Page 1 of 24 1 2 3 4





Click Here to Expand Forum to Full Width

Featured