|
Post by held12345 on Apr 3, 2023 16:25:59 GMT -5
Hello, I need the pointer address of a variable for a dll.
how is the pointer address found?
Thanks. greeting
|
|
|
Post by tsh73 on Apr 3, 2023 16:58:18 GMT -5
|
|
|
Post by held12345 on Apr 4, 2023 5:35:34 GMT -5
Hello, I would like to pass the value 45 with the address org.x, please. but the result is 0. but the value 45 must come out again.
what am I doing wrong. the asm requests an address and gets the value from the address.
Thanks greeting
---------------------------------- OPEN "lbb_dll.dll" for dll as #handle
struct winrect, orgx as long orgx=45 calldll #handle, "adresse" , winrect as struct , erg as long print erg ----------------------------------
asm: ----------------------------------
ProcedureCDLL.l adresse(*adr) wertl.l =PeekL(*adr) ProcedureReturn wertl.l EndProcedure ----------------------------------
|
|
|
Post by Rod on Apr 4, 2023 7:50:08 GMT -5
To set a struct element you must use the struct name. so winrect.orgx = 45 not orgx = 45
|
|
|
Post by Walt Decker on Apr 4, 2023 9:03:01 GMT -5
Actually, it should be Winrect.orgx.struct = number
|
|
|
Post by held12345 on Apr 4, 2023 11:31:36 GMT -5
hello thanks , this is ok. wonderful learned a lot again.
procedure-dll: -------------------------- ProcedureCDLL.l adradd(*adr) a.l =PeekL(*adr) b.l =PeekL(*adr+4) wert.l=a.l+b.l ProcedureReturn wert.l EndProcedure --------------------------
lbb :
-------------------------- struct winrect, orgx as long , orgy as long
winrect.orgx.struct=7893 winrect.orgy.struct=1234 calldll #handle, "adradd" , winrect as struct , erg as long print erg ------------------------------------------------------------------
procedure-dll: -------------------------- ProcedureCDLL.l scrstruct(*adr) a.l = 2468 PokeL(*adr,a.l) b.l = 789 PokeL(*adr+4,b.l) EndProcedure --------------------------
lbb: -------------------------- calldll #handle, "scrstruct" , winrect as struct , erg as long print winrect.orgx.struct print winrect.orgy.struct --------------------------
what simple program do you use to create your dll for liberty basic? i have purebasic.
greeting
|
|