English
Forum

Error Message: falser Parametertyp %...

 

funkheld
Hello, good day.
I have this program for XPSE something changed.
and it comes still a Error Message.
I find whom type of Error not:



where stick the ?
row 88 is in the XProfEd empty.
CompileMarkSeparation
 {$cleq}
Def CopyMemory(3) !"KERNEL32","RtlMoveMemory"
Declare Ende%, SendeBtn&, EndeBtn&, Edit&
Declare Groesse&, Text$, ProgHndl&, AltProc&
Declare CopyData#, EigeneDaten#
Struct SCopyData = ~COPYDATASTRUCT
Dim CopyData#, SCopyData
Window 20,20-400,400
WindowTitle "Programm2"
EndeBtn& = Create(Button,%hWnd,Beenden,105,50,70,20)
SendeBtn& = Create(Button,%hWnd,Senden,15,50,70,20)
Edit& = Create(Edit, %hWnd, , 10, 15, 170, 24)

Proc Senden

    Parameters Nachricht$

    With CopyData#

        .dwData& = 0
        .cbData& = SizeOf(Nachricht$)
        .lpData& = Addr(Nachricht$)

    EndWith

    Sendmessage(ProgHndl&,~WM_COPYDATA,%hWnd,Addr(CopyData#))

EndProc

Proc WndProc

    parameters wnd&, msg&, wparam&, lparam&

    If msg&=~WM_COPYDATA

        CopyMemory(CopyData#,lparam&,12)
        Groesse& = CopyData#.cbData&
        Dim EigeneDaten#, Groesse&
        CopyMemory(EigeneDaten#,CopyData#.lpData&,Groesse&)
        Text$ = String$(EigeneDaten#,0)
        Dispose EigeneDaten#

    EndIf

    return call(AltProc&,wnd&,msg&,wparam&,lparam&)

Endproc

AltProc&=~SetWindowLong(%hwnd,~GWL_WNDPROC,ProcAddr(WndProc,4))

While 1

    ProgHndl&=FindWindow("Programm2")
    Case ProgHndl&: Break
    Sleep 100

EndWhile

Usermessages ~WM_COPYDATA

WhileNot Ende%

    WaitInput

    If %Key = 2

        Ende% = 1

    ElseIf GetFocus(EndeBtn&)

        Ende% = 1

    ElseIf GetFocus(SendeBtn&)

        Senden GetText$(Edit&)

    ElseIf %umessage=~WM_COPYDATA

        SetText Edit&, Text$

    Endif

EndWhile

Dispo
CopyData# End

Thank you.

greeting
peter

31 kB
Hochgeladen:02/23/13
Downloadcounter43
Download
 
02/23/13  
 



type % So one Int -

presumably expects XProfan on the place no Int -

presumably with instructions How this:
CompileMarkSeparation
Create(Button,%hWnd,Beenden,105,50,70,20)
>

Dürfte so functions:
CompileMarkSeparation
Create("Button",%hWnd,"Beenden",105,50,70,20)
>

Nochwas:
CompileMarkSeparation
You show for a wProc on a interpretierte Proc -

go thereby of Programmabstürzen from, time here time there. for something like with ProcAddr

absolutely on a nProc show there these nativen functions APC- & threadsicher

are.
 
02/23/13  
 



Mainwindow Subclassing z.B. so:
CompileMarkSeparation
or without globale Variable:
CompileMarkSeparation
guaranteeing absturzsicher.

Related Examples end this Dokumentes: [...] 

Note:

XProfan-Fehlermeldungen-Fehlerzeile-indicated at employment with XPSE
should the Line in the dateiname.ENH-File correspond to.
 
02/23/13  
 




funkheld
Jup, thanks. have I now changed.
it launch, but freeze then one.
somehow is the program not whom latest stood.

Why the because now?
or have you got somewhere one Program , where one data from a window to that . Develop Send can ?

Thank you.

greeting
peter
 
02/23/13  
 



For this is the function sendMessage Yes there, circa data on Controls/ Window To Send.

so can integrally useful 3 ganzzahlige values übermitteln:
CompileMarkSeparation
 
02/23/13  
 



Nachtrag:

I see the You wm_copyData use want -

power eig. only sense if one More as 3 values übermitteln would like How z.B.

a Stringinhalt. wm_copyData as UserMessage can but not reliably

functions there to that Time the Auslesens of WP and LP The data not

More available stand (must) since the data normal only such a long time consist

To The Message The wProc access has. You can however wm_copyData-

übermittelte data in the wProc receive and from there weiterverwenden.
 
02/23/13  
 




funkheld
I have here something found. functions to my imaginations..

herewith send I now :
CompileMarkSeparation
 {$cleq}
Declare Ende&, senden&, Dlg&,wert&
declare IsActive&, InMemory&, SizeOfMem&, hmap&, hMapView&
Dlg&     = Create("Dialog", %hwnd, "Senden", 220, 190, 410, 280)
senden& = Create("Button", Dlg&, "Senden", 110, 220, 80, 30)
Ende&    = Create("Button", Dlg&, "Ende", 210, 220, 80, 30)
IsActive& = 0
InMemory& = 4000
'1024 Bytes Speicher
SizeOfMem& = 1024
'Speicherbereich anlegen
hmap&     = ~CreateFileMapping(-1,0,~PAGE_READWRITE,0,SizeOfMem&,"MeinSpeicher")
'Zeiger auf Speicherbereich ermitteln
hMapView& = ~MapViewOfFile(hMap&,$000F001F, 0, 0, 0)
'die ersten 4 Bytes erhalten das Fensterhandle
Long   hMapView&,0 = %hwnd
'die nächsten 4 Bytes bleiben frei für das Fensterhandle von Programm 2
wert&=0

WhileNot @Clicked(Ende&)

    WaitInput

    If @Clicked(senden&)

        If Long(hMapView&,4) <> 0

            IsActive& = 1

        Endif

        dat_send

    EndIf

EndWhile

End

proc dat_send

    wert&=wert&+1
    long hMapView&,8 = wert&

    If IsActive&

        sendMessage(Long(hMapView&,4),InMemory&,0,0)

    endif

endproc


herewith becomes receive:
CompileMarkSeparation
 {$cleq}
Declare IsActive&, InMemory& , Ende&, SizeOfMem&, hmap&, hMapView&
IsActive& = 0
InMemory& = 4000
Ende& = 0
'1024 Bytes memory
SizeOfMem& = 1024
'Speicherbereich lay out
hmap& = ~CreateFileMapping(-1,0,~PAGE_READWRITE,0,SizeOfMem&,"MeinSpeicher")
'Zeiger on Speicherbereich detect
hMapView& = ~MapViewOfFile(hMap&,$000F001F, 0, 0, 0)
Cls
'The second 4 Bytes receive the Fensterhandle
Long hMapView&,4 = %hwnd
User Messages InMemory&

whilenot Ende&

    Waitinput

    If %UMessage = InMemory&

        Print long(hMapview&,8)

    Endif

EndWhile

~UnmapViewOfFile(hMapView&)
~CloseHandle(hMapView&)
End

becomes these : %UMessage jedesmal to the durchlauf on "0" staid and new described with of/ one new Übertragung or remaining with the first link %UMessage on the worth InMemory& ?

Thank you.

greeting
peter
 
02/24/13  
 



look time hiernach Better get going on 0 staid:
CompileMarkSeparation
 {$cleq}
cls
usermessages 12345
sendMessage(hWnd,12345,0,1)
sendMessage(hWnd,12345,0,2)
sendMessage(hWnd,12345,0,3)

do{

    waitinput 1000
    case %uMessage : print ulParam

/font>


because The spending sounds:

321
 
02/24/13  
 




funkheld
Jup, thanks.
now can I The Sendmessage discern or sort.

greeting
peter
 
02/24/13  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.782 Views

Untitledvor 0 min.
Andreas Koch09/10/14
Ernst05/12/14
Nico Madysa02/20/14
mein06/02/13
More...

Themeninformationen

this Topic has 2 subscriber:

iF (5x)
funkheld (4x)


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