Mark-
Members-
Content Count
247 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Mark-
-
I looked at your page, thought it interesting and considered downloading the demo and give it a test. Then I read this "If you by a license, it will include a subscription that is renewed automatically every 12 months." And closed the page. My2c.
-
Hello, I tried using the driver with MySQL (8.0) a couple of months ago and had to add the dll to the connection parameters to get it to work, partially. After added, I was able to get it to connect but could not get other actions to succeed. I traced the error into an FD function and posted on the EMB forums with no joy. I switched to using ODBC for MySQL 8.0 and all is working. Good luck, Mark
-
Hello, Delphi 10.2 I am trying to compile an RC file included with the project. {$R 'ResStr.res' 'ResStr.rc'} Regardless of what I put in the RC file I get [on the first line]: [BRCC32 Error] ResStr.rc(1): Fatal error Expecting resource name or resource type name Ideas or anyone have a sample RC file that complies without error? Thanks, Mark
-
Hello, Bingo. Thank you. OK, is that a better resource compiler? It only had the string table as shown above. The file encoding was the issue. Everyone, thanks for the help. Mark
-
Hello, Thanks timfrost for the response. I copied/pasted the example code into the RC file, complied (Shift F9) and got the same error message. Perhaps string table or RCDATA, I have not decided. At this point I am just trying to get anything to compile. Mark
-
Hello, Thanks for the response. I added in the first post, the error is on the first line. Every example I could find on the web, in many formats. I could not find a single working example. Mark
-
How to share data between apps
Mark- replied to Tom F's topic in Algorithms, Data Structures and Class Design
Sockets without a doubt. Plus if the request comes in for source and destination on different computers, no or very few changes required. -
Happy Holidays & Merry Christmas!
Mark- replied to FPiette's topic in ICS - Internet Component Suite
Happy Holidays & Merry Christmas! -
Thanks for the response. Why do you think/know those registry values cannot be changed without causing a failure of the the guest OS or host program?
-
Thanks for the reply. The issue with 64 bit support is the "asm" portions for two reasons. 64 bit assembly uses different opcodes from 32 bit and different register notation. Delphi does not allow the mixing of asm and Pascal in 64 bit.
-
Hello, I will control both ends of the data pipe and payload. A customer has informed me a proxy is used. Never used a proxy so scoping out what requires attention for success. From the server end it appears nothing to do. Perhaps that is wrong. For the client end I see: ProxyAuth, select one of the options. ProxyPassword, a password if ProxyAuth is other than httpAuthNone. ProxyUername, a username if ProxyAuth is other than httpAuthNone. ProxyPort, the port of the proxy server. Proxy, seems to be the IP address or host name. ProxyConnection, seems to be a keep-alive setting, not sure ProxyURL, not sure perhaps can specify all needed properties in one url string. The last three, not sure what to do with them. Any documents I can read or anyone shed some light? Thanks, Mark
-
THttpServer, THttpCli and proxies...
Mark- replied to Mark-'s topic in ICS - Internet Component Suite
Thanks Angus. -
THttpServer, THttpCli and proxies...
Mark- replied to Mark-'s topic in ICS - Internet Component Suite
Right but you can set the properties individually, right? (not referring to the sample) -
THttpServer, THttpCli and proxies...
Mark- replied to Mark-'s topic in ICS - Internet Component Suite
Thanks. No SSL for this project. I was planning on updating the Wiki with data. Proxy is the IP address or host name. ProxyConnection is 'Keep-Alive' or blank ProxyURL is as you say. I updated the Wiki. Let me know if any of the above is incorrect. -
Also posted on Embarcadero site. Hello, Working on creating a better method to fingerprint a computer without the issues of MAC ID, memory size etc.. I was looking at the "ProductID" in the registry and found that it is only for show and can be changed to any value without altering the OS operation. Several other product ID type values are present as binary keys. I found some C# code (http://www.mrpear.net/en/blog/1207/how-to-get-windows-product-key-from-digitalproductid-exported-out-of-registry) that could convert the binary to the product key code but no code in Delphi. I converted it to Delphi and it appears to work, somewhat. It returned the correct product code on a W10 64-bit Pro and a W7 32-bit Pro install. Two places in the code I am not sure are correct. Other test returned a code but, I could not verify it was correct. On a W7 64-bit, I have the code, from the CD and the returned code was not correct. I am posting the code for anyone that might need it and check if others have a better solution or comments. Cheers, Mark program GetProdIDs; {$APPTYPE CONSOLE} {$R *.res} uses Winapi.Windows, System.SysUtils, System.Win.Registry; procedure ReadRegisteryBinary(rKey:nativeUInt; const path,keyName:string; var buf; var bufSize:integer); var r:TRegistry; begin r:=nil; try r:=TRegistry.Create(KEY_READ or KEY_WOW64_64KEY); r.RootKey:=rKey; if not r.OpenKey(path,false) then Exit; if (r.GetDataSize(keyName) > bufSize) then begin bufSize:=0; Exit; end; try bufSize:=r.ReadBinaryData(keyName,buf,bufSize); except on ERegistryException do bufSize:=0; end; finally r.Free; end; end; function DecodeDigitalProductId(var data:array of byte; dataSize:integer):string; const keyOffset = 52; digits = ANSIString('BCDFGHJKMPQRTVWXY2346789'); var // isWin8:byte; last,i,current,j:integer; key,keypart1,keypart2:string; begin result:=''; // isWin8:=((data[66] div 6) and 1); //not sure about this data[66]:=(data[66] and $F7) {or ((isWin8 and $02) * 4)}; for i:=24 downto 0 do begin current:=0; for j:=14 downto 0 do begin current:=current * 256; current:=data[j + keyOffset] + current; data[j + keyOffset]:=(current div 24); current:=current mod 24; last:=current; end; if (((current + 1) > 0) and ((current + 1) <= length(digits))) then key:=digits[current + 1] + key; end; keypart1:=key.Substring(1, last); keypart2:=key.Substring(last + 1, key.Length - (last + 1)); key:=keypart1 + 'N' + keypart2; //not sure if this is correct, any keys without 'N' i:=5; while (i < key.Length) do begin key:=key.Insert(i, '-'); Inc(i,6); end; result:=key; end; function GetProductID(const idStr:string):string; var dataSize:integer; data:array[0..$FFF] of byte; begin dataSize:=length(data); ReadRegisteryBinary(HKEY_LOCAL_MACHINE,'SOFTWARE\Microsoft\Windows NT\CurrentVersion',idStr,data,dataSize); if (dataSize > 0) then result:=DecodeDigitalProductId(data,dataSize) else result:=''; end; function ReadProductIDString:string; var r:TRegistry; begin result:=''; r:=nil; try r:=TRegistry.Create(KEY_READ or KEY_WOW64_64KEY); r.RootKey:=HKEY_LOCAL_MACHINE; if not r.OpenKey('SOFTWARE\Microsoft\Windows NT\CurrentVersion',false) then Exit; try result:=r.ReadString('ProductId'); except on ERegistryException do result:='error'; end; finally r.Free; end; end; begin try Writeln('ProductId: ' + ReadProductIDString); Writeln(''); Writeln('DigitalProductId: ' + GetProductID('DigitalProductId')); Writeln('DigitalProductId1: ' + GetProductID('DigitalProductId1')); Writeln('DigitalProductId2: ' + GetProductID('DigitalProductId2')); Writeln('DigitalProductId3: ' + GetProductID('DigitalProductId3')); Writeln('DigitalProductId4: ' + GetProductID('DigitalProductId4')); Writeln('DigitalProductId5: ' + GetProductID('DigitalProductId5')); Writeln(''); Writeln('Press enter/return'); Readln; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; //if the OS was updated using the free version one of these might be the product ID code // Windows 10 Home - YTMG3-N6DKC-DKB77-7M9GH-8HVX7 // Windows 10 Pro - VK7JG-NPHTM-C97JM-9MPGT-3V66T // Windows 10 Home SL- BT79Q-G7N6G-PGBYW-4YWX6-6F4BT // Windows 10 Pro VL-MAK - QJNXR-7D97Q-K7WH4-RYWQ8-6MT6Y end.
-
Thanks very much for the code. It is very interesting. Am I wrong to think that some values, while using WMI to fetch the values, WMI retrieves the values from the registry?
-
Never used PowerShell much. The product version seems to be the same as the OS. The path has V1.0 at the end. OK installed it and much more data. Thanks,
-
Thanks The result: WindowsProductName WindowsVersion OsHardwareAbstractionLayer ------------------ -------------- -------------------------- Windows 10 Pro 1809 I ran it with no input parameters and most of the results are blank.
-
Thanks
-
Thanks. Changed to: isWin8:=((data[66] div 6) and 1); if (isWin8 <> 0) then data[66]:=(data[66] and $F7) or ((isWin8 and $02) * 4); Did you see: key:=keypart1 + 'N' + keypart2; //not sure if this is correct, any keys without 'N'
-
Hello Is there a method/way/solution to configure an THttpServer instance to use a random free port number when "Start" is called? Cheers, Mark
-
Thanks Angus.
-
Thanks. That would not compile for THttpServer and my messing with it to get it to compile, did not return the correct port number when I set the port to 8080 for example.
-
Thanks