Re: Proc in procedure
- Posted by Lewis Townsend <keroltarr at HOTMAIL.COM> Jul 06, 2001
- 418 views
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