C# Class IfacesEnumsStructsClasses.WinApis

Windows API constants and functions
Show file Open project: mcorrientes/Web-Security-Toolset Class Usage Examples

Public Methods

Method Description
DateTimeToFiletime ( System.DateTime time ) : FILETIME
DeleteFromUrlCache ( string url ) : void

Attempts to delete a cookie or cache entry

FiletimeToDateTime ( FILETIME fileTime ) : System.DateTime
FindUrlCacheEntries ( string urlPattern ) : ArrayList

UrlCache functionality is taken from: Scott McMaster ([email protected]) CodeProject article There were some issues with preparing URLs for RegExp to work properly. This is demonstrated in AllForms.SetupCookieCachePattern method urlPattern: . Dump the entire contents of the cache. Cookie: Lists all cookies on the system. Visited: Lists all of the history items. Cookie:.*\.example\.com Lists cookies from the example.com domain. http://www.example.com/example.html$: Lists the specific named file if present \.example\.com: Lists any and all entries from *.example.com. \.example\.com.*\.gif$: Lists the .gif files from *.example.com. \.js$: Lists the .js files in the cache.

GET_X_LPARAM ( int lp ) : int
GET_Y_LPARAM ( int lp ) : int
GetWindowClass ( IntPtr Hwnd ) : string
GetWindowName ( IntPtr Hwnd ) : string
HiWord ( int number ) : int
LoWord ( int number ) : int
MakeLParam ( int LoWord, int HiWord ) : IntPtr
MakeLong ( int LoWord, int HiWord ) : int
SetSystemBeep ( bool bEnable ) : bool
ToStringFromFileTime ( FILETIME ft ) : string

Private Methods

