Hirdetés
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
- Apple asztali gépek
- Vezeték nélküli fülhallgatók
- Kormányok / autós szimulátorok topikja
- TCL LCD és LED TV-k
- Fejhallgató erősítő és DAC topik
- Tápos kibeszélő offtopik
- Forrasztásról mindent az alapoktól!
- Logitech Z906
- NVIDIA GeForce RTX 5060 Ti (GB206)
-
PROHARDVER!

Új hozzászólás Aktív témák
-
válasz
pmonitor
#16505
üzenetére
Futtattam pénteken egy tesztet: ~300K process indításból csak kb 3000 egyedi PID volt. HWND egyezést csak egyet sikerült előidéznem, azt közvetlenül a gép újraindítása után.
C# (form) kód:using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.IO;
namespace pidtest {
public partial class Form1 : Form {
[DllImport("user32.dll", SetLastError = true)]
static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint processId);
public Form1() { InitializeComponent(); }
private void Form1_Load(object sender, EventArgs e) {
try {
uint pid;
IntPtr hwnd = Handle;
GetWindowThreadProcessId(Handle, out pid);
using (StreamWriter w = File.AppendText(@"c:\temp\pidtest.txt")) {
w.WriteLine("{0} {1}", pid.ToString(), hwnd.ToString());
} }
finally { Close(); }
}
}
}
python teszter:import os
a=0
f=open("c:/temp/pidtest.txt","r");A=f.readlines()
while 1:
os.startfile("c:/temp/pidtest.exe")
A+=f.readlines()
if len(A) != len({*A}): break
if a%100==0:
B,C=zip(*[a.split()for a in A])
D,E={*B},{*C}
print(f'Items: {len(B)} - Unique: {len(D)} PID, {len(E)} HWND', end='\r', flush=1)
a+=1
f.close()
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
- Horgász topik
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
- Samsung Galaxy Z Fold7 - ezt vártuk, de…
- Beleremegett Hollywood Brad Pitt és Tom Cruise AI harcába
- Xbox Series X|S
- Kerékpárosok, bringások ide!
- Futás, futópályák
- Különleges élményre invitál az Apple
- Apple asztali gépek
- Vezeték nélküli fülhallgatók
- További aktív témák...
- iPhone Air 256GB BONTATLAN (1év Gyártói Garancia)
- Telefon felvásárlás!! iPhone 16/iPhone 16 Plus/iPhone 16 Pro/iPhone 16 Pro Max
- Surface Pro 7+ i5-1135G7 16G 256GB 1 év garancia
- DELL Precision 3430 SFF,i7-8700,8GB,256GB SSD,NVIDIA Quadro P620 VGA,Win11
- Szép állapotban Lenovo ThinkPad T14 Gen 2 /i5-1145G7/16 GB/256 SSD/FHD/IPS/Gari
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest



