RE: DLL Automatic Wrapper Generator
- Posted by bensler at mail.com Feb 28, 2002
- 528 views
Here is the wrapper file that is generated by DAWG using the link_list from my previous post ... Chris <win32_wrap.e> -- wrapper file generated using dawg.e by Chris Bensler ------------------------------------------------------------ include dll_wrap.e -- link to the DLL's global constant user32_dll = link_dll("user32.dll") global constant gdi32_dll = link_dll("gdi32.dll") global constant winmm_dll = link_dll("winmm.dll") -- link to the c_func's global constant xLoadIconA = link_c_func(user32_dll, "LoadIconA", {C_UINT,C_INT}, C_INT) global constant xLoadCursorA = link_c_func(user32_dll, "LoadCursorA", {C_UINT,C_INT}, C_INT) global constant xRegisterClassExA = link_c_func(user32_dll, "RegisterClassExA", {C_UINT}, C_INT) global constant xCreateWindowExA = link_c_func(user32_dll, "CreateWindowExA", _INT,C_INT,C_INT,C_INT,C_INT,C_INT,C_INT,C_INT,C_INT,C_INT,C_INT,C_INT}, C_INT) global constant xGetMessageA = link_c_func(user32_dll, "GetMessageA", {C_INT,C_INT,C_INT,C_INT}, C_INT) global constant xBeginPaint = link_c_func(user32_dll, "BeginPaint", {C_INT,C_UINT}, C_INT) global constant xDefWindowProcA = link_c_func(user32_dll, "DefWindowProcA", {C_INT,C_INT,C_INT,C_INT}, C_INT) global constant xGetStockObject = link_c_func(gdi32_dll, "GetStockObject", {C_INT}, C_INT) -- link to the c_proc's global constant xShowWindow = link_c_proc(user32_dll, "ShowWindow", {C_INT,C_INT}) global constant xUpdateWindow = link_c_proc(user32_dll, "UpdateWindow", {C_INT}) global constant xTranslateMessage = link_c_proc(user32_dll, "TranslateMessage", {C_INT}) global constant xDispatchMessageA = link_c_proc(user32_dll, "DispatchMessageA", {C_INT}) global constant xGetClientRect = link_c_proc(user32_dll, "GetClientRect", {C_INT,C_UINT}) global constant xDrawTextA = link_c_proc(user32_dll, "DrawTextA", {C_INT,C_INT,C_INT,C_INT,C_INT}) global constant xEndPaint = link_c_proc(user32_dll, "EndPaint", {C_INT,C_INT}) global constant xPostQuitMessage = link_c_proc(user32_dll, "PostQuitMessage", {C_INT}) global constant xPlaySound = link_c_proc(winmm_dll, "PlaySound", {C_INT,C_INT,C_INT}) ----------------------------- -- c_func wrappers -- global function LoadIconA(atom arg1,atom arg2) return c_func(xLoadIconA,{arg1,arg2}) end function global function LoadCursorA(atom arg1,atom arg2) return c_func(xLoadCursorA,{arg1,arg2}) end function global function RegisterClassExA(atom arg1) return c_func(xRegisterClassExA,{arg1}) end function global function CreateWindowExA(atom arg1,atom arg2,atom arg3,atom arg4,atom arg5,atom arg6,atom arg7,atom arg8,atom arg9,atom arg10,atom arg11,atom arg12) return c_func(xCreateWindowExA,{arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12}) end function global procedure ShowWindow(atom arg1,atom arg2) c_proc(xShowWindow,{arg1,arg2}) end procedure global procedure UpdateWindow(atom arg1) c_proc(xUpdateWindow,{arg1}) end procedure global function GetMessageA(atom arg1,atom arg2,atom arg3,atom arg4) return c_func(xGetMessageA,{arg1,arg2,arg3,arg4}) end function global procedure TranslateMessage(atom arg1) c_proc(xTranslateMessage,{arg1}) end procedure global procedure DispatchMessageA(atom arg1) c_proc(xDispatchMessageA,{arg1}) end procedure global function BeginPaint(atom arg1,atom arg2) return c_func(xBeginPaint,{arg1,arg2}) end function global procedure GetClientRect(atom arg1,atom arg2) c_proc(xGetClientRect,{arg1,arg2}) end procedure global procedure DrawTextA(atom arg1,atom arg2,atom arg3,atom arg4,atom arg5) c_proc(xDrawTextA,{arg1,arg2,arg3,arg4,arg5}) end procedure global procedure EndPaint(atom arg1,atom arg2) c_proc(xEndPaint,{arg1,arg2}) end procedure global procedure PostQuitMessage(atom arg1) c_proc(xPostQuitMessage,{arg1}) end procedure global function DefWindowProcA(atom arg1,atom arg2,atom arg3,atom arg4) return c_func(xDefWindowProcA,{arg1,arg2,arg3,arg4}) end function global function GetStockObject(atom arg1) return c_func(xGetStockObject,{arg1}) end function global procedure PlaySound(atom arg1,atom arg2,atom arg3) c_proc(xPlaySound,{arg1,arg2,arg3}) end procedure