English
Forum

Done: Unicode: Strange behavior

 

Nico
Madysa
a Greeting all daraußen.

these the offizielle successor hiervon: [...]  . this time diving one very seltsamer Error in quasi the same code on. to recollection be it once more (in negligible gekürzter shape) viewed:
CompileMarkSeparation
 $H Messages.ph
var id% = 1
Struct CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
Struct LVCOLUMN = Mask&, FMT&, CX&, Text&, cchTextMaxLen&, Subitem&
Struct LVITEM = IMASK&, ITEM&, ISUBITEM&, State&, StateMask&, ITEXT&, ITEXTMAX&, IIMAGE&, ILPARAM&

proc CreateW

    if %pCount > 10

        parameters Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&

    else

        parameters Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&
        var exstyle& = 0

    endif

    var cs# = New(CREATESTRUCT)

    With cs#

        .lpCreateParams& = SizeOf(cs#)
        .hInstance& = hInst&
        .hMenu& = if(u_IsMenu(id%),id%,0)
        .hwndParent& = pWnd&
        .cy% = dy%
        .cx% = dx%
        .y% = y%
        .x% = x%
        .style& = style&
        .lpszName& = Addr(Name$)
        .lpszClass& = Addr(Class$)
        .dwExStyle& = exstyle&

    EndWith

    var handle& = u_CreateWindowExW(exstyle&,Addr(Class$),Addr(Name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
    inc id%

    ifnot handle&

        Class$ = WinError$(%WinError)
        MessageBox("Es trat folgender Fehler auf:
        " + Class$,"F E H L E R !!!",4096)

    endif

    Dispose cs#
    return handle&

endproc

subproc Create.GridBoxW

    parameters pWnd&,def$,stl%,x%,y%,dx%,dy%
    declare s$
    var hList& = CreateW("SzyzszLzizsztzVzizezwz3z2zzz","",$50000009 + stl%,x%,y%,dx%,dy%,pWnd&,0,%hInstance,$200)
    u_SendMessageW(hList&,$1036,0,$00000023)
    var LVC# = New(LVCOLUMN)

    With LVC#

        .Subitem& = 0
        .MASK& = $7

        whileloop 0,(len(def$,";")  3) - 1

            s$ = SubStr$(def$,3*&loop + 1,";")
            .TEXT& = Addr(s$)
            .FMT&  = val(SubStr$(def$,3*&loop + 2,";"))
            .CX&   = val(SubStr$(def$,3*&loop + 3,";"))
            .cchTextMaxLen& = len(s$)
            u_SendMessageW(hList&,$1061,&loop,LVC#)

        EndWhile

    EndWith

    Dispose LVC#
    return hList&

endproc

proc InsertStringW

    parameters pList&,s$,index%
    declare ss$
    var LVI# = New(LVITEM)
    var d$ = Get("ListDel") + "z"

    With LVI#

        .IMASK&=$1
        .ITEM& = index%

        whileloop len(s$,d$)

            ss$ = SubStr$(s$,&loop,d$)
            .iText& = Addr(ss$)
            .ITEXTMAX& = len(ss$)
            .ISUBITEM& = &loop - 1

            ifnot &loop - 1

                u_SendMessageW(pList&,$104D,index%,LVI#)

            else

                u_SendMessageW(pList&,$104C,index%,LVI#)

            endif

        EndWhile

    EndWith

    Dispose LVI#

endproc

proc LoadText

    parameters d$
    declare a$
    case d$ = "" : return
    Die CSV-Datei wird eingelesen
    declare b#,t$,tt$
    Dim b#,FileSize(d$)
    BlockRead(d$,b#,0,SizeOf(b#))
    d$ = Char$(b#,2,SizeOf(b#)-2)
    Dispose b#
    Die Zeilen werden im Sortier-Listview alphabetisch geordnet

    whileloop 0,len(d$,"x0Dzx0Az")-1

        a$ = "Mzeziznz;zVzezrzszuzczhz!z"
        a$ = SubStr$(d$,&loop+1,"x0Dzx0Az")
        WindowTitle Translate$(a$,"z","|")
        InsertStringW(hSortDP&,a$,&loop)
        InsertStringW(hSortDP&,SubStr$(d$,&loop+1,"x0Dzx0Az"),&loop)

    EndWhile

    Die Substrings jeder Zeile sind mit einem Semikolon getrennt
    Set("ListDel",";")
    Das Sortier-Listview wird ins Anzeigelistview übertragen
    Aus einer Spalte werden zwei
    var LVI# = New(LVITEM)
    LVI#.IMASK&= $1
    LVI#.ITEXT&= LVI#+36
    LVI#.ITEXTMAX& = 200
    LVI#.ISUBITEM& = 0

    whileloop 0, Getcount(hSortDP&) -1

        LVI#.ITEM& = &loop
        u_SendMessageW(hSortDP&,$1073,&loop,LVI#)Text auslesen
        Dim b#,200
        b# = LVI#.iText&
        d$ = Char$(b#,0,SizeOf(b#))In Stringvariable schreiben
        InsertStringW(hList&,d$,&loop)übertragen
        Dispose b#

    EndWhile

    Dispose LVI#

endproc

declare hUser&,hGDI&,hKrnl&
declare hSortDP&,hList&
cls
var font& = Create("Font","Times New Roman",16,0,0,0,0)
hUser& = ImportDLL("USER32","u_")
hSortDP& = Create("GridBoxW",%hWnd,";0;100",$10,0,0,0,0)
ShowWindow(hSortDP&,0)
hList& = Create("GridBoxW",%hWnd,";0;300;;0;300",$00,0,0,width(%hWnd),height(%hWnd))
SetFont hList&,font&
WindowTitle "Bitte warten, Wortliste wird geladen ..."
Format
LoadText LoadFile$("Testdatei laden","Test.txt")
WindowTitle "Je 100 deutsche und polnische Wörter"

whilenot IsKey(27)

    waitinput

wend

FreeDLL hUser&
FreeDLL hGDI&
FreeDLL hKrnl&
DeleteObject font&
end

plenty Text circa little Weird, decide are namely The subesquent Lines:
CompileMarkSeparation
whileloop 0,len(d$,"x0Dzx0Az")-1

    a$ = "Mzeziznz;zVzezrzszuzczhz!z"
    a$ = SubStr$(d$,&loop+1,"x0Dzx0Az")
    Window Title Translate$(a$,"z","|")
    InsertStringW(hSortDP&,a$,&loop)
    InsertStringW(hSortDP&,SubStr$(d$,&loop+1,"x0Dzx0Az"),&loop)

EndWhile


here crashes the code in the later row
CompileMarkSeparation
b# = LVI#.iText&
sang- and klanglos ex. now The really verwunderlichen Beobachtungen:
1. the Compilations operates fehlerfrei.
2. take I do not whom detour over a$, separate füge whom Substring immediate one (row 2 and 4 lane, for row 5), so there none Error.
3. take I no unterschiedlichen Texts, separate a solid Probetext (row 2 lane, for row 1), so there ditto none Error.
4. Item runs everything fehlerfrei, if I The The above-mentioned row with Window Title entkommentiere. on the Prozessorauslastun can it however not lying, because füge I instead of of Window Title Sleep one, so crashes the code ditto ex.

the were now four ways, this Error To bypass. still has someone a Idea, Why it at all appears? Each this four Solutions (except Perhaps number 3) ought to really quite no bearing and have still prevent tappt im dunkeln whom Programmabsturz.
Dietmar what about me are with unserem Latein end, still Perhaps see 46 eyes More as 4.

it verbleibt ratlos

Nico Madysa
 
Nico Madysa
07/10/09  
 




Frank
Abbing
i'd say, the trouble are The Strings. Unicode-Strings using as Endekennung still two Nullbytes, Profan one.
 
07/10/09  
 




Dietmar
Horn
i'd my, here has Roland yet something overlooking, what in the Interpreter to that crash lead but as Compilat against it fehlerfrei functions.

if the really only on whom unterschiedlichen Endekennungen lying ought to, then müßten to my understanding still any of Nico durchgespielten mutants crash, or itself at least in the Interpreter and compiliert identical behaviour (independent of it, whether always crash or always no crash).

Greeting
Dietmar
 
Multimedia für Jugendliche und junge Erwachsene - MMJ Hoyerswerda e.V.  [...] 

Windows 95 bis Windows 7
Profan² 6.6 bis XProfan X2 mit XPSE

Das große XProfan-Lehrbuch:  [...] 
07/10/09  
 




Thomas
Freier
everything strange. The *.exe created with profed32.exe runs through.
The *.exe with XProfEd32.exe created breaks with the Error Message : row 26, a# not declariert. a# eingefügt and goes it with the whole alphabet moreover???

Error can I not search, there momentarily Trabbel with the Laptop. DVD-drive becomes only yet as CD-drive recognized and the hints in the WEB and old Abbilder could the trouble not to fix. at that straighten up found I yet whom attachment (useable?) and KilletSoft Data Conversion Freeware: [...] 

275 kB
Hochgeladen:07/10/09
Downloadcounter64
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
07/10/09  
 



only short überflogen, but I hope, your überseht not, that the Speicherbereich for class to terminate the function verflogen is.

Perhaps. rather here with z.B. globalAlloc a handle for a memory fetch and the structure dareinkopieren.
 
07/10/09  
 




Nico
Madysa
Hmm, yet More Merkwürdigkeiten:
5. i'm noticed, that LVI# in InsertStringW end not disposed becomes. means have I end Dispose LVI# eingefügt. Result: Crash.
6. thereafter is me noticed, that the using area in LoadText UND InsertStringW LVI# is, and so I it in InsertStringW in p_LVI# umbenannt have. Result: Crash; alike, whether p_LVI# disposed becomes or not.

my eigentliches trouble exists therein, that all solcherlei Changes How z.B. spending through Window Title at all no Auswirkungen having should. too, that it in the Interpreter hakt and as Exe durchläuft, can me slow believe, that the Error somewhere in Profan self stick. Roland will moreover sure soon To word report, gell?

@iF: which class and which function Dou you mean because?
 
Nico Madysa
07/11/09  
 



Sorry, Structures are for me too "nur" classes. ^^

I mean cs# in CreateW.

take still NEN globalAlloc and copies whom Content of cs# into and observes you the lever in z.B. one dyn.Array and commit on u_CreateWindowExW the lever instead of cs#. (because I me now not sure be, whether u_CreateWindowExW WinXP? for itself saves or this gladly receive see would like.)

where I see strain, Strings How class$ should to leave the function likewise "futsch" his.
 
07/11/09  
 




Nico
Madysa
so, How I The Win32.hlp read, has cs# quite nothing with the thing with the thing To do, because this is only one area, the on The Message WM_CREATE relayed becomes. The only benefit is, that the erstellte Control begreift, what its. thereafter ought to it really completely unnecessary his.
 
Nico Madysa
07/11/09  
 




Frank
Abbing
Stell sure, that your Strings everywhere in your code end two Nullbytes having, where always You XProfan-Strings together with Unicode-Strings using. Dass it sometimes functions and sometimes not, deutet for me hereon there, that not always the case is. in the Zweifelsfall instead Speicherbereiche use.
whether You area# or GlobalAlloc-Memory using is really piepegal. is both the same.
 
07/11/09  
 




Nico
Madysa
so, means I see, nothing, I yet can make:
CompileMarkSeparation
 $H Messages.ph
var id% = 1
Struct CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
Struct LVCOLUMN = Mask&, FMT&, CX&, Text&, cchTextMaxLen&, Subitem&
Struct LVITEM = IMASK&, ITEM&, ISUBITEM&, State&, StateMask&, ITEXT&, ITEXTMAX&, IIMAGE&, ILPARAM&

proc UTF

    parameters text$
    declare b#
    Dim b#,2*len(text$)+2
    StringW b#,0 = text$
    text$ = Char$(b#,0,SizeOf(b#)-2)
    return text$

endproc

proc CreateW

    if %pCount > 10

        parameters Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&

    else

        parameters Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&
        var exstyle& = 0

    endif

    Class$ = UTF(Class$)
    Name$ = UTF(Name$)
    var cs# = New(CREATESTRUCT)

    With cs#

        .lpCreateParams& = SizeOf(cs#)
        .hInstance& = hInst&
        .hMenu& = if(u_IsMenu(id%),id%,0)
        .hwndParent& = pWnd&
        .cy% = dy%
        .cx% = dx%
        .y% = y%
        .x% = x%
        .style& = style&
        .lpszName& = Addr(Name$)
        .lpszClass& = Addr(Class$)
        .dwExStyle& = exstyle&

    EndWith

    var handle& = u_CreateWindowExW(exstyle&,Addr(Class$),Addr(Name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
    inc id%

    ifnot handle&

        Class$ = WinError$(%WinError)
        MessageBox(Es trat folgender Fehler auf:
        + Class$,F E H L E R !!!,4096)

    endif

    Dispose cs#
    return handle&

endproc

subproc Create.GridBoxW

    parameters pWnd&,def$,stl%,x%,y%,dx%,dy%
    declare s$
    var hList& = CreateW(SysListView32,,$50000009 + stl%,x%,y%,dx%,dy%,pWnd&,0,%hInstance,$200)
    u_SendMessageW(hList&,$1036,0,$00000023)
    var LVC# = New(LVCOLUMN)

    With LVC#

        .Subitem& = 0
        .MASK& = $7

        whileloop 0,(len(def$,;)  3) - 1

            s$ = SubStr$(def$,3*&loop + 1,;)
            .TEXT& = Addr(s$)
            .FMT&  = val(SubStr$(def$,3*&loop + 2,;))
            .CX&   = val(SubStr$(def$,3*&loop + 3,;))
            .cchTextMaxLen& = len(s$)
            u_SendMessageW(hList&,$1061,&loop,LVC#)

        EndWhile

    EndWith

    Dispose LVC#
    return hList&

endproc

proc InsertStringW

    parameters pList&,s$,index%
    declare ss$
    var LVI# = New(LVITEM)
    var d$ = UTF(Get(ListDel))

    With LVI#

        .IMASK&=$1
        .ITEM& = index%

        whileloop len(s$,d$)

            ss$ = SubStr$(s$,&loop,d$)
            .iText& = Addr(ss$)
            .ITEXTMAX& = len(ss$)
            .ISUBITEM& = &loop - 1

            ifnot &loop - 1

                u_SendMessageW(pList&,$104D,index%,LVI#)

            else

                u_SendMessageW(pList&,$104C,index%,LVI#)

            endif

        EndWhile

    EndWith

endproc

proc LoadText

    parameters d$
    declare a$
    case d$ =  : return
    Die CSV-Datei wird eingelesen
    declare b#,t$,tt$
    Dim b#,FileSize(d$)
    BlockRead(d$,b#,0,SizeOf(b#))
    d$ = Char$(b#,2,SizeOf(b#)-2)
    Dispose b#
    Die Zeilen werden im Sortier-Listview alphabetisch geordnet

    whileloop 0,len(d$,x0Dzx0Az)-1

        a$ = SubStr$(d$,&loop+1,x0Dzx0Az) DIES IST DIE BETROFFENE ZEILE
        InsertStringW(hSort&,SubStr$(d$,&loop+1,x0Dzx0Az),&loop)

    EndWhile

    Die Substrings jeder Zeile sind mit einem Semikolon getrennt
    Set(ListDel,;)
    Das Sortier-Listview wird ins Anzeigelistview übertragen
    Aus einer Spalte werden zwei
    var LVI# = New(LVITEM)
    LVI#.IMASK&= $1
    LVI#.ITEXT&= LVI#+36
    LVI#.ITEXTMAX& = 200
    LVI#.ISUBITEM& = 0

    whileloop 0, Getcount(hSort&) -1

        LVI#.ITEM& = &loop
        u_SendMessageW(hSort&,$1073,&loop,LVI#)Text auslesen
        Dim b#,200
        b# = LVI#.iText&
        d$ = Char$(b#,0,SizeOf(b#))In Stringvariable schreiben
        InsertStringW(hList&,d$,&loop)übertragen
        Dispose b#

    EndWhile

    Dispose LVI#

endproc

declare hUser&,hGDI&,hKrnl&
declare hSort&,hList&
cls
var font& = Create(Font,Times New Roman,16,0,0,0,0)
hUser& = ImportDLL(USER32,u_)
hSort& = Create(GridBoxW,%hWnd,UTF(Sortieren)+;0;100,$10,0,0,0,0)
ShowWindow(hSort&,0)
hList& = Create(GridBoxW,%hWnd,UTF(Deutsch)+;0;300;+UTF(Polnisch)+;2;300,$00,0,0,width(%hWnd),height(%hWnd))
SetFont hList&,font&
WindowTitle Bitte warten, Wortliste wird geladen ...
Format
Wort1;Wort2
Wort3;Wort4;...
LoadText LoadFile$(Quelldatei laden ...,deupol.txt)
WindowTitle Je 100 deutsche und polnische Wörter (ESC um zu sichern)

whilenot IsKey(27)

    waitinput

wend

FreeDLL hUser&
FreeDLL hGDI&
FreeDLL hKrnl&
DeleteObject font&
end

The kuriose row is a$ = SubStr$(d$,&loop+1,x0Dzx0Az). is tappt im dunkeln auskommentiert, so runs everything wonderful, operates tappt im dunkeln against with (though tappt im dunkeln quite none Einfluss having ought to), so standing in the first row Aaahen, instead of Aachen.
I see me simply not able, a Error in a chaotic code to find. If I do not straight yet through Zufalle hereon stoße, be I really so far, windows or Profan The thing into shoes To schieben.

@Frank:
theoretical should The two Abschlussbytes without interest his, because The Listviewmessages desires always The detailed Pufferlänge, The in the quality iTextMax& indicated his must. tappt im dunkeln desires no Abschlussbytes.
useful have I, circa sure to go, nevertheless following Line in InsertStringW changed:
CompileMarkSeparation
from
ss$ = SubStr$(s$,&loop,d$)
watts
ss$ = SubStr$(s$,&loop,d$) + zz

I have the String, the live on The Message goes, two Nullbytes added. (and plenty More Unicode-Messages as in InsertStringW come in the whole code not till.) the Result has me not surprised: crash.
 
Nico Madysa
07/12/09  
 



you should Perhaps simply for memory, The You for Stringinhalte uses and on Apis commit, not XProfan-Strings use.
CompileMarkSeparation
 
07/12/09  
 




Nico
Madysa
Your peace of mind zuliebe have ichs done.
CompileMarkSeparation
 $H Messages.ph
var id% = 1
Struct CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
Struct LVCOLUMN = Mask&, FMT&, CX&, Text&, cchTextMaxLen&, Subitem&
Struct LVITEM = IMASK&, ITEM&, ISUBITEM&, State&, StateMask&, ITEXT&, ITEXTMAX&, IIMAGE&, ILPARAM&
Def GlobalAlloc(2) !"KERNEL32","GlobalAlloc"
Def GlobalFree(1) !"KERNEL32","GlobalFree"

proc UTF

    parameters text$
    declare b#
    Dim b#,2*len(text$)+2
    StringW b#,0 = text$
    text$ = Char$(b#,0,SizeOf(b#)-2)
    return text$

endproc

proc CreateW

    if %pCount > 10

        parameters Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&

    else

        parameters Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&
        var exstyle& = 0

    endif

    Class$ = UTF(Class$)
    Name$ = UTF(Name$)
    var cs# = New(CREATESTRUCT)

    With cs#

        .lpCreateParams& = SizeOf(cs#)
        .hInstance& = hInst&
        .hMenu& = if(u_IsMenu(id%),id%,0)
        .hwndParent& = pWnd&
        .cy% = dy%
        .cx% = dx%
        .y% = y%
        .x% = x%
        .style& = style&
        .lpszName& = Addr(Name$)
        .lpszClass& = Addr(Class$)
        .dwExStyle& = exstyle&

    EndWith

    var handle& = u_CreateWindowExW(exstyle&,Addr(Class$),Addr(Name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
    inc id%

    ifnot handle&

        Class$ = WinError$(%WinError)
        MessageBox("Es trat folgender Fehler auf:
        " + Class$,"F E H L E R !!!",4096)

    endif

    Dispose cs#
    return handle&

endproc

subproc Create.GridBoxW

    parameters pWnd&,def$,stl%,x%,y%,dx%,dy%
    declare s$
    var hList& = CreateW("SysListView32","",$50000009 + stl%,x%,y%,dx%,dy%,pWnd&,0,%hInstance,$200)
    u_SendMessageW(hList&,$1036,0,$00000023)
    var LVC# = New(LVCOLUMN)

    With LVC#

        .Subitem& = 0
        .MASK& = $7

        whileloop 0,(len(def$,";")  3) - 1

            s$ = SubStr$(def$,3*&loop + 1,";")
            .TEXT& = Addr(s$)
            .FMT&  = val(SubStr$(def$,3*&loop + 2,";"))
            .CX&   = val(SubStr$(def$,3*&loop + 3,";"))
            .cchTextMaxLen& = len(s$)
            u_SendMessageW(hList&,$1061,&loop,LVC#)

        EndWhile

    EndWith

    Dispose LVC#
    return hList&

endproc

proc InsertStringW

    parameters pList&,s$,index%
    declare ss$,palloc&
    var LVI# = New(LVITEM)
    var d$ = UTF(Get("ListDel"))

    With LVI#

        .IMASK&=$1
        .ITEM& = index%

        whileloop len(s$,d$)

            ss$ = SubStr$(s$,&loop,d$) + "zz"
            palloc& = GlobalAlloc($40,len(ss$))
            Char palloc&,0 = ss$
            .iText& = palloc&
            .ITEXTMAX& = len(ss$)
            .ISUBITEM& = &loop - 1

            ifnot &loop - 1

                u_SendMessageW(pList&,$104D,index%,LVI#)

            else

                u_SendMessageW(pList&,$104C,index%,LVI#)

            endif

            GlobalFree(palloc&)

        EndWhile

    EndWith

endproc

proc LoadText

    parameters d$
    declare a$
    case d$ = "" : return
    Die CSV-Datei wird eingelesen
    declare b#,t$,tt$ , alloc&
    Dim b#,FileSize(d$)
    BlockRead(d$,b#,0,SizeOf(b#))
    d$ = Char$(b#,2,SizeOf(b#)-2)
    Dispose b#
    Die Zeilen werden im Sortier-Listview alphabetisch geordnet

    whileloop 0,len(d$,"x0Dzx0Az")-1

        a$ = SubStr$(d$,&loop+1,"x0Dzx0Az") DIES IST DIE BETROFFENE ZEILE
        InsertStringW(hSort&,a$,&loop)

    EndWhile

    Die Substrings jeder Zeile sind mit einem Semikolon getrennt
    Set("ListDel",";")
    Das Sortier-Listview wird ins Anzeigelistview übertragen
    Aus einer Spalte werden zwei
    var LVI# = New(LVITEM)
    LVI#.IMASK&= $1
    LVI#.ITEXT&= LVI#+36
    LVI#.ITEXTMAX& = 200
    LVI#.ISUBITEM& = 0

    whileloop 0, Getcount(hSort&) -1

        LVI#.ITEM& = &loop
        u_SendMessageW(hSort&,$1073,&loop,LVI#)Text auslesen
        Dim b#,200
        b# = LVI#.iText&
        d$ = Char$(b#,0,SizeOf(b#))In Stringvariable schreiben
        InsertStringW(hList&,d$,&loop)übertragen
        Dispose b#

    EndWhile

    Dispose LVI#

endproc

declare hUser&,hGDI&,hKrnl&
declare hSort&,hList&
cls
var font& = Create("Font","Times New Roman",16,0,0,0,0)
hUser& = ImportDLL("USER32","u_")
hSort& = Create("GridBoxW",%hWnd,UTF("Sortieren")+";0;100",$10,0,0,0,0)
ShowWindow(hSort&,0)
hList& = Create("GridBoxW",%hWnd,UTF("Deutsch")+";0;300;"+UTF("Polnisch")+";2;300",$00,0,0,width(%hWnd),height(%hWnd))
SetFont hList&,font&
WindowTitle "Bitte warten, Wortliste wird geladen ..."
Format
"Wort1;Wort2
Wort3;Wort4;..."
LoadText LoadFile$("Quelldatei laden ...","deupol.txt")
WindowTitle "Je 100 deutsche und polnische Wörter (ESC um zu sichern)"

whilenot IsKey(27)

    waitinput

wend

FreeDLL hUser&
FreeDLL hGDI&
FreeDLL hKrnl&
DeleteObject font&
end

what about me must say, that me The Überraschungen less and less surprise.
7. after I InsertStringW on GlobalAlloc umgestellt having, had any Entries unsinnige Schwänzchen.
8. after I then too yet The Entries each circa two Nullbytes extended having, having it again so How in the Original functions. (can me anybody whom Difference between the address one Speicherbereiches with the length len(ss$) and the address one Profanstrings with the length len(ss$) explain?)
9. after I The seltsame row a$ = SubStr$(d$,&loop+1,"x0Dzx0A z") again eingefügt have, has no Difference yield. this normal behaviour has me of everything on the most surprised.
10. there a$ = SubStr$(d$,&loop+1,"x0Dzx0A z") counts, have I me kackfrech virtual, I could the SubStr$(d$,&loop+1,"x0Dzx0A z") the subesquent row with a$ supplant -- as original too virtual was. mistake! make I this, so sounds the first entry again "Aaahen" instead of "Aachen" and some others Entries go too verhunzt.

PS: must one The GlobalAllocs really just as move How Profan-reaches, means to the schema area# = Long&, or need those for a suitable Style?
 
Nico Madysa
07/12/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

9.970 Views

Untitledvor 0 min.
Sven Bader02/25/21
Manfred Barei02/23/20
gerd10/05/13
Christian Hahn12/28/12
More...

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