Method Description
AddUrlToFavorites ( long hwnd, [ pszUrlW, [ pszTitleW, [ fDisplayUI ) : long
BitBlt ( IntPtr hObject, int nXDest, int nYDest, int nWidth, int nHeight, IntPtr hObjSource, int nXSrc, int nYSrc, TernaryRasterOperations dwRop ) : bool
BringWindowToTop ( IntPtr hWnd ) : bool
CallWindowProc ( IntPtr lpPrevWndFunc, IntPtr hWnd, int Msg, int wParam, int lParam ) : int
CoCreateInstance ( [ rclsid, [ pUnkOuter, CLSCTX dwClsContext, [ riid ) : object
CopyRect ( [ lprcDst, [ lprcSrc ) : bool
CreateAsyncBindCtx ( [ dwReserved, [ pbsc, [ penumfmtetc, [ ppbc ) : int
CreateBindCtx ( [ dwReserved, [ ppbc ) : int
CreateCompatibleBitmap ( IntPtr hdc, int nWidth, int nHeight ) : IntPtr
CreateCompatibleDC ( IntPtr hdc ) : IntPtr
CreateStreamOnHGlobal ( IntPtr hGlobal, bool fDeleteOnRelease, [ ppstm ) : int
CreateURLMoniker ( [ pmkContext, [ szURL, [ ppmk ) : int
CreateURLMonikerEx ( [ pmkContext, [ szURL, [ ppmk, uint URL_MK_XXX ) : int
DeleteDC ( IntPtr hdc ) : bool
DeleteObject ( IntPtr hObject ) : bool
DeleteUrlCacheEntry ( string lpszUrlName ) : long
DestroyIcon ( IntPtr hIcon ) : bool
DoOrganizeFavDlg ( long hWnd, string lpszRootFolder ) : long
DragQueryFile ( IntPtr hDrop, uint iFile, [ lpszFile, uint cch ) : uint
ExtractIcon ( IntPtr hInst, string lpszExeFileName, int nIconIndex ) : IntPtr
FileTimeToSystemTime ( FILETIME &FileTime, SYSTEMTIME &SystemTime ) : long
FindCloseUrlCache ( IntPtr hEnumHandle ) : long
FindFirstUrlCacheEntry ( string lpszUrlSearchPattern, IntPtr lpFirstCacheEntryInfo, UInt32 &lpdwFirstCacheEntryInfoBufferSize ) : IntPtr
FindNextUrlCacheEntry ( IntPtr hEnumHandle, IntPtr lpNextCacheEntryInfo, UInt32 &lpdwNextCacheEntryInfoBufferSize ) : long
FindWindow ( string lpClassName, string lpWindowName ) : IntPtr
FindWindowEx ( IntPtr parentHandle, IntPtr childAfter, string className, IntPtr windowTitle ) : IntPtr
GetClientRect ( IntPtr hWnd, tagRECT &lpRect ) : bool
GetKeyState ( int nVirtKey ) : short
GetUrlCacheEntryInfo ( string lpszUrlName, IntPtr lpCacheEntryInfo, UInt32 &lpdwCacheEntryInfoBufferSize ) : bool
GetWindow ( IntPtr hWnd, uint uCmd ) : IntPtr
GetWindowDC ( IntPtr hWnd ) : IntPtr
GetWindowText ( IntPtr hWnd, StringBuilder title, int size ) : int
GlobalLock ( IntPtr hMem ) : IntPtr
GlobalSize ( IntPtr hMem ) : UIntPtr
GlobalUnlock ( IntPtr hMem ) : bool
InternetGetCookie ( string lpszUrlName, string lpszCookieName, [ lpszCookieData, [ lpdwSize ) : bool
InternetQueryOption ( IntPtr hInternet, int dwOption, IntPtr lpBuffer, [ lpdwBufferLength ) : bool
InternetSetCookie ( string lpszUrlName, string lpszCookieName, IntPtr lpszCookieData ) : bool
InternetSetOption ( IntPtr hInternet, int dwOption, IntPtr lpBuffer, int lpdwBufferLength ) : bool
IsWindow ( IntPtr hWnd ) : bool
IsWindowVisible ( IntPtr hWnd ) : bool
MapWindowPoints ( IntPtr hWndFrom, IntPtr hWndTo, [ pt, int cPoints ) : int
MessageBox ( IntPtr hWnd, String text, String caption, uint type ) : uint
ReadUrlCacheEntryStream ( IntPtr hUrlCacheStream, UInt32 dwLocation, IntPtr lpBuffer, UInt32 &lpdwLen, UInt32 dwReserved ) : IntPtr
RealGetWindowClass ( IntPtr hWnd, StringBuilder pszType, uint cchType ) : uint
ReleaseStgMedium ( [ pmedium ) : void
RetrieveUrlCacheEntryStream ( string lpszUrlName, IntPtr lpCacheEntryInfo, UInt32 &lpdwCacheEntryInfoBufferSize, long fRandomRead, UInt32 dwReserved ) : IntPtr
RevokeObjectParam ( [ pszKey ) : int
SHGetMalloc ( IMalloc &ppMalloc ) : int
SelectObject ( IntPtr hdc, IntPtr hgdiobj ) : IntPtr
SendMessage ( HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam ) : IntPtr
SendMessage ( HandleRef hWnd, uint Msg, IntPtr wParam, StringBuilder &lParam ) : IntPtr
SendMessage ( HandleRef hWnd, uint msg, IntPtr wParam, tagPOINT &lParam ) : IntPtr
SendMessage ( HandleRef hWnd, uint msg, IntPtr wParam, tagRECT &lParam ) : void
SetFocus ( IntPtr hWnd ) : IntPtr
SetStretchBltMode ( IntPtr hdc, StretchMode iStretchMode ) : bool
SetWindowLong ( IntPtr hWnd, int nIndex, IntPtr newProc ) : IntPtr
StretchBlt ( IntPtr hdcDest, int nXDest, int nYDest, int nWidthDest, int nHeightDest, IntPtr hdcSrc, int nXSrc, int nYSrc, int nWidthSrc, int nHeightSrc, TernaryRasterOperations dwRop ) : bool
SystemParametersInfo ( uint uiAction, uint uiParam, IntPtr pvParam, uint fWinIni ) : bool
SystemTimeToTzSpecificLocalTime ( IntPtr lpTimeZoneInformation, SYSTEMTIME &lpUniversalTime, SYSTEMTIME &lpLocalTime ) : long
UnlockUrlCacheEntryStream ( IntPtr hUrlCacheStream, UInt32 dwReserved ) : long
keybd_event ( byte bVk, byte bScan, uint dwFlags, UIntPtr dwExtraInfo ) : void

Method Details

DateTimeToFiletime() public static method

public static DateTimeToFiletime ( System.DateTime time ) : FILETIME
time System.DateTime
return FILETIME

DeleteFromUrlCache() public static method

Attempts to delete a cookie or cache entry
public static DeleteFromUrlCache ( string url ) : void
url string INTERNET_CACHE_ENTRY_INFO.lpszSourceUrlName
return void

FiletimeToDateTime() public static method

public static FiletimeToDateTime ( FILETIME fileTime ) : System.DateTime
fileTime FILETIME
return System.DateTime

FindUrlCacheEntries() public static method

UrlCache functionality is taken from: Scott McMaster ([email protected]) CodeProject article There were some issues with preparing URLs for RegExp to work properly. This is demonstrated in AllForms.SetupCookieCachePattern method urlPattern: . Dump the entire contents of the cache. Cookie: Lists all cookies on the system. Visited: Lists all of the history items. Cookie:.*\.example\.com Lists cookies from the example.com domain. http://www.example.com/example.html$: Lists the specific named file if present \.example\.com: Lists any and all entries from *.example.com. \.example\.com.*\.gif$: Lists the .gif files from *.example.com. \.js$: Lists the .js files in the cache.
public static FindUrlCacheEntries ( string urlPattern ) : ArrayList
urlPattern string
return System.Collections.ArrayList

GET_X_LPARAM() public static method

public static GET_X_LPARAM ( int lp ) : int
lp int
return int

GET_Y_LPARAM() public static method

public static GET_Y_LPARAM ( int lp ) : int
lp int
return int

GetWindowClass() public static method

public static GetWindowClass ( IntPtr Hwnd ) : string
Hwnd System.IntPtr
return string

GetWindowName() public static method

public static GetWindowName ( IntPtr Hwnd ) : string
Hwnd System.IntPtr
return string

HiWord() public static method

public static HiWord ( int number ) : int
number int
return int

LoWord() public static method

public static LoWord ( int number ) : int
number int
return int

MakeLParam() public static method

public static MakeLParam ( int LoWord, int HiWord ) : IntPtr
LoWord int
HiWord int
return System.IntPtr

MakeLong() public static method

public static MakeLong ( int LoWord, int HiWord ) : int
LoWord int
HiWord int
return int

SetSystemBeep() public static method

public static SetSystemBeep ( bool bEnable ) : bool
bEnable bool
return bool

ToStringFromFileTime() public static method

public static ToStringFromFileTime ( FILETIME ft ) : string
ft FILETIME
return string