Hi Peter,
thank you very much.
i have collect many different method to import Dll function. need some one to comment it
and demonstrate each case please.
=======================================================
! IupOpen Lib "iup.dll" (sys a,b) as sys
! IupCreate Lib "iup.dll" (string cname) as sys
! iupDrawRectangle Lib "iup.dll" (sys *dc, x1, y1, x2, y2, byte r, g, b, sys style)
! IupMainLoopLevel Lib "iup.dll" () as sys
! IupClose Lib "iup.dll" ()
' Example
=========
IupOpen(0,0)
win = iupCreate "dialog"
iupDrawRectangle *canvas, 0,0, 244,238, 254,72,170, 1
IupClose()
===========================================================================
Declare Function DragQueryFile Lib "shell32" Alias "DragQueryFileA" ( _
ByVal wHandle As SYS, _
ByVal NumFiles As SYS, _
ByVal NameBuffer As SYS, _
ByVal BufferLen As Long) As SYS
DECLARE SUB DragAcceptFiles LIB "SHELL32.DLL" ALIAS "DragAcceptFiles" ( _
BYVAL hWnd AS SYS _ ' __in HWND hWnd
, BYVAL fAccept AS SYS _ ' __in BOOL fAccept
) ' void
declare sub trial alias "trial" lib "mdlt"
declare QueryPerformanceCounter lib "kernel32.dll" (quad *c)
===========================================================================
gdi32 = LoadLibrary "gdi32.dll"
Bind gdi32
(
ChoosePixelFormat ChoosePixelFormat
SetPixelFormat SetPixelFormat
GetStockObject GetStockObject
SwapBuffers SwapBuffers
)
============================================================================
lib "gdi32.dll"
Declare Polygon (sys hdc, int *lpPoints, nCount) as bool
Declare ...
lib ""
Library "user32.dll"
! MessageBox alias "MessageBoxA"
Library ""
=============================================================================
extern lib "gdi32.dll"
! CreateFont Alias "CreateFontA" (long H,W,E,O,W,I,U,S,C,OP,CP,Q,PAF,string F) As sys
! alias FreeImage_OutputMessageProc
! alias _FreeImage_GetVersion@0() as char*
end extern
extern lib "sqlite3.dll"
sys sqlite3_open (char*name,sys*db)
sys sqlite3_exec (sys db,char* s, sys p1, sys p2, sys*dberr)
sys sqlite3_prepare_v2 (sys db, char*s, sys p1, sys*stmt, sys p2)
sys sqlite3_step (sys n)
char* sqlite3_column_text (sys row, sys col)
sys sqlite3_close (sys db)
'
end extern
================================================================================
module o2
declare sub ::message alias "message" lib "sbo2"
declare sub ::compile alias "compile" lib "sbo2"
declare sub ::start alias "start" lib "sbo2"
declare sub ::fun alias "fun" lib "sbo2"
end module
================================================================================
Also , what about optional param in first function