13/02/22 6:42
MrCamarium
Ho comincaito a fare un po di ordine nel file server per intenderci il file installato sul PC remoto ho inserito le function:
[CODE]function Tipo_cpu: string;
var
aVendor: array[0..2] of DWord;
iI, iJ : Integer;
begin
asm
push ebx
xor eax, eax
dw $A20F // CPUID instruction
mov DWord ptr aVendor, ebx
mov DWord ptr aVendor[+4], edx
mov DWord ptr aVendor[+8], ecx
pop ebx
end;
for iI := 0 to 2 do
for iJ := 0 to 3 do
Result := Result + Chr((aVendor[iI] and (Ho comincaito a fare un po di ordine nel file server per intenderci il file installato sul PC remoto ho inserito le function:
[CODE]function Tipo_cpu: string;
var
aVendor: array[0..2] of DWord;
iI, iJ : Integer;
begin
asm
push ebx
xor eax, eax
dw $A20F // CPUID instruction
mov DWord ptr aVendor, ebx
mov DWord ptr aVendor[+4], edx
mov DWord ptr aVendor[+8], ecx
pop ebx
end;
for iI := 0 to 2 do
for iJ := 0 to 3 do
Result := Result + Chr((aVendor[iI] and ({parsed_message}0000FF shl (iJ * 8))) shr (iJ * 8));
end;
function GetCPUSpeed: Double;
const
DelayTime = 500;
var
TimerHi, TimerLo: DWORD;
PriorityClass, Priority: Integer;
begin
PriorityClass := GetPriorityClass(GetCurrentProcess);
Priority := GetThreadPriority(GetCurrentThread);
SetPriorityClass(GetCurrentProcess, REALTIME_PRIORITY_CLASS);
SetThreadPriority(GetCurrentThread, THREAD_PRIORITY_TIME_CRITICAL);
Sleep(10);
asm
dw 310Fh
mov TimerLo, eax
mov TimerHi, edx
end;
Sleep(DelayTime);
asm
dw 310Fh
sub eax, TimerLo
sbb edx, TimerHi
mov TimerLo, eax
mov TimerHi, edx
end;
SetThreadPriority(GetCurrentThread, Priority);
SetPriorityClass(GetCurrentProcess, PriorityClass);
Result := TimerLo / (1000 * DelayTime);
end;
function IsSoundCardInstalled: Boolean;
Begin
Result := waveOutGetNumDevs > 0;
End;
function InfoSO: String;
Var piattaforma: string;
win_ver: integer;
Begin
Case (Win32Platform) of VER_PLATFORM_WIN32_WINDOWS:
Begin
piattaforma := 'Windows 9x/Me';
win_ver := Win32BuildNumber AND {parsed_message}00FFFF;
End;
VER_PLATFORM_WIN32_NT:
Begin
piattaforma := 'Windows NT';
win_ver := Win32BuildNumber;
End;
Else
Begin
piattaforma := 'Windows';
win_ver := 0;
End;
End; // case
If (Win32CSDVersion = '') Then
InfoSO := Format('%s %d.%d (Build %d)', [piattaforma,Win32MajorVersion,
Win32MinorVersion,win_ver])
Else
InfoSO := Format('%s %d.%d (Build %d: %s)', [piattaforma,Win32MajorVersion,
Win32MinorVersion,win_ver,WIN32CSDVersion]);
End;
function SysComputerName: string;
var
I: DWord;
begin
I := MAX_COMPUTERNAME_LENGTH + 1;
SetLength(Result, I);
Windows.GetComputerName(PChar(Result), I);
Result := string(PChar(Result));
end;
function SysUserName: string;
var
I: DWord;
begin
I := 255;
SetLength(Result, I);
Windows.GetUserName(PChar(Result), I);
Result := string(PChar(Result));
end;[/CODE]
Adesso come faccio dal mio programma cioè il file cliente installato sulla mia macchina a richiamare le function?0000FF shl (iJ * 8))) shr (iJ * 8));
end;
function GetCPUSpeed: Double;
const
DelayTime = 500;
var
TimerHi, TimerLo: DWORD;
PriorityClass, Priority: Integer;
begin
PriorityClass := GetPriorityClass(GetCurrentProcess);
Priority := GetThreadPriority(GetCurrentThread);
SetPriorityClass(GetCurrentProcess, REALTIME_PRIORITY_CLASS);
SetThreadPriority(GetCurrentThread, THREAD_PRIORITY_TIME_CRITICAL);
Sleep(10);
asm
dw 310Fh
mov TimerLo, eax
mov TimerHi, edx
end;
Sleep(DelayTime);
asm
dw 310Fh
sub eax, TimerLo
sbb edx, TimerHi
mov TimerLo, eax
mov TimerHi, edx
end;
SetThreadPriority(GetCurrentThread, Priority);
SetPriorityClass(GetCurrentProcess, PriorityClass);
Result := TimerLo / (1000 * DelayTime);
end;
function IsSoundCardInstalled: Boolean;
Begin
Result := waveOutGetNumDevs > 0;
End;
function InfoSO: String;
Var piattaforma: string;
win_ver: integer;
Begin
Case (Win32Platform) of VER_PLATFORM_WIN32_WINDOWS:
Begin
piattaforma := 'Windows 9x/Me';
win_ver := Win32BuildNumber AND Ho comincaito a fare un po di ordine nel file server per intenderci il file installato sul PC remoto ho inserito le function:
[CODE]function Tipo_cpu: string;
var
aVendor: array[0..2] of DWord;
iI, iJ : Integer;
begin
asm
push ebx
xor eax, eax
dw $A20F // CPUID instruction
mov DWord ptr aVendor, ebx
mov DWord ptr aVendor[+4], edx
mov DWord ptr aVendor[+8], ecx
pop ebx
end;
for iI := 0 to 2 do
for iJ := 0 to 3 do
Result := Result + Chr((aVendor[iI] and ({parsed_message}0000FF shl (iJ * 8))) shr (iJ * 8));
end;
function GetCPUSpeed: Double;
const
DelayTime = 500;
var
TimerHi, TimerLo: DWORD;
PriorityClass, Priority: Integer;
begin
PriorityClass := GetPriorityClass(GetCurrentProcess);
Priority := GetThreadPriority(GetCurrentThread);
SetPriorityClass(GetCurrentProcess, REALTIME_PRIORITY_CLASS);
SetThreadPriority(GetCurrentThread, THREAD_PRIORITY_TIME_CRITICAL);
Sleep(10);
asm
dw 310Fh
mov TimerLo, eax
mov TimerHi, edx
end;
Sleep(DelayTime);
asm
dw 310Fh
sub eax, TimerLo
sbb edx, TimerHi
mov TimerLo, eax
mov TimerHi, edx
end;
SetThreadPriority(GetCurrentThread, Priority);
SetPriorityClass(GetCurrentProcess, PriorityClass);
Result := TimerLo / (1000 * DelayTime);
end;
function IsSoundCardInstalled: Boolean;
Begin
Result := waveOutGetNumDevs > 0;
End;
function InfoSO: String;
Var piattaforma: string;
win_ver: integer;
Begin
Case (Win32Platform) of VER_PLATFORM_WIN32_WINDOWS:
Begin
piattaforma := 'Windows 9x/Me';
win_ver := Win32BuildNumber AND {parsed_message}00FFFF;
End;
VER_PLATFORM_WIN32_NT:
Begin
piattaforma := 'Windows NT';
win_ver := Win32BuildNumber;
End;
Else
Begin
piattaforma := 'Windows';
win_ver := 0;
End;
End; // case
If (Win32CSDVersion = '') Then
InfoSO := Format('%s %d.%d (Build %d)', [piattaforma,Win32MajorVersion,
Win32MinorVersion,win_ver])
Else
InfoSO := Format('%s %d.%d (Build %d: %s)', [piattaforma,Win32MajorVersion,
Win32MinorVersion,win_ver,WIN32CSDVersion]);
End;
function SysComputerName: string;
var
I: DWord;
begin
I := MAX_COMPUTERNAME_LENGTH + 1;
SetLength(Result, I);
Windows.GetComputerName(PChar(Result), I);
Result := string(PChar(Result));
end;
function SysUserName: string;
var
I: DWord;
begin
I := 255;
SetLength(Result, I);
Windows.GetUserName(PChar(Result), I);
Result := string(PChar(Result));
end;[/CODE]
Adesso come faccio dal mio programma cioè il file cliente installato sulla mia macchina a richiamare le function?00FFFF;
End;
VER_PLATFORM_WIN32_NT:
Begin
piattaforma := 'Windows NT';
win_ver := Win32BuildNumber;
End;
Else
Begin
piattaforma := 'Windows';
win_ver := 0;
End;
End; // case
If (Win32CSDVersion = '') Then
InfoSO := Format('%s %d.%d (Build %d)', [piattaforma,Win32MajorVersion,
Win32MinorVersion,win_ver])
Else
InfoSO := Format('%s %d.%d (Build %d: %s)', [piattaforma,Win32MajorVersion,
Win32MinorVersion,win_ver,WIN32CSDVersion]);
End;
function SysComputerName: string;
var
I: DWord;
begin
I := MAX_COMPUTERNAME_LENGTH + 1;
SetLength(Result, I);
Windows.GetComputerName(PChar(Result), I);
Result := string(PChar(Result));
end;
function SysUserName: string;
var
I: DWord;
begin
I := 255;
SetLength(Result, I);
Windows.GetUserName(PChar(Result), I);
Result := string(PChar(Result));
end;[/CODE]
Adesso come faccio dal mio programma cioè il file cliente installato sulla mia macchina a richiamare le function?
[CODE]function Tipo_cpu: string;
var
aVendor: array[0..2] of DWord;
iI, iJ : Integer;
begin
asm
push ebx
xor eax, eax
dw $A20F // CPUID instruction
mov DWord ptr aVendor, ebx
mov DWord ptr aVendor[+4], edx
mov DWord ptr aVendor[+8], ecx
pop ebx
end;
for iI := 0 to 2 do
for iJ := 0 to 3 do
Result := Result + Chr((aVendor[iI] and (Ho comincaito a fare un po di ordine nel file server per intenderci il file installato sul PC remoto ho inserito le function:
[CODE]function Tipo_cpu: string;
var
aVendor: array[0..2] of DWord;
iI, iJ : Integer;
begin
asm
push ebx
xor eax, eax
dw $A20F // CPUID instruction
mov DWord ptr aVendor, ebx
mov DWord ptr aVendor[+4], edx
mov DWord ptr aVendor[+8], ecx
pop ebx
end;
for iI := 0 to 2 do
for iJ := 0 to 3 do
Result := Result + Chr((aVendor[iI] and ({parsed_message}0000FF shl (iJ * 8))) shr (iJ * 8));
end;
function GetCPUSpeed: Double;
const
DelayTime = 500;
var
TimerHi, TimerLo: DWORD;
PriorityClass, Priority: Integer;
begin
PriorityClass := GetPriorityClass(GetCurrentProcess);
Priority := GetThreadPriority(GetCurrentThread);
SetPriorityClass(GetCurrentProcess, REALTIME_PRIORITY_CLASS);
SetThreadPriority(GetCurrentThread, THREAD_PRIORITY_TIME_CRITICAL);
Sleep(10);
asm
dw 310Fh
mov TimerLo, eax
mov TimerHi, edx
end;
Sleep(DelayTime);
asm
dw 310Fh
sub eax, TimerLo
sbb edx, TimerHi
mov TimerLo, eax
mov TimerHi, edx
end;
SetThreadPriority(GetCurrentThread, Priority);
SetPriorityClass(GetCurrentProcess, PriorityClass);
Result := TimerLo / (1000 * DelayTime);
end;
function IsSoundCardInstalled: Boolean;
Begin
Result := waveOutGetNumDevs > 0;
End;
function InfoSO: String;
Var piattaforma: string;
win_ver: integer;
Begin
Case (Win32Platform) of VER_PLATFORM_WIN32_WINDOWS:
Begin
piattaforma := 'Windows 9x/Me';
win_ver := Win32BuildNumber AND {parsed_message}00FFFF;
End;
VER_PLATFORM_WIN32_NT:
Begin
piattaforma := 'Windows NT';
win_ver := Win32BuildNumber;
End;
Else
Begin
piattaforma := 'Windows';
win_ver := 0;
End;
End; // case
If (Win32CSDVersion = '') Then
InfoSO := Format('%s %d.%d (Build %d)', [piattaforma,Win32MajorVersion,
Win32MinorVersion,win_ver])
Else
InfoSO := Format('%s %d.%d (Build %d: %s)', [piattaforma,Win32MajorVersion,
Win32MinorVersion,win_ver,WIN32CSDVersion]);
End;
function SysComputerName: string;
var
I: DWord;
begin
I := MAX_COMPUTERNAME_LENGTH + 1;
SetLength(Result, I);
Windows.GetComputerName(PChar(Result), I);
Result := string(PChar(Result));
end;
function SysUserName: string;
var
I: DWord;
begin
I := 255;
SetLength(Result, I);
Windows.GetUserName(PChar(Result), I);
Result := string(PChar(Result));
end;[/CODE]
Adesso come faccio dal mio programma cioè il file cliente installato sulla mia macchina a richiamare le function?0000FF shl (iJ * 8))) shr (iJ * 8));
end;
function GetCPUSpeed: Double;
const
DelayTime = 500;
var
TimerHi, TimerLo: DWORD;
PriorityClass, Priority: Integer;
begin
PriorityClass := GetPriorityClass(GetCurrentProcess);
Priority := GetThreadPriority(GetCurrentThread);
SetPriorityClass(GetCurrentProcess, REALTIME_PRIORITY_CLASS);
SetThreadPriority(GetCurrentThread, THREAD_PRIORITY_TIME_CRITICAL);
Sleep(10);
asm
dw 310Fh
mov TimerLo, eax
mov TimerHi, edx
end;
Sleep(DelayTime);
asm
dw 310Fh
sub eax, TimerLo
sbb edx, TimerHi
mov TimerLo, eax
mov TimerHi, edx
end;
SetThreadPriority(GetCurrentThread, Priority);
SetPriorityClass(GetCurrentProcess, PriorityClass);
Result := TimerLo / (1000 * DelayTime);
end;
function IsSoundCardInstalled: Boolean;
Begin
Result := waveOutGetNumDevs > 0;
End;
function InfoSO: String;
Var piattaforma: string;
win_ver: integer;
Begin
Case (Win32Platform) of VER_PLATFORM_WIN32_WINDOWS:
Begin
piattaforma := 'Windows 9x/Me';
win_ver := Win32BuildNumber AND Ho comincaito a fare un po di ordine nel file server per intenderci il file installato sul PC remoto ho inserito le function:
[CODE]function Tipo_cpu: string;
var
aVendor: array[0..2] of DWord;
iI, iJ : Integer;
begin
asm
push ebx
xor eax, eax
dw $A20F // CPUID instruction
mov DWord ptr aVendor, ebx
mov DWord ptr aVendor[+4], edx
mov DWord ptr aVendor[+8], ecx
pop ebx
end;
for iI := 0 to 2 do
for iJ := 0 to 3 do
Result := Result + Chr((aVendor[iI] and ({parsed_message}0000FF shl (iJ * 8))) shr (iJ * 8));
end;
function GetCPUSpeed: Double;
const
DelayTime = 500;
var
TimerHi, TimerLo: DWORD;
PriorityClass, Priority: Integer;
begin
PriorityClass := GetPriorityClass(GetCurrentProcess);
Priority := GetThreadPriority(GetCurrentThread);
SetPriorityClass(GetCurrentProcess, REALTIME_PRIORITY_CLASS);
SetThreadPriority(GetCurrentThread, THREAD_PRIORITY_TIME_CRITICAL);
Sleep(10);
asm
dw 310Fh
mov TimerLo, eax
mov TimerHi, edx
end;
Sleep(DelayTime);
asm
dw 310Fh
sub eax, TimerLo
sbb edx, TimerHi
mov TimerLo, eax
mov TimerHi, edx
end;
SetThreadPriority(GetCurrentThread, Priority);
SetPriorityClass(GetCurrentProcess, PriorityClass);
Result := TimerLo / (1000 * DelayTime);
end;
function IsSoundCardInstalled: Boolean;
Begin
Result := waveOutGetNumDevs > 0;
End;
function InfoSO: String;
Var piattaforma: string;
win_ver: integer;
Begin
Case (Win32Platform) of VER_PLATFORM_WIN32_WINDOWS:
Begin
piattaforma := 'Windows 9x/Me';
win_ver := Win32BuildNumber AND {parsed_message}00FFFF;
End;
VER_PLATFORM_WIN32_NT:
Begin
piattaforma := 'Windows NT';
win_ver := Win32BuildNumber;
End;
Else
Begin
piattaforma := 'Windows';
win_ver := 0;
End;
End; // case
If (Win32CSDVersion = '') Then
InfoSO := Format('%s %d.%d (Build %d)', [piattaforma,Win32MajorVersion,
Win32MinorVersion,win_ver])
Else
InfoSO := Format('%s %d.%d (Build %d: %s)', [piattaforma,Win32MajorVersion,
Win32MinorVersion,win_ver,WIN32CSDVersion]);
End;
function SysComputerName: string;
var
I: DWord;
begin
I := MAX_COMPUTERNAME_LENGTH + 1;
SetLength(Result, I);
Windows.GetComputerName(PChar(Result), I);
Result := string(PChar(Result));
end;
function SysUserName: string;
var
I: DWord;
begin
I := 255;
SetLength(Result, I);
Windows.GetUserName(PChar(Result), I);
Result := string(PChar(Result));
end;[/CODE]
Adesso come faccio dal mio programma cioè il file cliente installato sulla mia macchina a richiamare le function?00FFFF;
End;
VER_PLATFORM_WIN32_NT:
Begin
piattaforma := 'Windows NT';
win_ver := Win32BuildNumber;
End;
Else
Begin
piattaforma := 'Windows';
win_ver := 0;
End;
End; // case
If (Win32CSDVersion = '') Then
InfoSO := Format('%s %d.%d (Build %d)', [piattaforma,Win32MajorVersion,
Win32MinorVersion,win_ver])
Else
InfoSO := Format('%s %d.%d (Build %d: %s)', [piattaforma,Win32MajorVersion,
Win32MinorVersion,win_ver,WIN32CSDVersion]);
End;
function SysComputerName: string;
var
I: DWord;
begin
I := MAX_COMPUTERNAME_LENGTH + 1;
SetLength(Result, I);
Windows.GetComputerName(PChar(Result), I);
Result := string(PChar(Result));
end;
function SysUserName: string;
var
I: DWord;
begin
I := 255;
SetLength(Result, I);
Windows.GetUserName(PChar(Result), I);
Result := string(PChar(Result));
end;[/CODE]
Adesso come faccio dal mio programma cioè il file cliente installato sulla mia macchina a richiamare le function?
aaa