Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/10/22 in all areas

  1. I would be wary here. The field defaults to read only because it is a calculated field. Why would you want to change the value (unless you are trying something very dodgy?) of a calculated field. This strikes me as the sort of thing that should ring an "alarm bell" with the question: "am I designing my code the best way ?"
  2. As mentioned in this blog post: Available Today: the C++Builder and RAD Studio 11.1.5 C++ Code Insight Update (emphasizes by me):
  3. David Heffernan

    The best way to handle undo and redo.

    If there can be multiple users modifying the same database then this task becomes very challenging.
  4. Hey! We actually use the following code to get the system serial - maybe that can help: function GetSystemSerial : string; var FSWbemLocator : OLEVariant; FWMIService : OLEVariant; FWbemObjectSet: OLEVariant; FWbemObject : OLEVariant; oEnum : IEnumvariant; iValue : LongWord; begin CoInitialize(nil); try result:=''; FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator'); // ATT: we had a case, where on a Win2016 server, the system service failed to // execute this command. Changing the service to a local user solved the problem. // There has been 2 cases where the WMI service was corrupted or was not running. // -> to check: enter WmiMgmt.msc in the console and right click on the local wmi - control -> Properties // if an error occurs the repository seems to be corrupt // one time it helped to reset and rebuild the repository: // https://techcommunity.microsoft.com/t5/ask-the-performance-team/wmi-rebuilding-the-wmi-repository/ba-p/373846 try FWMIService := FSWbemLocator.ConnectServer('localhost', 'root\CIMV2', '', ''); except on e : Exception do begin OutputDebugString(PChar('WMI service not properly running: '+e.Message+#13#10+ 'https://techcommunity.microsoft.com/t5/ask-the-performance-team/wmi-rebuilding-the-wmi-repository/ba-p/373846')); raise; end; end; // todo: if we still support winxp this wmi class is not supported?!? FWbemObjectSet:= FWMIService.ExecQuery('SELECT UUID FROM Win32_ComputerSystemProduct','WQL',$00000020 {wbemFlagForwardOnly}); oEnum := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant; if oEnum.Next(1, FWbemObject, iValue) = 0 then result:=String(FWbemObject.UUID); finally CoUninitialize; end; end; There is also another place where you could get some unique id: // from http://www.nextofwindows.com/the-best-way-to-uniquely-identify-a-windows-machine with OpenHKLMReadOnly('SOFTWARE\Microsoft\Cryptography', True) do begin AktMachineGuid:=ReadString('', 'MachineGuid', ''); Log('Machine guid: ' + AktMachineGuid); Free; end; hope that helps! kind regards Mike
  5. I'm using 3-5 hardware components Maybe you mean that you use 3 to 5 devices in the computer to generate the fingerprint. If this is the case, then don't forget that the use may upgrade their hardware because of failure or just better performances. You may detect an unknown computer just because they replaced their Ethernet card (If you use the MAC address), hard disk serial or even Windows own MachineGUID. The computer may also be a virtual one running under VMWare, Hyper-V or another hypervisor. That the hardware is virtualized. Lot's of traps...
×