English
Forum

Addon:) Problems (Kernel Mode)

 
- Page 1 -


What am I doing here wrong? (Windows2000/XP)
CompileMarkSeparation
Def @RtlInitUnicodeString(2) !"NTDLL","RtlInitAnsiString"
Def @RtlInitUnicodeString(2) !"NTDLL","RtlInitUnicodeString"
Def @RtlAnsiStringToUnicodeString(3) !"NTDLL","RtlAnsiStringToUnicodeString"
DEF @LsaNtStatusToWinError(1) !"advapi32","LsaNtStatusToWinError"
DEF @FormatMessage(7) !"KERNEL32","FormatMessageA"
Def @RtlInitAnsiString(2) !"NTDLL","RtlInitAnsiString"
Def @ZwOpenFile(6) !"NTDLL","ZwOpenFile"
Def @ZwClose(1) !"NTDLL","ZwClose"
Declare LSA_Unicode#,ANSI$,Unicode#,Fehler&,Ansi#
Declare AHRückgabe&,AHGETERROR_Buffer#,AHGETERROR_Buffer$
Declare FileHandle&,Status_Block&,Object_Attributes#
Windowstyle 31
WindowTitle "Datei auslesen mit Kernelmode APIs"
Window 0,0-640,440
LET ANSI$="??"+"F:EigenesMister RootUnload.CLL" Pfad bitte anpassen
Dim Ansi#,8
DIM Unicode#,514
DIM LSA_Unicode#,8
WORD LSA_Unicode#,0=0
WORD LSA_Unicode#,2=512
LONG LSA_Unicode#,4=UNICODE#
@RtlInitAnsiString(Ansi#,@ADDR(ANSI$))
LET Fehler&=@RtlAnsiStringToUnicodeString(LSA_Unicode#,Ansi#,0)
LET AHRÜCKGABE&=@LsaNtStatusToWinError(Fehler&)
Fehlercode_bestimmen
PRINT AHGETERROR_Buffer$
Print @Char$(UNICODE#,0,@LEN(ANSI$)*2)
DIM Object_Attributes#,24
Clear Object_Attributes#
Long Object_Attributes#,0=24
Long Object_Attributes#,4=0
Long Object_Attributes#,8=LSA_Unicode#
Long Object_Attributes#,12=$40
LET FEHLER&=@ZwOpenFile(@ADDR(FileHandle&),$110003,Object_Attributes#,@ADDR(Status_Block&),$1,$800 | $20 | $2 | $8)
LET AHRÜCKGABE&=@LsaNtStatusToWinError(Fehler&)
Fehlercode_bestimmen
PRINT "ZwOpenFile: "+AHGETERROR_Buffer$
LET FEHLER&=@ZwClose(FileHandle&)
LET AHRÜCKGABE&=@LsaNtStatusToWinError(Fehler&)
Fehlercode_bestimmen
PRINT "ZwClose: "+AHGETERROR_Buffer$
Dispose Unicode#
Dispose LSA_Unicode#

While 0=0

    Waitinput

wend

End

Proc Fehlercode_bestimmen

    DIM AHGETERROR_Buffer#,32000
    @FormatMessage($1000,0,AHRückgabe&,0,AHGETERROR_Buffer#,32000,0) Wandelt Fehlercode in Landesspezifische Message um.
    Let AHGETERROR_Buffer$=@trim$(@STRING$(AHGETERROR_Buffer#,0))
    Dispose AHGETERROR_Buffer#

/../function-references/XProfan/endproc/'>Endproc


Greeting

Andreas
 
10/27/06  
 



 
- Page 1 -


[quote:1695c7078e]@IF: take off a driver want You write? Perhaps can itself replace...[/quote:1695c7078e]
I need something very simple - what but Perhaps very therefore not at all so simply To manage is.

a Druckertreiber - the not Druckt - separate The File the To druckenden Dokumentes on a place the network copies.
 
10/28/06  
 



Dakannst You some from the what here standing Perhaps already use.
 
10/28/06  
 




Michael
Wodrich
[quote:25b82596d4]a Druckertreiber - the not Druckt - separate The File the To druckenden Dokumentes on a place the network copies.[/quote:25b82596d4]
it can itself but still eachone Druckertreiber so take on, the it in a File druckt.
by me runs the since year and day so (have namely none printer).

tuned is a Laserdrucker (Postscript). The File then subsequently with a Tool (WordToPdf) in a PDF-File gewandelt.

from OpenOffice does it naturally plainer, but any others Applications produce on these manner too a PDF.

If I then really time a Print of it need GEHTS with the PDF ex To friends...

Best wishes
Michael Wodrich

Have time quick nachgesehen: Canon C LBP 460PS
 
Programmieren, das spannendste Detektivspiel der Welt.
10/28/06  
 



 
- Page 2 -


not in a File print! there landed Yes The spending for the - what the printer on Steuerzeichen needed around the document To print! i will the FILE which printed would!
 
10/28/06  
 




Matthias
Arlt
have obigen code even too time tested: runs zufriedenstellend through (with two Erfolgsmeldungen...)
I see PRF 7.5 under WinXP
 
WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia
10/28/06  
 




Michael
Wodrich
PLAIN TEXT goes too. new printer arrange.

spending: in FILE
manufacturers: standard
printer: Generic / Text only
 
Programmieren, das spannendste Detektivspiel der Welt.
10/28/06  
 



no human wants PlainText!
 
10/28/06  
 




Michael
Wodrich
 
Programmieren, das spannendste Detektivspiel der Welt.
10/28/06  
 



we've us just not understood.

Drucke time one BMP with nem PlainText driver

i will the BMP! whom Content of File - or the File self.
 
10/28/06  
 




Sebastian
König
[quote:4330c926c2]i will the BMP! whom Content of File - or the File self.[/quote:4330c926c2]I bezweifle somehow, that the possible is... declared, The one Program to that Print aufruft, is Yes completely independent of irgendwelchen Files - it'll simply everything in a special DC gepinselt ...

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
10/29/06  
 



there the remainder Offtopic is => How see it with the Beantwoitung of my question from ?
 
10/29/06  
 



[quote:6f0b8b235d=Sebastian king][quote:6f0b8b235d]i will the BMP! whom Content of File - or the File self.[/quote:6f0b8b235d]I bezweifle somehow, that the possible is... declared, The one Program to that Print aufruft, is Yes completely independent of irgendwelchen Files - it'll simply everything in a special DC gepinselt ...

MfG

Sebastian[/quote:6f0b8b235d]
I see the likewise Sebastian! Specifically goes it me circa OpenOffice - Perhaps can me the help. Perhaps becomes the Druckertreiber but nevertheless the File sent - Perhaps must I only tricksen because I z.B. still a FilePrinter take - and whom Seiteneinstellungen festlege the z.B. in the head the Dokumentenname(File?) stand should. ever such a ploy hold.
 
10/29/06  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

9.056 Views

Untitledvor 0 min.
Setharial02/14/13
Michael Borowiak12/17/12

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie