English
C ++ Forum

Problems with %IOResult and API-Rückgaben

 

Michael
Dell
Hi,

white you have plenty around the ears but eh ichs forget mail ichs time rather.

apparently there different %IOResult values.



here the Source:
CompileMarkSeparation
Def sErrMod(1) External("KERNEL32.DLL","SetErrorMode",&(1))

Proc DrvOK

    Parameters IDR_LW$
    Case (Len(IDR_LW$) < 1): Return -1
    IDR_LW$     = (Upper$(Left$(IDR_LW$,1)) + ":\")
    Var IDR_OEMod&  = sErrMod(1)
    Var IDR_OldDir$ = GetDir$("@")
    ChDir IDR_LW$
    Var ttt& = %IOResult
    sErrMod(IDR_OEMod&)
    ChDir IDR_OldDir$
    Return ttt&

EndProc

Window 280,160-640,480
Locate 2,0

WhileLoop 65,90

    Print (Chr$(&loop) + ":\ %IOResult = " + Str$(DrvOK(Chr$(&loop))))

EndWhile

WaitInput
End

following APIs should the same lever give back,
with Profan2CPP Gibts but NEN small Difference?
CompileMarkSeparation
Def GetClassLong(2) External("USER32.DLL","GetClassLongA",&(1),&(2))
Def GetCursor(0)    External("USER32.DLL","GetCursor")
Cls
Print ("GetClassLong()  = " + Str $(GetClassLong(%Desktop,-12)))
Print ("GetCursor()     = " + Str $(GetCursor()))                   here Gibts a small deviation (Real strange!)
WaitInput
End

5 kB
Kurzbeschreibung: example
Hochgeladen:12/18/08
Downloadcounter185
Download
3 kB
Kurzbeschreibung: %IOResult_Err
Hochgeladen:12/18/08
Downloadcounter330
Download
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
12/18/08  
 




Michael
Dell
Hi,

here yet ne Kleinigkeit The in a (zugegeben not vorgesehenen) drop even to that Crash Profan2CPP lead:
CompileMarkSeparation
Var T1! = ($7FFFFFFF * 4)
Var T2! = (2147483647 * 4)   Integer arithmetic overflow in function __stdcall ProfanThreadProc(void *) (Borland 5.5)
Programm wird erzeugt zeigt hier aber nur Quark an.
Var T1& = ($7FFFFFFF * 1)
Var T2& = (2147483647 * 1)   Integer arithmetic overflow in function __stdcall ProfanThreadProc(void *) (Borland 5.5)
Programm wird erzeugt zeigt hier aber nur Quark an.
Hier stürtzt Profan2CPP ab!!!! (XProfan igoriert es) aber der Fehler wird von beiden nicht gemeldet!
Def !XXXX1 ($7FFFFFFF * 4)
Def &XXXX2 (2147483647 * 1)
Cls
Print (       "T1! = " + Str$(T1!))
Print (       "T2! = " + Str$(T2!))
Print (     "
T1& = " + Str$(T1&))
Print (       "T2& = " + Str$(T2&))
Print ("
!XXXX1 = " + Str$(!XXXX1))
Print (    "&XXXX2 = " + Str$(&XXXX2))
WaitInput
End
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
12/18/08  
 




Sebastian
König
Hello Michael,

thanks for Notes! i'll try, me as soon as possible therefore To concern. with %IOResult I had in many Make objectively Problems, to find out, on which basis Delphi The values setting. Perhaps can I with your Testcode something find out. priority has naturally first the crash...

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
12/18/08  
 




Sebastian
König
Hello Michael,

after I me longer interval gegönnt have, be I now on the thing dran. whom Error, the to the crash lead, have I already fixed. The spending the Codes is nevertheless not The same under XProfan and Profan2Cpp, I unfortunately neither so simply Change can... there's however a einfachen Workaround, whom I anyhow as better Style bezeichnen would: If one expression whom LongInt-Wertebereich übersteigt and as Fließkommazahl treats go should, ought to of/ one the Operanden explizit a Fließkommazahl his. In Your example sufficient it already, in

Var T1! = ($7FFFFFFF * 4)

The 4 in 4.0 To Change.

I see me then times the thing with %IOResult on.

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
01/15/09  
 




Sebastian
König
Nachtrag: I have meanwhile The others Problems fixed. with Version 2.0a, The attend becomes, once I The Features of XProfan 11.1 ready umgesetzt have, ought to then everything correctly functions.
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
01/15/09  
 




Michael
Dell
class, thanks you
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
01/15/09  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.154 Views

Untitledvor 0 min.
funkheld12/17/13
Gary1234504/08/13
Achim Engelhardt12/21/12
Gabor Krizsma08/08/11
More...

Themeninformationen

this Topic has 2 subscriber:

Sebastian König (3x)
Michael Dell (3x)


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