Login to reply

6 posts


by aktionline 2 years ago
I want to get Hardware ID lib using a dll.can you please make a small demo, showing the harddisk sn in textbox.thank you alot

by Rebin 2 years ago
Hi aktionline,Sorry for the late reply.At the moment Korduene is not capable of creating that type of methods.But since you can include source code to your project, we can work around that, all you need is create a cs file and put it in "SourceLibraries".Then simply create a Function node and call the method.CS file code:
using System;using System.Runtime.InteropServices;public static class NativeDriveInfo{    [DllImport("HardwareIDExtractorC.dll")]    public static extern String GetIDESerialNumber(byte DriveNumber);}
Node code:
byte portValue = GET_PORTVALUE("B");return NativeDriveInfo.GetIDESerialNumber(portValue);
Here is a project sample:

Korduene Developer
by aktionline 2 years ago
it works but it gives crashes. due the missing ReleaseMemory."Important: The memory for the strings returned by the functions of this DLL are allocated by DLL's heap allocator. When you are done, you must manually dealocate the space allocated for the strings, by calling ReleaseMemory:"<a href="http://www.soft.tahionic.com/download-hdd_id/hardware%20id%20programming%20source%20code/exported%20functions%20for%20non-Delphi.html">http://www.soft.tahionic.com/download-h ... elphi.html</a>can you please add this ReleaseMemory. I tried so much. thank you

by Rebin 2 years ago
Here is an updated project sample that includes the new release memory and cpu id native methods.

Korduene Developer
by aktionline 2 years ago
when getting the HDD SerialNumber it still crashed. ReleaseMemory doesnt work?

by Rebin 2 years ago
Releasing memory is pretty much cleaning up after yourself, so it shouldn't be a big deal in this case (though it is recommended that you do).I think there might be an issue with the library, it didn't work well for me either, if you call the get id method couple of times, it will crash, then after that, it shows an empty message box, then another message box saying that you're using a demo, like shown in the two screenshots below.

Korduene Developer
Login to reply
;