2
0
Эх сурвалжийг харах

Fixed win32 api args and struct ordering.

woollybah 8 жил өмнө
parent
commit
2189abb2ed

+ 78 - 78
win32.mod/com.bmx

@@ -42,8 +42,8 @@ End Extern
 
 ' oleautomation
 Extern 
-Function SysAllocStringLen:Short Ptr(bstr:Short Ptr,length)="BBSHORT * SysAllocStringLen(BBSHORT * ,BBINT )!"
-Function SysFreeString(bstr:Short Ptr)="BBINT SysFreeString(BBSHORT * )!"
+Function SysAllocStringLen:Short Ptr(bstr:Short Ptr,length:UInt)="BBSHORT * SysAllocStringLen(BBSHORT * ,UINT )!"
+Function SysFreeString(bstr:Short Ptr)="void SysFreeString(BBSHORT * )!"
 End Extern
 
 Extern "win32"
@@ -217,82 +217,6 @@ Interface IWebBrowser2_ Extends IWebBrowserApp_
 	
 End Interface
 
-Interface IHTMLWindow2_ Extends IDispatch_
-
-    Method item(this:Byte Ptr,_variant:Byte Ptr)
-    Method get_length(_pint:Int Ptr)
-
-    Method get_frames(IHTMLFramesCollection2:Byte Ptr Ptr)
-    Method put_defaultStatus(_bstr:Short Ptr)
-    Method get_defaultStatus(_pbstr:Short Ptr Ptr)
-    Method put_status(_bstr:Short Ptr)
-    Method get_status(_pbstr:Short Ptr Ptr)
-    Method setTimeout(_bstr:Short Ptr,_int,_variant:Byte Ptr,_pint:Int Ptr)
-    Method clearTimeout(_int)
-    Method alert(_bstr:Short Ptr)
-    Method _confirm(_bstr:Short Ptr,_variantbool:Short Ptr)
-    Method prompt(_bstr1:Short Ptr,_bstr2:Short Ptr,_variant:Byte Ptr)
-    Method get_Image(LPHTMLIMAGEELEMENTFACTORY:Byte Ptr)
-    Method get_location(LPHTMLLOCATION:Byte Ptr)
-    Method get_history(LPOMHISTORY:Byte Ptr)
-    Method close()
-    Method put_opener(_variant:Long)
-    Method get_opener(this:Byte Ptr)
-    Method get_navigator(LPOMNAVIGATOR:Byte Ptr)
-    Method put_name(_bstr:Short Ptr)
-    Method get_name(_pbstr:Short Ptr Ptr)
-    Method get_parent(LPHTMLWINDOW2:Byte Ptr)
-    Method open(_bstr:Short Ptr,_bstr1:Short Ptr,_bstr2:Short Ptr,_variant:Byte Ptr,LPHTMLWINDOW2:Byte Ptr)
-    Method get_self(LPHTMLWINDOW2:Byte Ptr)
-    Method get_top(LPHTMLWINDOW2:Byte Ptr)
-    Method get_window(LPHTMLWINDOW2:Byte Ptr)
-    Method navigate(_bstr:Short Ptr)
-    Method put_onfocus(_variant:Long)
-    Method get_onfocus(this:Byte Ptr)
-    Method put_onblur(_variant:Long)
-    Method get_onblur(this:Byte Ptr)
-    Method put_onload(_variant:Long)
-    Method get_onload(this:Byte Ptr)
-    Method put_onbeforeunload(_variant:Long)
-    Method get_onbeforeunload(this:Byte Ptr)
-    Method put_onunload(_variant:Long)
-    Method get_onunload(this:Byte Ptr)
-    Method put_onhelp(_variant:Long)
-    Method get_onhelp(this:Byte Ptr)
-    Method put_onerror(_variant:Long)
-    Method get_onerror(this:Byte Ptr)
-    Method put_onresize(_variant:Long)
-    Method get_onresize(this:Byte Ptr)
-    Method put_onscroll(_variant:Long)
-    Method get_onscroll(this:Byte Ptr)
-    Method get_document(doc:IHTMLDocument2_ Var)
-    Method get_event(LPHTMLEVENTOBJ:Byte Ptr)
-    Method get__newEnum(IUnknown:Byte Ptr Ptr)
-    Method showModalDialog(_bstr:Short Ptr,_variant:Byte Ptr,_variant2:Byte Ptr,_variant3:Byte Ptr)
-    Method showHelp(_bstr:Short Ptr,VARIANT,BSTR)
-    Method get_screen(LPHTMLSCREEN:Byte Ptr)
-    Method get_Option(LPHTMLOPTIONELEMENTFACTORY:Byte Ptr)
-    Method focus()
-    Method get_closed(_variant:Byte Ptr)
-    Method blur()
-    Method scroll(_int1,_int2)
-    Method get_clientInformation(LPOMNAVIGATOR:Byte Ptr)
-    Method setInterval(_bstr:Short Ptr,_int,_variant:Byte Ptr,_int1:Int Ptr)
-    Method clearInterval(_int)
-    Method put_offscreenBuffering(_variant:Long)
-    Method get_offscreenBuffering(this:Byte Ptr)
-    Method execScript(_bstr:Short Ptr,_bstr1:Short Ptr,_variant:Byte Ptr)
-    Method toString(_pbstr:Short Ptr Ptr)
-    Method scrollBy(_int,_int1)
-    Method scrollTo(_int,_int1)
-    Method MoveTo(_int,_int1)
-    Method moveBy(_int,_int1)
-    Method resizeTo(_int,_int1)
-    Method resizeBy(_int,_int1)
-    Method get_external(disp:IDispatch_ Var)
-
-End Interface
-
 Interface IHTMLDocument2_ Extends IDispatch_
 
 	Method get_Script(IDispatch:Byte Ptr Ptr)
@@ -589,6 +513,82 @@ Interface IHTMLDocument2_ Extends IDispatch_
 	Method toString(_pbstr:Short Ptr Ptr)
 	Method createStyleSheet(_bstr:Short Ptr,_int,LPHTMLSTYLESHEET:Byte Ptr)
 End Interface
+
+Interface IHTMLWindow2_ Extends IDispatch_
+
+    Method item(this:Byte Ptr,_variant:Byte Ptr)
+    Method get_length(_pint:Int Ptr)
+
+    Method get_frames(IHTMLFramesCollection2:Byte Ptr Ptr)
+    Method put_defaultStatus(_bstr:Short Ptr)
+    Method get_defaultStatus(_pbstr:Short Ptr Ptr)
+    Method put_status(_bstr:Short Ptr)
+    Method get_status(_pbstr:Short Ptr Ptr)
+    Method setTimeout(_bstr:Short Ptr,_int,_variant:Byte Ptr,_pint:Int Ptr)
+    Method clearTimeout(_int)
+    Method alert(_bstr:Short Ptr)
+    Method _confirm(_bstr:Short Ptr,_variantbool:Short Ptr)
+    Method prompt(_bstr1:Short Ptr,_bstr2:Short Ptr,_variant:Byte Ptr)
+    Method get_Image(LPHTMLIMAGEELEMENTFACTORY:Byte Ptr)
+    Method get_location(LPHTMLLOCATION:Byte Ptr)
+    Method get_history(LPOMHISTORY:Byte Ptr)
+    Method close()
+    Method put_opener(_variant:Long)
+    Method get_opener(this:Byte Ptr)
+    Method get_navigator(LPOMNAVIGATOR:Byte Ptr)
+    Method put_name(_bstr:Short Ptr)
+    Method get_name(_pbstr:Short Ptr Ptr)
+    Method get_parent(LPHTMLWINDOW2:Byte Ptr)
+    Method open(_bstr:Short Ptr,_bstr1:Short Ptr,_bstr2:Short Ptr,_variant:Byte Ptr,LPHTMLWINDOW2:Byte Ptr)
+    Method get_self(LPHTMLWINDOW2:Byte Ptr)
+    Method get_top(LPHTMLWINDOW2:Byte Ptr)
+    Method get_window(LPHTMLWINDOW2:Byte Ptr)
+    Method navigate(_bstr:Short Ptr)
+    Method put_onfocus(_variant:Long)
+    Method get_onfocus(this:Byte Ptr)
+    Method put_onblur(_variant:Long)
+    Method get_onblur(this:Byte Ptr)
+    Method put_onload(_variant:Long)
+    Method get_onload(this:Byte Ptr)
+    Method put_onbeforeunload(_variant:Long)
+    Method get_onbeforeunload(this:Byte Ptr)
+    Method put_onunload(_variant:Long)
+    Method get_onunload(this:Byte Ptr)
+    Method put_onhelp(_variant:Long)
+    Method get_onhelp(this:Byte Ptr)
+    Method put_onerror(_variant:Long)
+    Method get_onerror(this:Byte Ptr)
+    Method put_onresize(_variant:Long)
+    Method get_onresize(this:Byte Ptr)
+    Method put_onscroll(_variant:Long)
+    Method get_onscroll(this:Byte Ptr)
+    Method get_document(doc:IHTMLDocument2_ Var)
+    Method get_event(LPHTMLEVENTOBJ:Byte Ptr)
+    Method get__newEnum(IUnknown:Byte Ptr Ptr)
+    Method showModalDialog(_bstr:Short Ptr,_variant:Byte Ptr,_variant2:Byte Ptr,_variant3:Byte Ptr)
+    Method showHelp(_bstr:Short Ptr,VARIANT,BSTR)
+    Method get_screen(LPHTMLSCREEN:Byte Ptr)
+    Method get_Option(LPHTMLOPTIONELEMENTFACTORY:Byte Ptr)
+    Method focus()
+    Method get_closed(_variant:Byte Ptr)
+    Method blur()
+    Method scroll(_int1,_int2)
+    Method get_clientInformation(LPOMNAVIGATOR:Byte Ptr)
+    Method setInterval(_bstr:Short Ptr,_int,_variant:Byte Ptr,_int1:Int Ptr)
+    Method clearInterval(_int)
+    Method put_offscreenBuffering(_variant:Long)
+    Method get_offscreenBuffering(this:Byte Ptr)
+    Method execScript(_bstr:Short Ptr,_bstr1:Short Ptr,_variant:Byte Ptr)
+    Method toString(_pbstr:Short Ptr Ptr)
+    Method scrollBy(_int,_int1)
+    Method scrollTo(_int,_int1)
+    Method MoveTo(_int,_int1)
+    Method moveBy(_int,_int1)
+    Method resizeTo(_int,_int1)
+    Method resizeBy(_int,_int1)
+    Method get_external(disp:IDispatch_ Var)
+
+End Interface
 End Extern
 
 Const IUnknown_UUID$="{00000000-0000-0000-C000-000000000046}"

+ 2 - 2
win32.mod/kernel32.bmx

@@ -25,8 +25,8 @@ Const GMEM_ZEROINT=$40
 
 Function Sleep( dwMilliseconds )="BBINT Sleep(BBINT )!"
 Function beep( dwFreq,dwDuration )="BBINT Beep(BBINT ,BBINT )!"
-Function GetModuleHandleA:Byte Ptr( lpModuleName:Byte Ptr  )="BBINT GetModuleHandleA(BBBYTE * )!"
-Function GetModuleHandleW:Byte Ptr( lpModuleName:Short Ptr )="BBINT GetModuleHandleW(BBSHORT * )!"
+Function GetModuleHandleA:Byte Ptr( lpModuleName:Byte Ptr  )="HMODULE GetModuleHandleA(BBBYTE * )!"
+Function GetModuleHandleW:Byte Ptr( lpModuleName:Short Ptr )="HMODULE GetModuleHandleW(BBSHORT * )!"
 Function SetFileAttributesA( lpFileName$z,dwFileAttributes )="BBINT SetFileAttributesA(BBBYTE * ,BBINT )!"
 Function SetFileAttributesW( lpFileName$z,dwFileAttributes )="BBINT SetFileAttributesW(BBBYTE * ,BBINT )!"
 Function GetFileAttributesA( lpFileName$z )="BBINT GetFileAttributesA(BBBYTE * )!"

+ 23 - 23
win32.mod/user32.bmx

