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

Search:

Type: Posts; User: Codeplug

Page 1 of 74 1 2 3 4

Search: Search took 0.07 seconds.

  1. Replies
    12
    Views
    403

    Re: WMI Get() fail

    Correct again. I've been relying on RAII objects just "doing the right thing" for too long :)

    gg
  2. Re: Access a username/password protected url through C++

    >> ... and MSVCR120.dll in the Cinema 4D folder
    That should be handled by the appropriate VS runtime redistributable. (eg. http://www.microsoft.com/en-us/download/details.aspx?id=30679)

    You could...
  3. Re: Access a username/password protected url through C++

    Didn't see your last post...

    Well, you wouldn't want to link statically to GPL source (without purchasing a license to do so). And some may even require a license to be used in a commercial...
  4. Re: Access a username/password protected url through C++

    What protocols are used when accessing your server? Is it plain HTTP? Through TCPIP or TLS (SSL)?

    What libraries did you use to achieve this access on MacOS?

    gg
  5. Replies
    12
    Views
    403

    Re: WMI Get() fail

    >> ... documentation on Get says it takes care of that ...
    You are correct. My mistake.

    >> One nice thing about using _com_ptr_t, _variant_t, and _bstr_t ...
    One unfortunate thing is that there...
  6. Replies
    12
    Views
    403

    Re: WMI Get() fail

    >>Sample attached.
    Review:
    A call to VariantInit() is missing (though the variant's initial values are not used in this case).
    The VariantClear() call could be moved up 2 if blocks.
    The call to...
  7. Replies
    12
    Views
    403

    Re: WMI Get() fail

    http://cboard.cprogramming.com/cplusplus-programming/120547-how-do-you-access-information-win32_operatingsystem-class.html#post900756

    gg
  8. Replies
    12
    Views
    403

    Re: WMI Get() fail

    One of your problems is the you are using an uninitialized variant and safearray. You'll want to use ATL's wrappers for these objects - CComVariant etc.

    gg
  9. Replies
    30
    Views
    1,677

    Re: how send the class pointer with SetTimer()?

    >> Think WinAPI if the task is about WinAPI!
    Are you saying that we should just be calling ::SetTimer in order to accomplish the task? Or that we should re-do everything in MFC in order to use its...
  10. Replies
    30
    Views
    1,677

    Re: how send the class pointer with SetTimer()?

    >> Make Simple Tasks Simple!
    I couldn't agree more.

    The "task" in this case - and the reason for my participation in this thread - is to have ::SetTimer() callbacks into a C++ object instance...
  11. Replies
    30
    Views
    1,677

    Re: how send the class pointer with SetTimer()?

    I'll choose a solid C++ interface over a C interface any day. I won't let a few lines of code stop me from creating one either.

    If you have object instances that need their methods called on a...
  12. Replies
    30
    Views
    1,677

    Re: how send the class pointer with SetTimer()?

    #include <Windows.h>
    #include "WinTimerDispatch.h" // post #19
    #include <iostream>

    //------------------------------------------------------------------------------

    class Timer
    {
    protected:...
  13. Replies
    30
    Views
    1,677

    Re: how send the class pointer with SetTimer()?

    This is what I use:


    #ifndef WIN_TIMER_DISPATCH
    #define WIN_TIMER_DISPATCH

    #include <windows.h>
    #include <map>
    ...
  14. Replies
    4
    Views
    692

    Re: ISO-8859-1 or UTF-8 encoded string

    >> ... to make the CP1251 -> UTF8 conversion.
    Oops - I meant 1252. But 28591 would be best :)

    gg
  15. Replies
    4
    Views
    692

    Re: ISO-8859-1 or UTF-8 encoded string

    If you only have to determine one or the other, then while checking for UTF-8 validity you could check for bytes [00-1F] and [7f-9F] - if you find any then you know it isn't 8859-1. But you might as...
  16. Replies
    2
    Views
    642

    Re: Help With Batch Code

    If you want to compare strings, you need to make the left-hand-side a string as well. And don't use /a when not performing a arithmetic assignment. You should also remove the spaces around "=" in...
  17. Re: Regarding the null destination pointer exception

    I would try re-defining it to do nothing: #define _DEBUG_POINTER(x)

    gg
  18. Re: Regarding the null destination pointer exception

    You could use #pragma push_macro to temporarily re-define _DEBUG_POINTER.

    gg
  19. Re: VS2013 Compiling with header redirection IDE complains. "Open SSL"

    Yes, it will work.
    The OpenSSL DLL's will use the VS2008 CRT internally. So your app installer will need to provide both the 2008 and 2013 redistributables. So you'll need the 2008 redistributable...
  20. Re: VS2013 Compiling with header redirection IDE complains. "Open SSL"

    If you don't want to compile OpenSSL yourself (which is needed to create the "sdk" tree structure), then you can try compiling against a pre-built version of OpenSSL:...
  21. Re: Problem with RegisterPowerSettingNotification and USER32.dll.

    Looks like a fix is in the works: https://codereview.chromium.org/477173002/

    gg
  22. Re: Can you think of anything wrong with this code.

    >> template <typename U>
    >> node(const node<U>& other)
    >> :object_memory_(operator new(sizeof(T)))
    Should that be sizeof(U)?

    gg
  23. Re: Can you think of anything wrong with this code.

    Even though you are using the MS implementation of volatile, there are still plenty of data races that may be present depending your you how your threads access the object.

    The conclusion that I...
  24. Re: Can you think of anything wrong with this code.

    You should read this: http://www.gotw.ca/gotw/028.htm

    And what is up with those volatile qualifiers? I hope it has nothing to do with threading....

    I would also recommend this to avoid dynamic...
  25. Replies
    9
    Views
    407

    Re: Worker Thread handle leak

    >> However, it's still "proper" to explicitely close the handle when you no longer have a need for it.
    This is what MFC does by default. You have to take extra steps if you want the thread handle to...
Results 1 to 25 of 1827
Page 1 of 74 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center