Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-20-2024, 16:53
Mr.Leng Mr.Leng is offline
Friend
 
Join Date: Sep 2023
Posts: 6
Rept. Given: 0
Rept. Rcvd 7 Times in 4 Posts
Thanks Given: 1
Thanks Rcvd at 18 Times in 6 Posts
Mr.Leng Reputation: 7
Bug fixes for EnigmaHardwareID source code

Posts
https://forum.exetools.com/showthread.php?t=20765

Error in retrieving hardware serial number in Windows 7 virtual machine.Error in function void GetHDDString().

My modification method:

void RemoveParentheses(char* str)
{
char* dest = str;
for (char* src = str; *src != '\0'; ++src) {
if (*src != '(' && *src != ')') {
*dest = *src;
++dest;
}
}
*dest = '\0';
}
--------------------------------------------------------------------------
----------------------Keep the original code logic unchanged------------
----------------------add code-----------------------------------------
StringLen2 = strlen(bytes_values);
for (i = 0; i < StringLen2; i += 2) // reverse chars
{
char firstChar = bytes_values[i];
char SecondChar = bytes_values[i + 1];
if (SecondChar != 0)
{
bytes_values[i + 1] = firstChar;
bytes_values[i] = SecondChar;
}
}
strcat_s(HDDStr, bytes_values);

//add code
RemoveParentheses(HDDStr);
}
else
strcat_s(HDDStr, SecondString);

//add code
RemoveParentheses(HDDStr);
--------------------------------------------------------------------------
----------------------Keep the original code logic unchanged------------

Last edited by Mr.Leng; 04-20-2024 at 17:01.
Reply With Quote
The Following User Gave Reputation+1 to Mr.Leng For This Useful Post:
user1 (04-23-2024)
The Following 4 Users Say Thank You to Mr.Leng For This Useful Post:
niculaita (04-21-2024), tonyweb (04-24-2024), user1 (04-23-2024), wx69wx2023 (04-22-2024)
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
EnigmaHardwareID CodeCracker Community Tools 8 03-23-2024 18:39
VB6 N-CODE - Stop any servive and Start any APP-Release and Source Code wilson bibe General Discussion 5 04-10-2013 00:23


All times are GMT +8. The time now is 19:26.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )