Re: Proc in procedure

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hello Ferdinand,

>Hi. How can I use c_proc() in a procedure ? As far as I know, you cant do 
>that. Thanx

I think you can. Its just like using it anywhere else. First you must 
define_c_proc() of course. You'd probably want to define the c proc outside 
of the euphoria procedure but I guess you could do it all inside. I get the 
feeling I'm not understanding the question completely or else you haven't 
actually tried it yourself. ?? Here is the example in the Eu docs that shows 
how to define a c proc and call it.


atom user32, hwnd, rect
integer GetClientRect

-- open user32.dll - it contains the GetClientRect C function
user32 = open_dll("user32.dll")

-- GetClientRect is a VOID C function that takes a C int
-- and a C pointer as its arguments:
GetClientRect = define_c_proc(user32, "GetClientRect",
                              {C_INT, C_POINTER})

-- pass hwnd and rect as the arguments
c_proc(GetClientRect, {hwnd, rect})


later,
Lewis Townsend

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu