Showing posts with label win 32 api calls/system calls. Show all posts

win32api calls/system calls

Internet Functions


Name Returns Arguments DLL Alias for
accept uint uint s,str_sockaddr addr, ref int addrlen wsock32.dll
bind integer uint s, str_sockaddr name, int namelen wsock32.dll
closesocket integer uint socket wsock32.dll
FtpRenameFile boolean ulong hConnect, ref string lpszExisting, ref
string lpszNew
wininet.dll
getsockname integer uint s,ref str_sockaddr name, ref int  namelen wsock32.dll
getsockopt integer uint socket, int level, int optname,str_linger optval, int optlen wsock32.dll
htons integer int hostshort wsock32.dll
ntohs integer int netshort wsock32.dll
listen integer uint s, int backlog wsock32.dll
RasDialDlgA Boolean string p, string e, string n, ref str_rasdialdlg s Rasapi32.dll
RasEnumConnectionsA long ref str_RasConn lprasconn[], ref long lpcb, ref long i Rasapi32.dll
RasEnumEntriesA long RasEnumEntriesA(string r, string p, ref str_rasentryname e[], ref long lsize, ref long lentries Rasapi32.dll
RasGetConnectStatusA Ulong ulong hConn, ref str_Rasstatus rs Rasapi32.dll
RasGetEntryDialParamsA Long ref string lpszPhonebook, ref str_RasDialParms rdp, ref boolean lbfPassword Rasapi32.dll
RasGetErrorStringA Long uint l, ref string s, long c Rasapi32.dll
RasHangUpA Ulong ulong hConn Rasapi32.dll
shutdown integer uint s, int how wsock32.dll
send integer int socket, ref blob buf, int len, int flags wsock32.dll
setsockopt integer uint socket, int level, int optname,str_linger optval, int optlen wsock32.dll
socket uint int af, int ttype, int protocol wsock32.dll
recv integer int socket, ref blob buf, int len, int flags wsock32.dll
wsconnect integer uint socket, str_sockaddr name, int namelen wsock32.dll connect
WSACleanup integer
wsock32.dll
WSAAsyncSelect integer uint socket, uint Wnd, uint wMsg, long lEvent wsock32.dll
WSACancelBlockingCall integer
wsock32.dll
WSAGetLastError integer
wsock32.dll
WSAStartup integer uint wVersionRequested, ref str_wsadata lpWSAData wsock32.dll
 Kernel Functions

Function Name
Returns
Arguments
DLL
Alias for
_lclose long Long hfile Kernel32.dll
_lopen long Ref string lsfile, long fnmode Kernel32.dll
Beep Boolean long freq,long dur Kernel32.dll
CloseHandle Boolean Ulong h Kernel32.dll
CloseHandle Boolean ulong w_handle Kernel32.dll
CopyFileA Boolean Ref string cfrom, ref string cto, boolean flag kernel32.dll
CopyMemory
Pb pointer, pb pointer kernel32.dll RtlMoveMemory
CreateDirectoryA Boolean Ref string ls_newdir, ulong lnull kernel32.dll
CreateFileA long ref string lpszName,
long fdwAccess,
long fdwShareMode,
long lpsa,
long fdwCreate,
long fdwAttrsAndFlags,
long hTemplateFile
kernel32.dll
CreateMutexA Ulong Ulong security,boolean bowner, string lsname Kernel32.dll
CreateProcessA Boolean string AppName, string CommLine, long l1, long l2, boolean binh, long creationflags, long l3, string dir, str_startupinfo startupinfo, ref str_processinformation pi Kernel32.dll
CreateToolhelp32Snapshotibrary ulong long dwFlags, long th32ProcessID Kernel32.dll
ExpandEnvironmentStringsA Long REF String lpszSrc, REF string lpszDest, long cchDest kernel32.dll
FatalExit
int exitcode Kernel32.dll
FileTimeToLocalFileTime boolean Filetimetolocalfiletime(ref str_filedatetime lpfiletime, ref str_filedatetime lplocalfiletime Kernel32.dll
FileTimeToSystemTime boolean Str_filedatetime lpt, ref str_systemtime sts Kernel32.dll
FindClose boolean Long handle kernel32.dll
FindFirstFileA Long Ref string filename, ref str_filedata filedata kernel32.dll
FindNextFileA Boolean Long handle, ref str_filedata filedata kernel32.dll
FreeLibrary
Ulong h kernel32.dll
FreeLibrary
ulong libhandle Kernel32.dll
GetComputerNameA Boolean GetComputerNameA(ref string cname,ref long nbuf Kernel32.dll
GetCurrentDirectoryA ulong Ulong bufferlen, ref string currentdir Kernel32.dll
GetCurrentThread Ulong
Kernel32.dll
GetDiskFreeSpaceA boolean Ref string as_dir, ref long al_sectorspercluster, ref long al_bytespersector, ref long al_freeclusters, ref long al_totalclusters Kernel32.dll
GetDiskFreeSpaceExA boolean Ref string as_dir, ref str_ularge_long ast_userfreebytes, ref str_ularge_long ast_totalbytes, ref str_ularge_long ast_totalfreebytes Kernel32.dll
GetFileTime boolean Long hfile, ref str_filedatetime lpcreate, ref str_filedatetime lpaccess, ref str_filedatetime lpwrite Kernel32.dll
GetLastError Long
Kernel32.dll
GetMinMaxInfo
Ref str_minmaxinfo d, long s, long l kernel32.dll RtlMoveMemory
GetModuleHandleA long string modname Kernel32dll
GetModuleFileNameA long ulong hModule, ref string lpFilename, long nSize Kernel32.dll
GetShortPathNameA integer string lpszLongPath, REF string
lpszShortPath, integer cchBuffer
Kernel32.dll
GetTempPathA long long nBufferLength, ref string lpBuffer Kernel32.dll
GetThreadPriority Integer ulong hthread Kernel32.dll
GetUserDefaultLangID Integer
Kernel32.dll
GetVolumeInformationA boolean Ref string lprootpathname,ref string lpvolumenamebuffer,long nvolumenamesize,ref uint lpvolumeserialnumber[2], ref long lpmaximumcomponentlength, ref long lpfilesystemflags,ref string lpfilesystemnamebuffer,long nfilesystemnamesize kernel32.dll
GetWindowsDirectoryA Ulong ref string wdir, ulong buf Kernel32.dll
GlobalAlloc ulong ulong uFlags, long dwBytes kernel32.dll
GlobalFree ulong ulong hMem kernel32.dll
GlobalLock ulong ulong hMem kernel32.dll
GlobalMemoryStatus
Ref str_memorystatus lpbuffer kernel32.dll
GlobalUnlock ulong ulong hMem kernel32.dll
LoadLibraryA ulong String modname kernel32.dll
MoveFileA Boolean Ref string fromfile, ref string tofile kernel32.dll
OpenProcess ulong ulong dwDesiredAccess, boolean bInheritHandle, ulong dwProcessId Kernel32.dll
Process32First Boolean ulong hSnapshot, ref str_PROCESSENTRY32 lppe kernel32.dll
Process32Next Boolean ulong hSnapshot, ref str_PROCESSENTRY32 lppe kernel32.dll
SetComputerNameA Boolean ref string cname Kernel32.dll
SetCurrentDirectoryA Boolean Ref string cdir kernel32.dll
SetMinMaxInfo
Long d, str_minmaxinfo s, long l kernel32.dll RtlMoveMemory
Sleep
Long m kernel32.dll
WideCharToMultiByte long UINT CodePage,ulong dwFlags, long pWideCharStr, int cchWideChar, ref string lpMultiByteStr,  int cchMultiByte, long c, long u



kernel32.dll
WinExec uint ref string filename, uint wstyle Kernel32.dll

Graphics Functions


Function Name Returns Arguments DLL Alias for
Arc Boolean ulong hwnd, long r1, long r2, long r3, long r4, long a1, long a2, long a3, long a4 Gdi32.dll
BitBlt Long ulong hDC, long num, long num, long num, long num, ulong hDC, long num, long num, ulong lParam Gdi32.dll
CreateCompatibleDC ulong ulong hDc gdi32.dll
Chord Boolean Chord(ulong hwnd,long x1,long y1,long x2,long y2,long r1, long r2, long r3, long r4 Gdi32.dll
CreateCompatibleBitmap ulong ulong hDC, int num, int num gdi32.dll
CreateCompatibleDC Ulong Ulong hDC Gdi32.dll
CreateDCA ulong ref string str, ref string str, ref string str, ref string str gdi32.dll
DeleteDC int ulong hDC gdi32.dll
DeleteObject boolean ulong hgdiobj Gdi32.dll
Ellipse Boolean ulong hwnd,long x1,long y1,long x2,long y2 Gdi32.dll
GetBkColor Ulong ulong hwnd Gdi32.dll
GetDIBits long ulong hdc, ulong bitmap, ulong start, ulong lines, ref blob bits, ref str_bitmapinfo i, ulong pallete gdi32.dll
GetDIBits long ulong hdc, ulong bitmap, ulong start, ulong lines, long bits, ref str_bitmapinfo i, ulong pallete gdi32.dll
GetObjectBitmap Ulong ulong hgdiobj, int cbBuffer, ref s_bitmap bm Gdi32.dll GetObjectA
GetPixel Ulong ulong hwnd, long xpos, long ypos Gdi32.dll
GetTextExtentPoint32A boolean ( Ulong h, string s, long l, ref str_point st Gdi32.dll
LineTo boolean ulong hwnd,long wx, long wy Gdi32.dll
MoveToEx Boolean ulong hwnd,long wx, long wy,ref prepos prepos2 Gdi32.dll
Pie boolean ulong hwnd,long x1,long y1,long x2,long y2,long x3,long y3,long x4,long y4 Gdi32.dll
Polygon Boolean hdc, ref struct poly poly2, int cnt Gdi32.dll
Rectangle boolean ulong hwnd,long x1,long y1,long x2,long y2 Gdi32.dll
SelectObject ulong ulong hDC, ulong hGDIObj Gdi32.dll
SetPixel Ulong ulong hwnd, long xpos, long ypos, ulong pcol Gdi32.dll

Advanced Functions


Function Name Returns Arguments DLL Alias for
CreateProcessAsUserA Boolean ulong hToken,string AppName, string CommLine, long l1, long l2, boolean binh, long creationflags, long l3, string dir, str_startupinfo startupinfo, ref str_processinformation pi Advapi32.dll
DuplicateTokenEx Boolean ulong hExistingToken,ulong dwDesiredAccess,long lpTokenAttribute, long ImpersonationLevel,long TokenType,ref ulong phNewToken Advapi32.dll
ImpersonateLoggedOnUser Boolean ulong hToken Advapi32.dll
GetUserNameA Boolean ref string lpBuffer, ref long nSize Advapi32.dll
LogonUserA Boolean ref string lpszUsername, ref string lpszDomain, ref string lpszPassword,ulong dwLogonType, ulong dwLogonProvider, ref ulong phToken Advapi32.dll
RevertToSelf Boolean
Advapi32.dll

User & other Functions


Function Name Returns Arguments DLL Alias for

_access Long Ref string filename, int mode msvcrt.dll
GetFreeSystemResources  long long ResourceType rsrc32.dll _MyGetFreeSystemResources32@4
BringWindowToTop Boolean ulong w_handle User32.dll
ChooseColorA boolean REF str_ChooseColor lpcc comdlg32.dll
ChooseFontA boolean REF str_choosefont c comdlg32.dll
CloseClipboard long
user32.dll
CloseWindow Boolean ulong w_handle User32.dll
DestroyWindow Boolean ulong w_handle User32.dll
DllRegisterServer Long
c:\windows\ocxname.ocx
EmptyClipboard int
user32.dll
ExitWindowsEx boolean uint dwReserved, uint uReserved User32.dll
FindWindowA Ulong Ref string c, ref string t User32.dll
GetCapture Ulong
User32.dll
GetClassNameA Long ulong hwnd, ref string cname, int buf User32.dll
GetCursor Ulong
User32.dll
GetCursorPos Boolean ref mousepos mousepos2 User32.dll
GetDC Ulong Ulong hwnd User32.dll
GetKeyboardState Boolean ref integer kbarray[256] User32.dll
GetKeyState Integer Long al_vk User32.dll
GetLastError Long
Kernel32.dll
GetMenu ulong Ulong w User32.dll
GetMenuStringA long Ulong h, ulong i, ref string s, long m, ulong f User32.dll
GetParent Ulong ulong hwnd User32.dll
GetSubMenu Ulong Ulong w, long p User32.dll
GetSystemMenu boolean ulong mhandle, boolean flag User32.dll
GetSystemMetrics Integer Integer indexnum User32.dll
GetUserNameA boolean ref string uname, ref ulong slength Advapi32.dll
GetWindowRect boolean ulong handle, ref rectangle RectStruct user32.dll
GetDesktopWindow ulong
user32.dll
GetActiveWindow ulong
user32.dll
GetClipboardFormatName integer UINT uFormat,string lpszFormatName, integer cchFormatName user32.dll
GetWindow ulong ulong hwnd, uint fuRel user32.dll
keybd_event
uint bVk,uint bScan,long dwFlags,long dwExtraInfo user32.dll
LoadImageA Ulong ulong hints, ref string lpszName, UINT uType, int cxDesired,int cyDesired,UINT fuLoad User32.dll
MciSendStringA long string cmd, REF string rtn, long size, long wnd Winmm.dll
MessageBoxA long ulong hwnd, ref string text, ref string title, ulong style User32.dll
Mouse_Event
ulong dwflag,ulong dx,ulong dy,ulong cbutton,ulong dwextra User32.dll
MoveWindow boolean ulong whand,int wx,int wy,int ww,int wh,boolean wflag User32.dll
OpenClipboard int ulong handle user32.dll
PostMessageA Boolean ulong hwndle,UINT wmsg,ulong wParam,ulong lParam User32.dll
RegisterWindowMessageA Ulong String lpsz User32.dll
ReleaseCapture Boolean
User32.dll
ReleaseDC int ulong handle, ulong hDC user32.dll
RemoveMenu boolean Ulong h, ulong p, ulong f User32.dll DeleteMenu
SendMessageA Long ulong hwndle,UINT wmsg,ulong wParam,ulong lParam User32.dll
SetCapture Ulong Ulong a User32.dll
SetClipboardData ulong uint num, uint num user32.dll
SetCursorPos Boolean int cx, int cy User32.dll
SetFocus
long objhandle User32.dll
SetKeyboardState boolean ref integer kbarray[256] User32.dll
SetWindowPos boolean ulong hWnd,ulong WndInsertAfter,  long x, long y, long width, long height, ulong uFlags User32.dll
SHBrowseForFolder Long Ref str_browseinfo lpbi Shell32.dll
SHGetPathFromIDList Boolean Ulong pidl, ref string pszbuffer Shell32.dll
ShowWindow
ulong hWind, int nCmdShow user32.dll
sndPlaySoundA boolean String wavfile, uint flag Winmm.dll
SwapMouseButton Boolean boolean var User32.dll
VerQueryValueA Boolean Ref string lpblock, string lpsubblock, ref long lpbuffer, ref uint pulen Version.dll
waveOutGetNumDevs Ulong
Winmm.dll

Shell Functions


Function Name Returns Arguments DLL Alias for
SHBrowseForFolder long ref str_browseinfo lpbi shell32.dll
SHGetPathFromIDList boolean ulong pidl, ref string pszBuffer shell32.dll
ShellExecuteA ulong ulong hwnd, ref string lpOperation, ref string lpFile, ref string parameters, ref string defdir, ulong cmd shell32.dll

Netwerk / LAN functions



Function Name Returns Arguments DLL Alias for
NetWkstaUserGetInfo ulong long reserved, long level, ref long buffer netapi32.dll
WNetGetUniversalNameA  long ref string lpLocalPath,long dwInfoLevel, ref str_Remote_Name_Info lpBuffer,ref long lpBufferSize mpr.dll

Structure Definitions

Power Builder structure definitions for use with Win32 API



Name
Power Builder definition
Note
str_browseinfo $PBExportHeader$str_browseinfo.srs
global type str_browseinfo from structure
long hwndowner
long pidlroot
string pszdisplayname
string lpsztitle
unsignedinteger ulflags
long lpfn
long lparam
integer iimage
end type

str_logfont $PBExportHeader$str_logfont.srs
global type str_logfont from structure
long lfheight
long lfwidth
long lfescapement
long lforientation
long lfweight
character lfitalic
character lfunderline
character lfstrikeout
character lfcharset
character lfoutprecision
character lfclipprecision
character lfquality
character lfpitchandfamily
character lffacename[32]
end type

str_choosefont $PBExportHeader$str_choosefont.srs
global type str_choosefont from structure
long lstructsize
unsignedlong hwndowner
unsignedlong hdc
long lplogfont
long ipointsize
long flags
long rgbcolors
long lcustdata
long lpfnhook
string lptemplatename
unsignedlong hinstance
string lpszstyle
integer nfonttype
integer missingalignment
unsignedlong nsizemin
unsignedlong nsizemax
end type
Lstructsize = 60
str_browseinfo
$PBExportHeader$str_browseinfo.srs
global type str_browseinfo from structure
long hwndowner
long pidlroot
string pszdisplayname
string lpsztitle
unsignedinteger ulflags
long lpfn
long lparam
integer iimage
end type

Str_choosecolor
$PBExportHeader$str_choosecolor.srs
global type str_choosecolor from structure
long lstructsize
ulong hwndowner
ulong hinstance
long rgbresult
blob lpcustcolors
long flags
long lcustdata
long lpfnhook
long lptemplatename
end type
Lstructsize = 36
str_connectioninfo
$PBExportHeader$str_connectioninfo.srs
global type str_connectioninfo from structure
string s_connection
string s_user
string s_password
boolean b_Valid
boolean b_Save
end type

str_filedata
$PBExportHeader$str_filedata.srs
global type str_filedata from structure
unsignedlong ul_FileAttributes
str_filedatetime str_CreationTime
str_filedatetime str_LastAccessTime
str_filedatetime str_LastWriteTime
unsignedlong ul_FileSizeHigh
unsignedlong ul_FileSizeLow
unsignedlong ul_Reserved0
unsignedlong ul_Reserved1
character ch_FileName[260]
character ch_AlternateFileName
end type

str_filedatetime
$PBExportHeader$str_filedatetime.srs
global type str_filedatetime from structure
unsignedlong ul_LowDateTime
unsignedlong ul_HighDateTimeend type

str_fileversioninfo
$PBExportHeader$str_fileversioninfo.srs
global type str_fileversioninfo from structure
string ProductName
string ProductVersion
string OriginalFilename
string FileDescription
string FileVersion
string CompanyName
string LegalCopyright
string LegalTrademarks
string InternalName
string PrivateBuild
string SpecialBuild
string Comments
end type

str_linger $PBExportHeader$str_linger.srs
$PBExportComments$Winsock linger structure for setsockoptions
global type str_linger from structure
integer l_onoff
integer l_linger
end type

str_memorystatus
$PBExportHeader$str_memorystatus.srs
global type str_memorystatus from structure
long dwlength
long dwmemoryload
long dwtotalphys
long dwavailphys
long dwtotalpagefile
long dwavailpagefile
long dwtotalvirtual
long dwavailvirtual
end type
DwLength = 40
str_minmaxinfo
$PBExportHeader$str_minmaxinfo.srs
global type str_minmaxinfo from structure
str_Point ptReserved
str_Point ptMaxSize
str_Point ptMaxPosition
str_Point ptMinTrackSize
str_Point ptMaxTrackSize
end type

str_point
$PBExportHeader$str_point.srs
global type str_point from structure
long lx
long ly
end type

str_procssentry32 $PBExportHeader$str_processentry32.srs
global type str_PROCESSENTRY32 from structure
ulong dwSize
ulong cntUsage
ulong th32ProcessID
ulong th32DefaultHeapID
ulong th32ModuleID
ulong cntThreads
ulong th32ParentProcessID
LONG pcPriClassBase
ulong dwFlags
char szExeFile[256]
end type

str_processinformation $PBExportHeader$str_processinformation.srs
global type str_processinformation from structure
ulong hprocess
ulong hthread
long dwprocessid
long dwthreadid
end type

str_rasconn
$PBExportHeader$str_rasconn.srs
global type str_rasconn from structure
long dwsize
unsignedlong hrasconn
character szentryname[257]
character szdevicetype[17]
character szdevicename[129]
character dummy
end type
Dwsize = 412
str_rasdialdlg
$PBExportHeader$str_rasdialdlg
global type str_rasdialdlg from structure
long dwSize
ulong hwndOwner
long dwFlags
long xDlg
long yDlg
long dwSubEntry
long dwError
long Reserved1
long Reserved2
end type
Dwsize = 36
str_rasdialextensions
$PBExportHeader$str_rasdialextensions.srs
global type str_rasdialextensions from structure
long dwSize
long dwfOptions
ulong hwndParent
long reserved
end type
Dwsize = 16
str_rasdialparms
$PBExportHeader$str_rasdialparms.srs
global type str_rasdialparms from structure
long dwsize
character szentryname[257]
character szphonenumber[129]
character szcallbacknumber[129]
character szusername[257]
character szpassword[257]
character szdomain[16]
end type
Dwsize = 1052
str_rasentryname
$PBExportHeader$str_rasentryname
global type str_rasentryname from structure
long dwsize
character rasentryname[257]
character dummy[3]
end type
Dwsize = 264
str_rasstatus
$PBExportHeader$str_rasstatus
global type str_rasstatus from structure
long dwsize
long rasconnstatus
long dwerror
character fszdevicetype[17]
character szdevicename[129]
end type
Dwsize = 160
str_remote_name_info $PBExportHeader$str_remote_name_info.srs
global type str_remote_name_info from structure
string universalname
string connexionname
string remainingpath
end type

str_securityattributes $PBExportHeader$str_securityattributes.srs
global type str_securityattributes from structure
ulong nlength
ulong lpSecurityDescriptor
boolean bInheritHandle
end type

str_startupinfo $PBExportHeader$str_startupinfo.srs
global type str_startupinfo from structure
long cb
string lpreserved
string lpdesktop
string lptitle
long dwx
long dwy
long dwxsize
long dwysize
long dwxcountchars
long dwycountchars
long dwfillattribute
long dwflags
long wshowwindow
long cbreserved2
long lpreserved2
ulong hstdinput
ulong hstdoutput
ulong hstderror
end type

str_systemtime
$PBExportHeader$str_systemtime.srs
global type str_systemtime from structure
unsignedinteger ui_WYear
unsignedinteger ui_WMonth
unsignedinteger ui_WDayOfWeek
unsignedinteger ui_WDay
unsignedinteger ui_WHour
unsignedinteger ui_WMinute
unsignedinteger ui_Wsecond
unsignedinteger ui_WMilliseconds
end type

str_transarray
$PBExportHeader$str_transarray.srs
global type str_transarray from structure
unsignedinteger wlanguageid
unsignedinteger wcharacterset
end type

str_vs_fixedfileinfo
$PBExportHeader$str_vs_fixedfileinfo.srs
global type str_vs_fixedfileinfo from structure
long dwsignature
long dwstrucversion
long dwfileversionms
long dwfileversionls
long dwproductversionms
long dwproductversionls
long dwfileflagmask
long dwfileflags
long dwfileos
long dwfiletype
long dwfilesubtype
long dwfiledatems
long dwfiledatels
end type

str_wksta_user_info_1 $PBExportHeader$wksta_user_info_1.srs
global type wksta_user_info_1 from structure
long username
long logon_domain
long oth_domains
long logon_server
end type

str_sockaddr $PBExportHeader$str_sockaddr.srs
$PBExportComments$WINSOCK sockaddr structure for connect and bind
global type str_sockaddr from structure
integer sin_family
unsignedinteger sin_port
character sin_addr[4]
character sin_zero[8]
end type

str_wsadata $PBExportHeader$str_wsadata.srs
$PBExportComments$WINSOCK structure for WSAStartup
global type str_wsadata from structure
unsignedinteger version
unsignedinteger highversion
character description[257]
character systemstatus[129]
unsignedinteger maxsockets
unsignedinteger maxupddg
string vendorinfo
end type