Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

SunKnight0

@SunKnight0
About
Posts
7
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Messages and Windows
    S SunKnight0

    Are you saying that when you move the window by dragging the title bar it no longer receives messages? Does it happen only while you move it or do you keep not getting the messages after you stop moving it? Are you sure the messages are lost or maybe just queued behind the window movement messages? Are you sure the (I assume) custom messages you sent to the window are of the proper WM_USER+X range and do not happen to have the same IDs are system messages?

    C / C++ / MFC sysadmin question

  • License Keys
    S SunKnight0

    My personal preference is to use the install date/time in a reversable math function and store it in an obscure place in the registry. Any activation/licence keys would then be tied to the specific date/time of the install and therefore useless for activating other installations of the program. Of course that makes the keys useless for re-installation purposes on the same system also (after a wipe out and reload of OS), which would be a legitimate use. One way to identify a system by hardware would be to read the mac address of the NIC. Again far from foolproof as it assumes a system will have a NIC and it won't be replaced, but if you work with a combination of the date/time and MAC address and allow your activation keys to work if either matches the original, you should get pretty good security with minimal false positives.

    C / C++ / MFC adobe database sysadmin windows-admin security

  • Thread Problem
    S SunKnight0

    I am not sure I understand 100% of what you are trying to do, but it seems to me that you have a mumber of threads modifying the data (and using a Global Mutex to make sure they do it one at a time) and a number of threads reading the data. If that is the case just use the same Mutex for the reading threads also. That way your data is not being modified as another thread is tryting to read it.

    C / C++ / MFC performance help

  • Find the exe name when loading dll
    S SunKnight0

    I don't know if that is feasible, it depends on the complexity of your project, but you could add the executable's name as an extra variable to some key calls to the dll and have the executables just provide their name to the dll for logging/debugging purposes.

    C / C++ / MFC help debugging question

  • double rant/question ( and a smallish dll q. )
    S SunKnight0

    I don't think there is a way to ensure precision on the way the value is stored, unless the desired precision is small enough to convert it to an integer (so you would store 2.5 as 250 and know that you have to divide by 100 to get the actaul value), but you can implement the desired precision in your code checking, assuming the variance in the way the value is stored is less than the desired precision. For example, if you are testing monetary values and you only need to be precise to 0.01 then equality is checked by something like fabs(a-b)<0.01 which is roughly equivalent to a==b. When checking for limits and you would ideally want, for example a<=100, just use a<100.01, etc.

    C / C++ / MFC question announcement debugging help tutorial

  • linking erros
    S SunKnight0

    if these classes are part of an external library, make sure the appropriate .lib files are listed in your Imports.

    C / C++ / MFC help question

  • error LNK2001
    S SunKnight0

    Make sure you are including the appropriate .lib file in your Imports

    C / C++ / MFC help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups