Delphi-PRAXiS
Seite 3 von 3     123   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Admin (https://www.delphipraxis.net/33151-admin.html)

Luckie 16. Aug 2005 01:52

Re: Admin
 
Das überrascht mich jetzt aber doch etwas. :gruebel: OLLI!!!!!

Prüf mal explizit den Errorcode. Kommt da eventuell so was bei raus wie: ERROR_NOT_SUPPORTED oder so was? Es kann sein, dass es unter Consumer Windows einfach nur eine leere Hülle ist.

Olli 16. Aug 2005 10:06

Re: Admin
 
Zitat:

Zitat von Luckie
Das überrascht mich jetzt aber doch etwas. :gruebel: OLLI!!!!!

:lol:

Zitat:

Zitat von Luckie
Prüf mal explizit den Errorcode. Kommt da eventuell so was bei raus wie: ERROR_NOT_SUPPORTED oder so was? Es kann sein, dass es unter Consumer Windows einfach nur eine leere Hülle ist.

Ein Stub wäre eine denkbare Möglichkeit. Werde das mal eben überprüfen ... bleibt dran ;)

Olli 16. Aug 2005 10:37

Re: Admin
 
ROFLMAO, bin auch überrascht, habe es aber auf Windows 95B getestet ... dort gibt es eine ADVAPI32.DLL und diese enthält u.a. die genannten Exporte. Jetzt kommt der Witz: die machen natürlich nix und viele der Exporte zeigen sogar auf den gleichen Code. Beispiel:
Code:
[color=red].text:BFEC20FC ; Exported entry 24. ControlService
.text:BFEC20FC ; Exported entry 25. CopySid
.text:BFEC20FC ; Exported entry 59. DuplicateToken
.text:BFEC20FC ; Exported entry 68. GetAce
.text:BFEC20FC ; Exported entry 77. GetSecurityDescriptorControl
.text:BFEC20FC ; Exported entry 79. GetSecurityDescriptorGroup
.text:BFEC20FC ; Exported entry 81. GetSecurityDescriptorOwner
.text:BFEC20FC ; Exported entry 97. InitializeAcl
.text:BFEC20FC ; Exported entry 99. InitializeSid
.text:BFEC20FC ; Exported entry 102. IsTextUnicode
.text:BFEC20FC ; Exported entry 117. LookupPrivilegeValueA
.text:BFEC20FC ; Exported entry 118. LookupPrivilegeValueW
.text:BFEC20FC ; Exported entry 120. MakeSelfRelativeSD
.text:BFEC20FC ; Exported entry 124. ObjectCloseAuditAlarmA
.text:BFEC20FC ; Exported entry 125. ObjectCloseAuditAlarmW
.text:BFEC20FC ; Exported entry 134. OpenProcessToken
.text:BFEC20FC ; Exported entry 135. OpenSCManagerA
.text:BFEC20FC ; Exported entry 136. OpenSCManagerW
.text:BFEC20FC ; Exported entry 137. OpenServiceA
.text:BFEC20FC ; Exported entry 138. OpenServiceW
.text:BFEC20FC ; Exported entry 140. PrivilegeCheck
.text:BFEC20FC ; Exported entry 153. RegConnectRegistryW
.text:BFEC20FC ; Exported entry 157. RegCreateKeyW
.text:BFEC20FC ; Exported entry 171. RegLoadKeyW
.text:BFEC20FC ; Exported entry 176. RegOpenKeyW
.text:BFEC20FC ; Exported entry 189. RegRestoreKeyW
.text:BFEC20FC ; Exported entry 191. RegSaveKeyW
.text:BFEC20FC ; Exported entry 207. SetFileSecurityA
.text:BFEC20FC ; Exported entry 208. SetFileSecurityW
.text:BFEC20FC ; Exported entry 209. SetKernelObjectSecurity
.text:BFEC20FC ; Exported entry 216. SetServiceObjectSecurity
.text:BFEC20FC ; Exported entry 220. StartServiceA
.text:BFEC20FC ; Exported entry 223. StartServiceW[/color]
.text:BFEC20FC
.text:BFEC20FC ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
.text:BFEC20FC
.text:BFEC20FC
.text:BFEC20FC ; BOOL __stdcall StartServiceW(SC_HANDLE hService,DWORD dwNumServiceArgs,LPCWSTR *lpServiceArgVectors)
.text:BFEC20FC                public StartServiceW
.text:BFEC20FC StartServiceW  proc near
.text:BFEC20FC                xor    eax, eax       ; ControlService
.text:BFEC20FC                                        ; CopySid
.text:BFEC20FC                                        ; DuplicateToken
.text:BFEC20FC                                        ; GetAce
.text:BFEC20FC                                        ; GetSecurityDescriptorControl
.text:BFEC20FC                                        ; GetSecurityDescriptorGroup
.text:BFEC20FC                                        ; GetSecurityDescriptorOwner
.text:BFEC20FC                                        ; InitializeAcl
.text:BFEC20FC                                        ; InitializeSid
.text:BFEC20FC                                        ; IsTextUnicode
.text:BFEC20FC                                        ; LookupPrivilegeValueA
.text:BFEC20FC                                        ; LookupPrivilegeValueW
.text:BFEC20FC                                        ; MakeSelfRelativeSD
.text:BFEC20FC                                        ; ObjectCloseAuditAlarmA
.text:BFEC20FC                                        ; ObjectCloseAuditAlarmW
.text:BFEC20FC                                        ; OpenProcessToken
.text:BFEC20FC                                        ; OpenSCManagerA
.text:BFEC20FC                                        ; OpenSCManagerW
.text:BFEC20FC                                        ; OpenServiceA
.text:BFEC20FC                                        ; OpenServiceW
.text:BFEC20FC                                        ; PrivilegeCheck
.text:BFEC20FC                                        ; RegConnectRegistryW
.text:BFEC20FC                                        ; RegCreateKeyW
.text:BFEC20FC                                        ; RegLoadKeyW
.text:BFEC20FC                                        ; RegOpenKeyW
.text:BFEC20FC                                        ; RegRestoreKeyW
.text:BFEC20FC                                        ; RegSaveKeyW
.text:BFEC20FC                                        ; SetFileSecurityA
.text:BFEC20FC                                        ; SetFileSecurityW
.text:BFEC20FC                                        ; SetKernelObjectSecurity
.text:BFEC20FC                                        ; SetServiceObjectSecurity
.text:BFEC20FC                                        ; StartServiceA
.text:BFEC20FE                mov    cl, 3
.text:BFEC2100                 jmp    loc_BFEC1356
.text:BFEC2100 StartServiceW  endp
Also nochmal Glück gehabt, FriFra :zwinker: ... die tun nix, außer zu tun, daß dein Code tun tut :mrgreen:

phXql 16. Aug 2005 10:58

Re: Admin
 
Zitat:

Zitat von FriFra
Nirgends! Ich hab einfach nicht glauben wollen, dass das Programm mit dieser Funktion nicht startetm und hab das ganze jetzt einfach mal getestet...
Die Idee mit dem dynamischen Laden der entspr. dll-Funktionen kam mir ja nur, weil hier mehrfach behauptet wurde, dass diese Funktionen "fest eingelinkt sind" und das Programm deshalb nicht starten würde... es startet aber :roll: :???:

hmm, bei meinem ICQ hatte ich mal die funktion drin, die idle-time des users auszulesen. GetLastInput hiess die API, aber dann konnte man das programm unter win9x nicht mehr starten. kannst ja ausprobieren ;)

Olli 16. Aug 2005 11:52

Re: Admin
 
Zitat:

Zitat von phXql
GetLastInput hiess die API, aber dann konnte man das programm unter win9x nicht mehr starten. kannst ja ausprobieren ;)

Deswegen haben wir uns mit Luckie ja auch gewundert. Da es aber diese leeren Stubs in Win9x gibt, muß er es ja nicht extra dynamisch machen. Zumal es sowieso keine Win9x/Me-Nachfolger gibt oder geben wird!

Luckie 16. Aug 2005 12:31

Re: Admin
 
Ui, dann habe ich ja mal in Schwarze getippt. :) Aber wird noch nicht mal ERROR_NOT_SUPPORTED zurückgegeben?

Olli 16. Aug 2005 12:37

Re: Admin
 
Da wo was zurückgegeben wird, scheint das 0 zu sein, also ERROR_SUCCESS.

FriFra 16. Aug 2005 14:29

Re: Admin
 
Zitat:

Zitat von Olli
Also nochmal Glück gehabt, FriFra :zwinker: ... die tun nix, außer zu tun, daß dein Code tun tut :mrgreen:

Aber durch die vorangestellte Abfrage der Windowsversion tuts mein Code aber tatsächlich tun, denn ich lasse die "NT-Funktionen" in dem Fall noch nichtmal so tun als würden sie's tun und tue einfach sagen, dass ein Win9x User Admin ist :-D


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:57 Uhr.
Seite 3 von 3     123   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz