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


Type: Posts; User: GeoRanger

Page 1 of 7 1 2 3 4

Search: Search took 0.06 seconds.

  1. Re: safe to reinterpret_cast vector?

    Thank you! I'm new to COM so this has been quite a dive. Apparently, one can do the job safely as long as the vector<CComPtr<IDWriteFontFile>> is allocated before the call to GetFiles. One...
  2. safe to reinterpret_cast vector?


    I am trying to use CComPtr to manage all of the COM objects in a block of code which uses DirectWrite.

    IDWriteFontFace::GetFiles takes an array of pointers to IDWriteFontFile as its...
  3. a best-practices or industry-standard way to solve this diamond inheritance problem?

    I have discovered a problem in a much larger program and am wondering if someone could please tell me if there's a common, best-practices way to solve it.

  4. OK to write to pointer returned with consume semantics?


    I think the typical usage pattern for using std::memory_order_consume is something like this:

    std::atomic<int> state;
    int x = state.load(std::memory_order_consume);
    int y = x...
  5. Re: Issue with playing metafile to device context then saving to bitmap. What I missi


    In the code you posted, you don't have anything which is actually drawing on the device context of the window, but only to DC's in memory. This looks like MFC code. Are you doing this in...
  6. trying to use SFINAE to detect unimplemented abstract function


    I have a class hierarchy which has an interface at its root. Some of the intermediate classes in the tree do not fully implement the interface, but nonetheless need to be able to create...
  7. Replies

    Re: All possible combinations problem

    You just want all possible combinations of one's and zero's only in the positions where the input has a one, right?

    If so, think of the zero's and one's as simply being a binary number. If you...
  8. old ActiveX control compatible with IMAGE_FILE_LARGE_ADDRESS_AWARE?


    I am having a problem in which a program crashes after 2 to 12 hours due to memory fragmentation. I am exploring several options for trying to solve it. I cannot convert it to a 64-bit...
  9. Replies

    InterlockedExchangeRelease doesn't exist?

    This article, "Acquire and release sound like bass fishing terms, but they also apply to memory models" <>, seems to provide a good...
  10. Re: pointer-to-member array crashes with virtual inheritance

    Thank you both for your interest and responses. :)

    Thank you Paul McKenzie for the quote from the Standard. That's the kind of information I was hoping to find.

    2kaud, I'm using Visual Studio...
  11. [RESOLVED] pointer-to-member array crashes with virtual inheritance


    I've got the following code which demonstrates a problem and am hoping someone can explain:

    struct A
    double x[2];
    double i;
  12. Re: how can I get rid of these downcasts?

    Thank you three for your responses! :)

    My contrived example doesn't do a great job of expressing the real problem. The real problem is an optimization problem where the derived classes...
  13. [RESOLVED] how can I get rid of these downcasts?


    The contrived code below demonstrates a problem I am having in a larger program. I want to have a base class which contains the functionality to assemble a group of objects into a container. ...
  14. Re: How to pass a N-dimensional array to a function?

    Are you just looking for the basic but non-obvious syntax?

    // The crucial thing to remember here is to read non-trivial pointer declarations backward
    // but with grouping by parentheses. So,...
  15. Re: is this cast to add const guaranteed to be OK?

    Thank you both for your replies! :)

    laserlight, I decided to use your idea and it has cured 90% of the issue. I added a small class which is able to give the appearance of being either an array...
  16. is this cast to add const guaranteed to be OK?


    I have a class in a speed critical program which contains some data to be shared with callers outside the class. The data is reasonably large and copying it should be avoided as much as...
  17. Re: Heap object created on the stack isn't cleaned up properly

    From Paul McKenzie:

    Quite true! What fools some programmers into thinking otherwise is that the C Run Time will sometimes check the integrity of the heap in a debug build on calls to delete (or...
  18. Replies

    Re: Memory Leak in Constructor?

    The only false positives I've ever seen from the CRT leak-checking happen when you allocate and delete memory in a static singleton. Apparently, the CRT initiates the leak-checking when a static...
  19. Replies

    Re: When to use pointers?

    At the risk of sticking my neck out, I wonder if I could give my two cents on the issue of the usage pointers vs. references discussed back in posts 5 through 9 of this thread? (Please excuse me if...
  20. Replies

    Re: Create new array, the fast way

    This sounds (no pun intended) like it might be a good candidate for offloading to the GPU. If you are using Visual Studio 2012 you can use AMP...
  21. How to substitute correct module when debugging a dump file for Visual Studio 2010?


    I have a dump file from a remote machine which I'm trying to debug. Both the remote machine and my debugger are using Windows 7 with Service Pack 1. The crashing program was built with...
  22. Replies

    Re: Modifying an existing array with a function

    Sidebar: How do you get the quote icon and the name of the person who said it inside the box?

    This is only my opinion and I know a lot of people, including the designers of the STL, disagree with...
  23. Re: try/catch don't work under release version???

    From amcelroy:

    Well, it largely boils down to what Paul McKenzie was saying in posts #18 and #19. It's the whole "undefined behavior" idea. If the random variable points outside the program's...
  24. Re: try/catch don't work under release version???

    From amcelroy:

    Actually, that is quite easy to do in a non-erroneous way, as long as you are careful not to access any member data or the v-table of the possibly NULL class. (MFC code did it...
  25. Re: How best to prevent memory exhaustion in time-critical dynamic programming?

    I didn't mean to start a war! :)

    Actually, I'm finding the posts from all three of you potentially useful. Unfortunately I've not had the opportunity to try any of these ideas yet four a couple...
Results 1 to 25 of 153
Page 1 of 7 1 2 3 4

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)