Autor Beitrag
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Sa 25.10.08 15:54 
Hallo,
Wie bekommt man ein für diese Session garantiert einmaliges Handle?
Gibts da vielleicht sone API-Funktion wie
ausblenden Delphi-Quelltext
1:
registerhandle: thandle					

Im Prinzip brauche ich eigentlich nur eine id für ein "Objekt", diese muss halt im System einmalig sein, aber Handles sind doch nichgts anderes, oder habe ich da grundlegend was falsch verstanden?


Zuletzt bearbeitet von Boldar am Sa 25.10.08 16:04, insgesamt 1-mal bearbeitet
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 25.10.08 15:58 
Nimm eine GUID.
Boldar Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Sa 25.10.08 16:04 
Aber ich brauche ein Cardinal wert...
Also Thandle
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 25.10.08 17:22 
Darf man mehr Details erfragen, wieso es ein THandle sein muss?

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Sa 25.10.08 17:29 
Wofür brauchst du eine einmalige ID? Wie definierst du eine Session (Terminal Session/System/Global?)? Nimm doch GetCurrentProcessId.
Boldar Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Sa 25.10.08 19:40 
Ich "verteile" Objekte über eine DLL mit MMF's an verschiedene Programme.
Es soll jedes Programm auf jedes Zugreifen können, aber nur, wenn es halt dieses Handle kennt.
Aber wie Erzeuge ich jetzt diese Handles??
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 25.10.08 19:46 
In dem Du z.B. dir eine Tabelle anlegst und jedes Objekt bekommt in dieser Tabelle einen Eintrag. Der Index in der Tabelle ist nun dessen Handle. Nicht anders macht Windows das nämlich ;-) Nur dass es da anstatt des Index der Tabellen-Offset ist.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.