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


Type: Posts; User: OReubens

Page 1 of 80 1 2 3 4

Search: Search took 0.04 seconds.

  1. Re: find closest date in sorted array of dates if required date is missing

    since the table is fixed size, and in eprom (and thus not changing) minimum access would make me think a an appropriate hash based on a linear function would reduce accesses by a lot.

    finding a...
  2. Replies

    Re: from static to vector

    The problem with using std::array for this...

    you'll be reserving the size of the array in a modifiable memory segment.
    and you'll have the actual data in a read-only section of memory.
    the read...
  3. Replies

    Re: drive powered down??

    are you sure it's powering down ? or are you seeing drive temperature calibration ?
  4. Re: Anti dll Injection with API Hooking "Access Violation writing location 0x00000000

    You are quite deluding yourself if you think this makes your program 100% safe from injection.
    -There are other ways to inject dlls.
    -There are ways to inject code that isn't even in a DLL.
  5. Re: Got the .obj and .exe files. How do I reassemble the whole thing back...

    IdaPro is a dissassembler that will help you make sense of what a program is doing (assuming you know assembler very well)
    but the idapro output isn't typically directly usable as input for an...
  6. Re: Calculating the real lfWidth value of LOGFONT when lfWidth = 0

    I'm getting the impression you're not quite understanding how this works.

    you usually only provide the height when creating a font.
    if you also supply width, then windows will create a font that...
  7. Re: fread() bug in Visual C runtime library, what is the Visual C++ version?

    it's not a bug, it's simply how things are. fread returns a size_t and takes size_t parameters, which on win32 has the range of an unsigned int.
    can't fix this without making the code non-standard...
  8. Re: fread() bug in Visual C runtime library, what is the Visual C++ version?

    You can use CFile which is based on basic windows file access.

    don't use CStdioFile, which is based around FILE and fread() (and it's family of functions).
  9. Replies

    Re: Finding the largest factor

    A factor is any number that evenly divides the source value without leaving a remainder.

    so 12 is the largest factor of 24 because 24/12 = 2, remainder 0.
    other factors of 24 would be 8, 6, 4,...
  10. Replies

    Re: filter http packet by content

    You either want to look into hooking the api's the libraries from wireshark (libwireshark or it's lower level version libpcap) or fiddler (fiddlercore) provide. (easiest)

    or you want to use the...
  11. Replies

    Re: filter http packet by content

    Wireshark ? Fiddler ?
  12. Re: Converting Java to MIPS - Not getting the right output

    If you were told not to edit a part of the code, than that may have been exactly the kind of problem you were really asked to solve.

    When calling other functions in assembly, you Always have to...
  13. Re: Converting Java to MIPS - Not getting the right output

    What you're describing is a logic error. So get your debugger and step through the code monitoring the loop variables and figure out what's wrong.
    It's unrealistic to expect someone else to do your...
  14. Re: DesktopDuplicatipn API windows8 does not capture fullscreen games

    What you're seeing is normal. The fullscreen DirectX canvas cannot be captured via GDI. The explanation for this is simple, there isn't a DC in this case, so there's nothing for GDI to interact...
  15. Replies

    Re: Circle Color Palette Pie Chart

    in the top image, the values towards the middle have higher saturation levels.

    this is essentially polar coordinates. the hue is the angle (0..255) from the zero line
    and the saturation is the...
  16. Replies

    Re: 2 quick questions - (1) enums and (2) switch

    On most modern compilers the switch won't have any sort of speed benefit over a chain of if/else if/else if... Because optimizers have gotten "smart enough" to detect the situation and end up...
  17. Replies

    Re: Stretch CView for ulta-high res screens

    If your application has NOT been specifically been tagged as supporting High DPI (see Project properties, Manifest tool, Input & output, Enable DPI Awareness), then on a Windows with the screen set...
  18. Re: How to avoid cross comparisons in permutation finding?

    don't generate them in the first place ?

    see this for a possible implementation using STL
  19. Replies

    Re: 2 quick questions - (1) enums and (2) switch

    what ?
    No. that's not even remotely what an enum is in either a practical or a semantical point of view.
  20. Replies

    Re: [RESOLVED] efficiency issues

    Rough guess from looking at your code and using rand() (which can't ever return anything > 32K)

    1) only the items with low indexes will be properly shuffled, items with high indexes won't.
    2) you...
  21. Re: old ActiveX control compatible with IMAGE_FILE_LARGE_ADDRESS_AWARE?

    it all depends on that control. if it was not made with large adresses in mind, and it either assumes the high bit of pointers is Always 0, or it internally "abuses" the high bit. It could just...
  22. Re: Alternative to cout logging in Windows Environment.

    things like this Always end up being about programmer convenience vs performance.

    if speed is really your concern. Then low level file IO with your own formatting is going to beat the pants out...
  23. Replies

    Re: [RESOLVED] efficiency issues

    standard rand() is a pretty horrible PRNG, that only has a range of 32K (and a period of 32K)

    So no matter how you twist and turn this, it can only generate 32K unique numbers at most. You can...
  24. Re: When it comes to C++ and Visual C++, what are the most important topics to know?

    While the Standard library is important, I wouldn't call it "most important". You can get a lot of real work done without using the standard library, and if you're using a framework like MFC, you...
  25. Re: ambiguous behaviour of a class template with specialised function

    if you want a library (or a dll) to have a specific specialisation of a template availble to link to, then you need to explicitely instantiate the specialization. and make sure this instantiation is...
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4

Click Here to Expand Forum to Full Width