@@ -1147,14 +1147,14 @@ Function PeekMessageA( lpMsg:Byte Ptr,hWnd:Byte Ptr,wMsgFilterMin,wMsgFilterMax,
 Function PeekMessageW( lpMsg:Byte Ptr,hWnd:Byte Ptr,wMsgFilterMin,wMsgFilterMax,wRemoveMsg )="BBINT PeekMessageW(BBBYTE * ,BBINT ,BBINT ,BBINT ,BBINT )!"
 Function PostMessageA( hWnd:Byte Ptr,MSG,wp:WParam,lp:LParam )="BBINT PostMessageA(HWND ,UINT ,WPARAM ,LPARAM )!"
 Function PostMessageW( hWnd:Byte Ptr,MSG,wp:WParam,lp:LParam )="BBINT PostMessageW(HWND ,UINT ,WPARAM ,LPARAM )!"
-Function SendMessageA( hWnd:Byte Ptr,MSG:UInt,wp:WParam,lp:LParam )="BBINT SendMessageA(HWND ,UINT ,WPARAM ,LPARAM )!"
-Function SendMessageW( hWnd:Byte Ptr,MSG:UInt,wp:WParam,lp:LParam )="BBINT SendMessageW(HWND ,UINT ,WPARAM ,LPARAM )!"
+Function SendMessageA( hWnd:Byte Ptr,MSG:UInt,wp:WParam,lp:LParam )="LRESULT SendMessageA(HWND ,UINT ,WPARAM ,LPARAM )!"
+Function SendMessageW( hWnd:Byte Ptr,MSG:UInt,wp:WParam,lp:LParam )="LRESULT SendMessageW(HWND ,UINT ,WPARAM ,LPARAM )!"
 Function PostThreadMessageA( idThread,Msg,wp:WParam,lp:LParam )="BBINT PostThreadMessageA(BBINT ,UINT ,WPARAM ,LPARAM )!"
 Function PostThreadMessageW( idThread,Msg,wp:WParam,lp:LParam )="BBINT PostThreadMessageW(BBINT ,UINT ,WPARAM ,LPARAM )!"
-Function GetDC:Byte Ptr( hWnd:Byte Ptr )="BBINT GetDC(BBINT )!"
+Function GetDC:Byte Ptr( hWnd:Byte Ptr )="HDC GetDC(HWND)!"
 Function PostQuitMessage( nExitCode )="BBINT PostQuitMessage(BBINT )!"
 Function TranslateMessage( lpMsg:Byte Ptr )="BBINT TranslateMessage(BBBYTE * )!"
-Function DestroyWindow( hWnd:Byte Ptr )="BBINT DestroyWindow(BBINT )!"
+Function DestroyWindow:Int( hWnd:Byte Ptr )="BBINT DestroyWindow(HWND )!"
 Function MsgWaitForMultipleObjects( nCount,pHandles:Byte Ptr,fWaitAll,dwMilliseconds,dwWakeMask )="BBINT MsgWaitForMultipleObjects(BBINT ,BBBYTE * ,BBINT ,BBINT ,BBINT )!"
 Function MsgWaitForMultipleObjectsEx( nCount,pHandles:Byte Ptr,dwMilliseconds,dwWakeMask,dwFlags )="BBINT MsgWaitForMultipleObjectsEx(BBINT ,BBBYTE * ,BBINT ,BBINT ,BBINT )!"
 Function ChangeDisplaySettingsA( lpDevMode:Byte Ptr,dwFlags )="BBINT ChangeDisplaySettingsA(BBBYTE * ,BBINT )!"
@@ -1162,20 +1162,20 @@ Function ChangeDisplaySettingsW( lpDevMode:Byte Ptr,dwFlags )="BBINT ChangeDispl
 Function LoadCursorA:Byte Ptr( hInstance:Byte Ptr,lpCursorName:Byte Ptr )="HCURSOR LoadCursorA(BBINT ,BBBYTE * )!"
 Function LoadCursorW:Byte Ptr( hInstance:Byte Ptr,lpCursorName:Short Ptr )="HCURSOR LoadCursorW(BBINT ,BBSHORT * )!"
 Function ShowCursor( visible )="BBINT ShowCursor(BBINT )!"
-Function SetCursor( hCursor:Byte Ptr )="BBINT SetCursor(BBINT )!"
+Function SetCursor:Byte Ptr( hCursor:Byte Ptr )="HCURSOR SetCursor(HCURSOR )!"
 Function LoadIconA:Byte Ptr( resourceid:Byte Ptr,lpIconName:Byte Ptr )="HICON LoadIconA(BBINT ,BBBYTE * )!"
 Function LoadIconW:Byte Ptr( resourceid:Byte Ptr,lpIconName:Short Ptr )="HICON LoadIconW(BBINT ,BBSHORT * )!"
 Function LoadLibraryA:Byte Ptr( dll$z )="HMODULE LoadLibraryA(BBBYTE * )!"
 Function GetProcAddress:Byte Ptr( libhandle:Byte Ptr,func$z )="FARPROC __stdcall GetProcAddress(HMODULE ,LPCSTR )!"
-Function LoadLibraryW:Byte Ptr( dll$w )="HMODULE __stdcall LoadLibraryW(LPCTSTR )!"
-Function GetClientRect( hWnd:Byte Ptr,lpRect:Int Ptr )="BBINT GetClientRect(BBINT ,BBINT * )!"
-Function GetWindowRect( hWnd:Byte Ptr,lpRect:Int Ptr )="BBINT GetWindowRect(BBINT ,BBINT * )!"
+Function LoadLibraryW:Byte Ptr( dll$w )="HMODULE __stdcall LoadLibraryW(LPCWSTR)!"
+Function GetClientRect( hWnd:Byte Ptr,lpRect:Int Ptr )="BBINT GetClientRect(HWND ,BBINT * )!"
+Function GetWindowRect( hWnd:Byte Ptr,lpRect:Int Ptr )="BBINT GetWindowRect(HWND ,BBINT * )!"
 Function GetDesktopWindow:Byte Ptr()="HWND GetDesktopWindow()!"
 Function AdjustWindowRect( rect:Int Ptr,style,menu )="BBINT AdjustWindowRect(BBINT * ,BBINT ,BBINT )!"
 Function AdjustWindowRectEx( rect:Int Ptr,style,menu:Int,exstyle )="BBINT AdjustWindowRectEx(BBINT * ,BBINT ,BBINT ,BBINT )!"
 Function ClientToScreen( hWnd:Byte Ptr,point:Byte Ptr )="BBINT ClientToScreen(BBINT ,BBBYTE * )!"
 Function ShowWindow( hWnd:Byte Ptr,nCmdShow )="BBINT ShowWindow(HWND ,BBINT )!"
-Function SetMenu( hWnd:Byte Ptr,hmenu:Byte Ptr )="BBINT SetMenu(HWND ,BBINT )!"
+Function SetMenu( hWnd:Byte Ptr,hmenu:Byte Ptr )="BBINT SetMenu(HWND ,HMENU)!"
 Function DrawMenuBar( hWnd:Byte Ptr )="BBINT DrawMenuBar(HWND )!"
 Function CreateMenu_:Byte Ptr()="HMENU CreateMenu()!"
 Function CreatePopupMenu:Byte Ptr()="HMENU CreatePopupMenu()!"
@@ -1184,11 +1184,11 @@ Function DestroyMenu(hmenu:Byte Ptr)="BBINT DestroyMenu(HMENU)!"
 Function EnableMenuItem(hmenu:Byte Ptr,uIDEnableItem,uEnable)="BBINT EnableMenuItem(HMENU ,BBINT ,BBINT )!"
 Function CheckMenuItem(hmenu:Byte Ptr,uIDCheckItem,uCheck)="BBINT CheckMenuItem(HMENU,BBINT ,BBINT )!"
 
-Function AppendMenuA(hmenu:Byte Ptr,uFlags,uIDNewItem,lpNewItem:Byte Ptr)="BBINT AppendMenuA(BBINT ,BBINT ,BBINT ,BBBYTE * )!"
-Function AppendMenuW(hmenu:Byte Ptr,uFlags,uIDNewItem,lpNewItem:Byte Ptr)="BBINT AppendMenuW(BBINT ,BBINT ,BBINT ,BBBYTE * )!"
-Function SetMenuItemInfoA( hmenu:Byte Ptr,item,fByPosition,info:Byte Ptr )="BBINT SetMenuItemInfoA(BBINT ,BBINT ,BBINT ,BBBYTE * )!"
-Function SetMenuItemInfoW( hmenu:Byte Ptr,item,fByPosition,info:Byte Ptr )="BBINT SetMenuItemInfoW(BBINT ,BBINT ,BBINT ,BBBYTE * )!"
-Function GetMenuItemCount( hmenu:Byte Ptr )="BBINT GetMenuItemCount(BBINT )!"
+Function AppendMenuA(hmenu:Byte Ptr,uFlags,uIDNewItem,lpNewItem:Byte Ptr)="BBINT AppendMenuA(HMENU ,UINT,UINT_PTR,BBBYTE * )!"
+Function AppendMenuW(hmenu:Byte Ptr,uFlags,uIDNewItem,lpNewItem:Byte Ptr)="BBINT AppendMenuW(HMENU ,UINT,UINT_PTR,BBBYTE * )!"
+Function SetMenuItemInfoA( hmenu:Byte Ptr,item,fByPosition,info:Byte Ptr )="BBINT SetMenuItemInfoA(HMENU,UINT,BBINT ,BBBYTE * )!"
+Function SetMenuItemInfoW( hmenu:Byte Ptr,item,fByPosition,info:Byte Ptr )="BBINT SetMenuItemInfoW(HMENU,UINT,BBINT ,BBBYTE * )!"
+Function GetMenuItemCount( hmenu:Byte Ptr )="BBINT GetMenuItemCount(HMENU)!"
 Function SetWindowTextA( hWnd:Byte Ptr,text$z )="BBINT SetWindowTextA(HWND ,BBBYTE * )!"
 Function SetWindowTextW( hWnd:Byte Ptr,text$w )="BBINT SetWindowTextW(HWND ,BBSHORT * )!"
 Function GetWindowTextA( hWnd:Byte Ptr, lpString:Byte Ptr, maxCount:Int)="int __stdcall GetWindowTextA(HWND ,LPSTR ,int )!"
@@ -1208,8 +1208,8 @@ Function SetClassLongA( hWnd:Byte Ptr,index,newlong )="BBINT SetClassLongA(HWND
 Function GetClassLongW( hWnd:Byte Ptr,index )="BBINT GetClassLongW(HWND ,BBINT )!"
 Function SetClassLongW( hWnd:Byte Ptr,index,newlong )="BBINT SetClassLongW(HWND ,BBINT ,BBINT )!"
 Function IsZoomed( hWnd:Byte Ptr )="BBINT IsZoomed(HWND )!"
-Function CallWindowProcA:Byte Ptr( proc:Byte Ptr,hWnd:Byte Ptr,msg:UInt,wp:WParam,lp:LParam)="BBINT CallWindowProcA(BBBYTE * ,HWND ,UINT ,WPARAM ,LPARAM )!"
-Function CallWindowProcW:Byte Ptr( proc:Byte Ptr,hWnd:Byte Ptr,msg:UInt,wp:WParam,lp:LParam )="BBINT CallWindowProcW(BBBYTE * ,HWND ,UINT ,WPARAM ,LPARAM )!"
+Function CallWindowProcA:Byte Ptr( proc:Byte Ptr,hWnd:Byte Ptr,msg:UInt,wp:WParam,lp:LParam)="LRESULT CallWindowProcA(WNDPROC ,HWND ,UINT ,WPARAM ,LPARAM )!"
+Function CallWindowProcW:Byte Ptr( proc:Byte Ptr,hWnd:Byte Ptr,msg:UInt,wp:WParam,lp:LParam )="LRESULT CallWindowProcW(WNDPROC ,HWND ,UINT ,WPARAM ,LPARAM )!"
 Function OleInitialize(pvReserved:Byte Ptr)="BBINT OleInitialize(BBBYTE * )!"
 Function OleUninitialize()="BBINT OleUninitialize()!"
 Function InitCommonControlsEx(controlsex:Byte Ptr)="BBINT InitCommonControlsEx(const INITCOMMONCONTROLSEX *)!"
@@ -1224,9 +1224,9 @@ Function GetScrollInfo( hWnd:Byte Ptr,nBar,lpsi:Byte Ptr)="BBINT GetScrollInfo(H
 Function InvalidateRect( hWnd:Byte Ptr,lpRect:Int Ptr,bErase )="BBINT InvalidateRect(HWND ,BBINT * ,BBINT )!"
 Function ValidateRect( hWnd:Byte Ptr,lpRect:Int Ptr )="BBINT ValidateRect(HWND ,BBINT * )!"
 Function BeginPaint( hWnd:Byte Ptr,lpPaint:Byte Ptr )="BBINT BeginPaint(HWND ,BBBYTE * )!"
-Function FillRect( hdc:Byte Ptr,lpRect:Int Ptr,hbr:Byte Ptr )="BBINT FillRect(BBINT ,BBINT * ,BBINT )!"
+Function FillRect( hdc:Byte Ptr,lpRect:Int Ptr,hbr:Byte Ptr )="BBINT FillRect(HDC, BBINT *,HBRUSH)!"
 Function EndPaint( hWnd:Byte Ptr,lpPaint:Byte Ptr )="BBINT EndPaint(HWND ,BBBYTE * )!"
-Function SetFocus:Byte Ptr( hWnd:Byte Ptr )="BBINT SetFocus(BBINT )!"
+Function SetFocus:Byte Ptr( hWnd:Byte Ptr )="HWND SetFocus(HWND )!"
 Function GetFocus:Byte Ptr()="HWND GetFocus()!"
 Function GetActiveWindow:Byte Ptr()="HWND GetActiveWindow()!"
 Function SetActiveWindow( hWnd:Byte Ptr )="BBINT SetActiveWindow(HWND)!"
@@ -1235,7 +1235,7 @@ Function SetParent_:Byte Ptr( hWnd:Byte Ptr,hWnd2:Byte Ptr )="HWND SetParent(HWN
 Function WindowFromPoint:Byte Ptr( point:Int Ptr )="HWND WindowFromPoint(BBINT * )!"
 Function GetKeyState(vkey)="BBINT GetKeyState(BBINT )!"
 
-Function SetWindowsHookExW:Byte Ptr(idHook,lpfn:Byte Ptr,hmod:Byte Ptr,dwThreadId)="HHOOK SetWindowsHookExW(BBINT ,BBBYTE * ,HINSTANCE ,BBINT )!"
+Function SetWindowsHookExW:Byte Ptr(idHook,lpfn:Byte Ptr,hmod:Byte Ptr,dwThreadId)="HHOOK SetWindowsHookExW(BBINT ,HOOKPROC ,HINSTANCE ,BBINT )!"
 Function CallNextHookEx(hhk:Byte Ptr,ncode,wp:WParam,lp:LParam)="BBINT CallNextHookEx(HHOOK,BBINT ,WPARAM,LPARAM)!"
 Function UnhookWindowsHookEx(hhk:Byte Ptr)="BBINT UnhookWindowsHookEx(HHOOK)!"
 
@@ -1265,10 +1265,10 @@ Function MessageBoxW:Int(hWnd:Byte Ptr, lpText:Short Ptr, lpCaption:Short Ptr, u
 
 'shellapi
 
-Function DragAcceptFiles(hWnd:Byte Ptr,fAccept)="BBINT DragAcceptFiles(BBINT ,BBINT )!"
-Function DragQueryPoint(hDrop:Byte Ptr,lpPoint:Int Ptr)="BBINT DragQueryPoint(BBINT ,BBINT * )!"
-Function DragQueryFileW(hDrop:Byte Ptr,iFile:UInt,lpszFile:Short Ptr,cch:UInt)="BBINT DragQueryFileW(BBINT ,BBINT ,BBSHORT * ,BBINT )!"
-Function DragFinish(hDrop:Byte Ptr)="BBINT DragFinish(BBINT )!"
+Function DragAcceptFiles(hWnd:Byte Ptr,fAccept)="void DragAcceptFiles(HWND ,BBINT )!"
+Function DragQueryPoint(hDrop:Byte Ptr,lpPoint:Int Ptr)="BBINT DragQueryPoint(HWND ,BBINT * )!"
+Function DragQueryFileW(hDrop:Byte Ptr,iFile:UInt,lpszFile:Short Ptr,cch:UInt)="UINT DragQueryFileW(HDROP,UINT,BBSHORT * ,UINT)!"
+Function DragFinish(hDrop:Byte Ptr)="void DragFinish(HDROP)!"
 
 Function _TrackMouseEvent( trackmouseeventstrunct:Byte Ptr )="WINBOOL __stdcall _TrackMouseEvent(LPTRACKMOUSEEVENT )!"