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 75 1 2 3 4

Search: Search took 0.07 seconds.

  1. Thread: idle process

    by Codeplug
    Replies
    6
    Views
    326

    Re: idle process

    https://msdn.microsoft.com/en-us/library/windows/desktop/ms685100(v=vs.85).aspx

    https://msdn.microsoft.com/en-us/library/windows/desktop/ms686277(v=vs.85).aspx

    gg
  2. Re: Link Time Symbol undefined Error when exporting a DLL method wrapped in a namespa

    Did you link with the lib?

    gg
  3. Re: Multiple WinAPI threads accessing a shared variable

    >> The Microsoft interlockedxxx set of APIs specify that the variable to be modified be of type volatile.
    That's a good one that pops up from time to time :)

    strlen() takes a "const char *". But...
  4. Re: Multiple WinAPI threads accessing a shared variable

    It's bad information like this that keeps this silly misconception alive even today. The real reality is post #28. The stupid semantics that the microsoft compiler put on volatile has absolutely...
  5. Re: Multiple WinAPI threads accessing a shared variable

    volatile is never necessary for multi-threading. Never was - never will be. Not in Posix standard, not in C/C++ standards, not in Windows (using any windows compiler).

    gg
  6. Re: Multiple WinAPI threads accessing a shared variable

    >> Do you mean that the C++ compiler actually looks for EnterCriticalSection() and LeaveCriticalSection() and does not optimize the code between them?
    Not exactly. What ever synchronization...
  7. Re: Multiple WinAPI threads accessing a shared variable

    >> but what about the problem of each thread caching the shared variable, and accessing the cached copy from now on?
    If you use the synchronization primitives provided by your threading library then...
  8. Re: Multiple WinAPI threads accessing a shared variable

    If you are not accessing memory mapped hardware then just forget about volatile in C/C++, you don't need it.

    gg
  9. Re: Challange for you becomes a challenge for others! Help creating a code snippet:

    Being lazy, here are some thoughts:
    Combine the two to demonstrate that global vars are zero-init'd (causing null deref?) while locals are not.
    Hide the null deref in a local function call passing...
  10. Replies
    6
    Views
    464

    Re: Compiling on an x86 CPU

    Totally different. Normal 64bit is what that site calls "AMD64".

    https://en.wikipedia.org/wiki/Itanium

    gg
  11. Replies
    6
    Views
    464

    Re: Compiling on an x86 CPU

    https://sourceforge.net/p/predef/wiki/Architectures/

    gg
  12. Re: InterlockedExchangeRelease doesn't exist?

    >> those are supported in Windows when running on the Itanium processor.
    I wonder if they are there for ARM... I'm too lazy to look in the SDK.

    gg
  13. Replies
    3
    Views
    335

    Re: How to access and configure PCI.

    You don't use the WinAPI. You use the NI-DAQ SDK to control the boards: http://digital.ni.com/manuals.nsf/websearch/47300C3471742AD0862570AE005E0AD1

    gg
  14. Replies
    3
    Views
    335

    Re: How to access and configure PCI.

    What PCI device are you trying to configure? Explain exactly what you are trying to do - the goal that you want to accomplish.

    gg
  15. Replies
    10
    Views
    772

    Re: UTF-8 Conversion

    Well, we need to understand the "destination" better.

    >> But the other program is expecting a char array, and will try to convert/decode it to wstring using...
  16. Replies
    10
    Views
    772

    Re: UTF-8 Conversion

    You have to_bytes() and from_bytes() to perform UTF16->UTF8 and UTF8->UTF16. Simply know how the source is encoded, and the encoding that the destination expects. If they aren't the same, use the...
  17. Replies
    10
    Views
    772

    Re: UTF-8 Conversion

    >>CString(utf8_converter.to_bytes(path).c_str())
    to_bytes() performs UTF16->UTF8. That is then converted via ACP->UTF16 by the CString constructor - but it's not ACP encoded...

    gg
  18. Re: How to make a blocking fetch call on std:queue?

    Depending on the usage patter, you may be able to reduce contention by adding a "deque_all" to consume the entire Q in one call - then loop through everything consumed out side the lock: ...
  19. Re: MFC: PostMessage and Handling it without the hassle (and a question).

    >> Quick question: don't you get an error:
    MSDN CWnd::PostMessage
    I'm guessing they added a const-correct version of PostMessage somewhere in their own hierarchy of classes.

    gg
  20. Re: MFC: PostMessage and Handling it without the hassle (and a question).

    >> Isn't there a memory leak?
    >>> std::auto_ptr

    I'd say this is a case where reinterpret_cast is used correctly.
    auto_ptr is deprecated, could switch to unique_ptr.

    gg
  21. Re: MFC: PostMessage and Handling it without the hassle (and a question).

    Couldn't you just do "new PostedFunction_type(func)"?

    gg
  22. Re: I am trying to write a console app in c for shutdown pause.

    Ah, we have a cross-poster.

    Here's a solution that worked on XP with no service required: http://cboard.cprogramming.com/c-programming/165817-cpu-power-button-event.html#post1223706

    gg
  23. Replies
    8
    Views
    737

    Re: Unicode characters in VC++

    Read this to lean several concepts you should know: http://cboard.cprogramming.com/cplusplus-programming/145590-non-english-characters-cout-2.html#post1086757

    gg
  24. Replies
    3
    Views
    466

    Re: Reading an NFC DEVICE

    Yep.

    gg
  25. Re: Java "volatile" alternative in C++ under Windows?

    >> And for C++11 the manual very clearly states volatile is for hardware access only (interrupts on the same thread) and not to be used for multithreading, you should use the <atomic> stuff for...
Results 1 to 25 of 1863
Page 1 of 75 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a Codeguru.com survey!


HTML5 Development Center