|
martedì 1 maggio 2007
Tempo fa avevo la necessità di usare delle Windows API (Application Programming Interface) in un mio progetto Visual C# che stavo implementando con Visual Studio 2005, facendo qualche ricerca in internet ho scoperto che con il Prompt dei comandi di Visual Studio 2005 (installato di default insieme ad Visual Studio) si poteva estrarre e quindi visualizzare la lista completa di API (o funzioni) contenute in un file DLL (Dynamic-Link Library) usando un apposita utility da riga di comando chiamata DUMPBIN.
Dumpbin contiene un apposito comando chiamato : /EXPORTS la sintassi completa per esportare tutte le API di una determinata DLL e :
Dumpbin /EXPORTS /OUT: Nome_File_output.txt %windir%\System32\Nome_File.dll
/EXPORTS ...............................(comando per l’esportazzione)
/OUT: Nome_File_output ........(parametro che indica il nome del file dove salvare la lista di API esportate dalla DLL)
%windir%\System32\Nome_File.dll (è il percorso dove è collocata la DLL, nel nostro caso in Windows\System32\Nome_Del_File.dll)
Le dll da dove si possono esportare le API sono molte, le principali sono :
User32.dll, Kernel32.dll, Shell32.dll, advapi32.dll, wininet.dll, netapi32.dll, ecc.
Un esempio di esportazione in un file è :
dumpbin /EXPORTS /OUT: User32.dll_.txt %windir%\System32\User32.dll
e l’output che si salva nel file chiamato User32.dll_.txt è esattamente questo :
Dump of file C:\WINDOWS\System32\User32.dll
File Type: DLL
Section contains the following exports for USER32.dll
00000000 characteristics 41107EEC time date stamp Wed Aug 04 08:15:08 2004 0.00 version 1 ordinal base 732 number of functions 732 number of names
ordinal hint RVA name
1 0 0002F794 ActivateKeyboardLayout 2 1 0003016E AdjustWindowRect 3 2 000120A2 AdjustWindowRectEx 4 3 0005D07D AlignRects 5 4 000460ED AllowForegroundActivation 6 5 0002A239 AllowSetForegroundWindow 7 6 0002869C AnimateWindow 8 7 000597CF AnyPopup 9 8 0001716C AppendMenuA 10 9 0002C170 AppendMenuW 11 A 00045C1F ArrangeIconicWindows 12 B 0001674F AttachThreadInput 13 C 0000CDCB BeginDeferWindowPos 14 D 0000B4B1 BeginPaint 15 E 0005C61A BlockInput 16 F 0002F117 BringWindowToTop 17 10 0005AA66 BroadcastSystemMessage 18 11 0005AA66 BroadcastSystemMessageA 19 12 0005AA3F BroadcastSystemMessageExA 20 13 000268D7 BroadcastSystemMessageExW 21 14 00022CE3 BroadcastSystemMessageW 22 15 0005799E BuildReasonArray 23 16 0000F26C CalcMenuBar 24 17 0005ADBE CallMsgFilter 25 18 0005ADBE CallMsgFilterA 26 19 0002E828 CallMsgFilterW 27 1A 0000ED6E CallNextHookEx 28 1B 0000E34B CallWindowProcA 29 1C 0000C019 CallWindowProcW 30 1D 00045C37 CascadeChildWindows 31 1E 00054C31 CascadeWindows 32 1F 0002F492 ChangeClipboardChain 33 20 0005AFA8 ChangeDisplaySettingsA 34 21 00026A51 ChangeDisplaySettingsExA 35 22 000491B6 ChangeDisplaySettingsExW 36 23 0004921C ChangeDisplaySettingsW 37 24 0003EFB8 ChangeMenuA 38 25 00054E56 ChangeMenuW 39 26 0002EED5 CharLowerA 40 27 0002F002 CharLowerBuffA 41 28 00009C57 CharLowerBuffW 42 29 00009F64 CharLowerW 43 2A 0002EC40 CharNextA 44 2B 000593F6 CharNextExA 45 2C 0000E746 CharNextW 46 2D 0002EC6A CharPrevA 47 2E 0005942A CharPrevExA 48 2F 0000EB44 CharPrevW 49 30 0000AD9B CharToOemA 50 31 0002F8DD CharToOemBuffA 51 32 00056A11 CharToOemBuffW 52 33 0002C46E CharToOemW 53 34 00008D03 CharUpperA 54 35 0000ACE9 CharUpperBuffA 55 36 000091F3 CharUpperBuffW 56 37 000090AA CharUpperW 57 38 000189A8 CheckDlgButton 58 39 0001711B CheckMenuItem 59 3A 00054F9A CheckMenuRadioItem 60 3B 0004B9DB CheckRadioButton 61 3C 00028565 ChildWindowFromPoint 62 3D 00028551 ChildWindowFromPointEx 63 3E 00043979 CliImmSetHotKey 64 3F 00009E0A ClientThreadSetup 65 40 0000BF2C ClientToScreen 66 41 00024EE0 ClipCursor 67 42 0000EEE5 CloseClipboard 68 43 0002EDC3 CloseDesktop 69 44 00045C58 CloseWindow 70 45 0002F812 CloseWindowStation 71 46 00046969 CopyAcceleratorTableA 72 47 0003F97E CopyAcceleratorTableW 73 48 0002FBA0 CopyIcon 74 49 00012632 CopyImage 75 4A 0000C03D CopyRect 76 4B 0002FA7C CountClipboardFormats 77 4C 000431BA CreateAcceleratorTableA 78 4D 0002E642 CreateAcceleratorTableW 79 4E 0000CBF7 CreateCaret 80 4F 00046BEC CreateCursor 81 50 00045B10 CreateDesktopA 82 51 0002A7DF CreateDesktopW 83 52 0001FD41 CreateDialogIndirectParamA 84 53 0002EBED CreateDialogIndirectParamAorW 85 54 00022F95 CreateDialogIndirectParamW 86 55 00025EA0 CreateDialogParamA 87 56 0002629F CreateDialogParamW 88 57 00046C4F CreateIcon 89 58 00046D2F CreateIconFromResource 90 59 000149E4 CreateIconFromResourceEx 91 5A 000130CA CreateIconIndirect 92 5B 0003FAE0 CreateMDIWindowA 93 5C 00023761 CreateMDIWindowW 94 5D 0001363F CreateMenu 95 5E 00027138 CreatePopupMenu 96 5F 0002FAE6 CreateSystemThreads 97 60 0001190B CreateWindowExA 98 61 00011AD5 CreateWindowExW 99 62 00046107 CreateWindowStationA 100 63 0002A592 CreateWindowStationW 101 64 000268FE CsrBroadcastSystemMessageExW 102 65 00026714 CtxInitUser32 103 66 0005A92C DdeAbandonTransaction 104 67 00050F09 DdeAccessData 105 68 00050CCD DdeAddData 106 69 0005A24B DdeClientTransaction 107 6A 0005198D DdeCmpStringHandles 108 6B 00047DBC DdeConnect 109 6C 000480D7 DdeConnectList 110 6D 00051369 DdeCreateDataHandle 111 6E 00051A43 DdeCreateStringHandleA 112 6F 00027F70 DdeCreateStringHandleW 113 70 00047FBD DdeDisconnect 114 71 00048034 DdeDisconnectList 115 72 00044EED DdeEnableCallback 116 73 000514E2 DdeFreeDataHandle 117 74 00051B70 DdeFreeStringHandle 118 75 00050DF1 DdeGetData 119 76 0004A44B DdeGetLastError 120 77 0005C642 DdeGetQualityOfService 121 78 0004A48C DdeImpersonateClient 122 79 0004A4EE DdeInitializeA 123 7A 000281FA DdeInitializeW 124 7B 00051C0A DdeKeepStringHandle 125 7C 00028381 DdeNameService 126 7D 00059F4D DdePostAdvise 127 7E 0005A74F DdeQueryConvInfo 128 7F 000475A4 DdeQueryNextServer 129 80 00051C96 DdeQueryStringA 130 81 00051CB3 DdeQueryStringW 131 82 00047E64 DdeReconnect 132 83 0005C656 DdeSetQualityOfService 133 84 0005A8D1 DdeSetUserHandle 134 85 00050F7B DdeUnaccessData 135 86 0004A32A DdeUninitialize 136 87 0001759D DefDlgProcA 137 88 00014CFA DefDlgProcW 138 89 0003F685 DefFrameProcA 139 8A 0002430C DefFrameProcW 140 8B 0003F6D4 DefMDIChildProcA 141 8C 00024520 DefMDIChildProcW 142 8D 000465B6 DefRawInputProc 143 8E 0000DF6B DefWindowProcA 144 8F 0000B1E5 DefWindowProcW 145 90 0000CE13 DeferWindowPos 146 91 0000E87B DeleteMenu 147 92 00025985 DeregisterShellHookWindow 148 93 00025F7A DestroyAcceleratorTable 149 94 0000BFB0 DestroyCaret 150 95 0000E8CE DestroyCursor 151 96 0000E8CE DestroyIcon 152 97 0000E3A1 DestroyMenu 153 98 00057A80 DestroyReasons 154 99 0000E666 DestroyWindow 155 9A 00049CF0 DeviceEventWorker 156 9B 00046CED DialogBoxIndirectParamA 157 9C 00016896 DialogBoxIndirectParamAorW 158 9D 00022598 DialogBoxIndirectParamW 159 9E 000188E1 DialogBoxParamA 160 9F 00016702 DialogBoxParamW 161 A0 000460FA DisableProcessWindowsGhosting 162 A1 0000BCBD DispatchMessageA 163 A2 000089D9 DispatchMessageW 164 A3 00049B89 DisplayExitWindowsWarnings 165 A4 000534D8 DlgDirListA 166 A5 00047194 DlgDirListComboBoxA 167 A6 00047221 DlgDirListComboBoxW 168 A7 00053566 DlgDirListW 169 A8 00047252 DlgDirSelectComboBoxExA 170 A9 0004713E DlgDirSelectComboBoxExW 171 AA 000536F7 DlgDirSelectExA 172 AB 0005375D DlgDirSelectExW 173 AC 0005C66A DragDetect 174 AD 0005C67E DragObject 175 AE 0005C692 DrawAnimatedRects 176 AF 00056981 DrawCaption 177 B0 0005AE78 DrawCaptionTempA 178 B1 0003F059 DrawCaptionTempW 179 B2 0000F807 DrawEdge 180 B3 0000F623 DrawFocusRect 181 B4 00018F4E DrawFrame 182 B5 00022420 DrawFrameControl 183 B6 000201EF DrawIcon 184 B7 0000F38A DrawIconEx 185 B8 0003F3BC DrawMenuBar 186 B9 00054F65 DrawMenuBarTemp 187 BA 0003EE20 DrawStateA 188 BB 0001647A DrawStateW 189 BC 00025D61 DrawTextA 190 BD 00025D98 DrawTextExA 191 BE 000105D2 DrawTextExW 192 BF 0000FF89 DrawTextW 193 C0 0001C538 EditWndProc 194 C1 0002FE82 EmptyClipboard 195 C2 0000FC3C EnableMenuItem 196 C3 00057BAD EnableScrollBar 197 C4 0000C4D4 EnableWindow 198 C5 0000CD9F EndDeferWindowPos 199 C6 00016CC9 EndDialog 200 C7 0005C6F6 EndMenu 201 C8 0000B4C5 EndPaint 202 C9 00049C9D EndTask 203 CA 00057247 EnterReaderModeHelper 204 CB 0000E5BA EnumChildWindows 205 CC 0002DA71 EnumClipboardFormats 206 CD 0002E083 EnumDesktopWindows 207 CE 00025828 EnumDesktopsA 208 CF 0002E0A4 EnumDesktopsW 209 D0 0002E245 EnumDisplayDevicesA 210 D1 000253D9 EnumDisplayDevicesW 211 D2 0000DA8B EnumDisplayMonitors 212 D3 00025B91 EnumDisplaySettingsA 213 D4 00025A1D EnumDisplaySettingsExA 214 D5 000267E6 EnumDisplaySettingsExW 215 D6 000268AD EnumDisplaySettingsW 216 D7 000452B1 EnumPropsA 217 D8 000452EB EnumPropsExA 218 D9 00045309 EnumPropsExW 219 DA 000452CE EnumPropsW 220 DB 0000FACD EnumThreadWindows 221 DC 0002580B EnumWindowStationsA 222 DD 00045327 EnumWindowStationsW 223 DE 0000D935 EnumWindows 224 DF 0000BDD1 EqualRect 225 E0 0000CE27 ExcludeUpdateRgn 226 E1 00049E6D ExitWindowsEx 227 E2 0000D3C5 FillRect 228 E3 0002F3C6 FindWindowA 229 E4 0002F7D0 FindWindowExA 230 E5 00025916 FindWindowExW 231 E6 0002F245 FindWindowW 232 E7 00045C9D FlashWindow 233 E8 0005C71C FlashWindowEx 234 E9 0000F5FE FrameRect 235 EA 0004B671 FreeDDElParam 236 EB 0000DF1E GetActiveWindow 237 EC 0005AF84 GetAltTabInfo 238 ED 0005AF84 GetAltTabInfoA 239 EE 0002F446 GetAltTabInfoW 240 EF 0000D501 GetAncestor 242 F0 0000FAEE GetAppCompatFlags 241 F1 00008EAE GetAppCompatFlags2 243 F2 0000D051 GetAsyncKeyState 244 F3 000094FF GetCapture 245 F4 0002F105 GetCaretBlinkTime 246 F5 0002F0F1 GetCaretPos 247 F6 00024D4A GetClassInfoA 248 F7 0002557F GetClassInfoExA 249 F8 000229EC GetClassInfoExW 250 F9 000120D6 GetClassInfoW 251 FA 0000E49A GetClassLongA 252 FB 0000C884 GetClassLongW 253 FC 0000E032 GetClassNameA 254 FD 0000D470 GetClassNameW 255 FE 00045037 GetClassWord 256 FF 0000B556 GetClientRect 257 100 0005C742 GetClipCursor 258 101 0002FCB2 GetClipboardData 259 102 00030345 GetClipboardFormatNameA 260 103 00049178 GetClipboardFormatNameW 261 104 0002FE94 GetClipboardOwner 262 105 0000CE01 GetClipboardSequenceNumber 263 106 0005C730 GetClipboardViewer 264 107 0005C756 GetComboBoxInfo 265 108 0000CECD GetCursor 266 109 00030260 GetCursorFrameInfo 267 10A 0005C76A GetCursorInfo 268 10B 0000C566 GetCursorPos 269 10C 00008697 GetDC 270 10D 0000F21D GetDCEx 271 10E 0000D7BB GetDesktopWindow 272 10F 00045CDC GetDialogBaseUnits 273 110 0000C35C GetDlgCtrlID 274 111 000152A4 GetDlgItem 275 112 0004B885 GetDlgItemInt 276 113 0005AC06 GetDlgItemTextA 277 114 00016B40 GetDlgItemTextW 278 115 0000FFDD GetDoubleClickTime 279 116 0000C640 GetFocus 280 117 0000C4AE GetForegroundWindow 281 118 0002DEF7 GetGUIThreadInfo 282 119 0005C77E GetGuiResources 283 11A 0000E9A1 GetIconInfo 284 11B 00045CFB GetInputDesktop 285 11C 0000CE9D GetInputState 286 11D 0005C7A6 GetInternalWindowPos 287 11E 00051DA1 GetKBCodePage 288 11F 0003F3D4 GetKeyNameTextA 289 120 00049188 GetKeyNameTextW 290 121 0000C379 GetKeyState 291 122 0000C43C GetKeyboardLayout 292 123 0000BF8B GetKeyboardLayoutList 293 124 00043351 GetKeyboardLayoutNameA 294 125 00029DFF GetKeyboardLayoutNameW 295 126 0000EF35 GetKeyboardState 296 127 0002FA46 GetKeyboardType 297 128 00024E3E GetLastActivePopup 298 129 00009519 GetLastInputInfo 299 12A 0005CB62 GetLayeredWindowAttributes 300 12B 0005C7CE GetListBoxInfo 301 12C 0002EABE GetMenu 302 12D 0005C7E2 GetMenuBarInfo 303 12E 00040019 GetMenuCheckMarkDimensions 304 12F 00054EF7 GetMenuContextHelpId 305 130 0002719E GetMenuDefaultItem 306 131 000463FE GetMenuInfo 307 132 0001375B GetMenuItemCount 308 133 0003EEE8 GetMenuItemID 309 134 000138EC GetMenuItemInfoA 310 135 00027261 GetMenuItemInfoW 311 136 0005C80A GetMenuItemRect 312 137 0002749F GetMenuState 313 138 0003EF6E GetMenuStringA 314 139 000461BD GetMenuStringW 315 13A 0002EA45 GetMessageA 316 13B 00046591 GetMessageExtraInfo 317 13C 0000C6E4 GetMessagePos 318 13D 0000C210 GetMessageTime 319 13E 000091A3 GetMessageW 320 13F 0000E41B GetMonitorInfoA 321 140 0000D9E9 GetMonitorInfoW 322 141 0005C81E GetMouseMovePointsEx 323 142 0004BB21 GetNextDlgGroupItem 324 143 000263D3 GetNextDlgTabItem 325 144 0002FA8E GetOpenClipboardWindow 326 145 0000B5D7 GetParent 327 146 0005C832 GetPriorityClipboardFormat 328 147 000460BD GetProcessDefaultLayout 329 148 00009172 GetProcessWindowStation 330 149 00045E06 GetProgmanWindow 331 14A 0000EE3C GetPropA 332 14B 0000B983 GetPropW 333 14C 0002F0B4 GetQueueStatus 334 14D 000509C9 GetRawInputBuffer 335 14E 0005C85A GetRawInputData 336 14F 0005AAB5 GetRawInputDeviceInfoA 337 150 00046231 GetRawInputDeviceInfoW 338 151 0005C882 GetRawInputDeviceList 339 152 00057ACC GetReasonTitleFromReasonCode 340 153 0005C896 GetRegisteredRawInputDevices 341 154 00013A01 GetScrollBarInfo 342 155 00013A2F GetScrollInfo 343 156 0000F66F GetScrollPos 344 157 0000F7B7 GetScrollRange 345 158 0000922F GetShellWindow 346 159 0001355A GetSubMenu 347 15A 00008E50 GetSysColor 348 15B 00008E83 GetSysColorBrush 349 15C 0000E7B8 GetSystemMenu 350 15D 00008F75 GetSystemMetrics 351 15E 0004A299 GetTabbedTextExtentA 352 15F 0004A26F GetTabbedTextExtentW 353 160 0004342D GetTaskmanWindow 354 161 00009851 GetThreadDesktop 355 162 0000F209 GetTitleBarInfo 356 163 0000D16F GetTopWindow 357 164 0000BCEC GetUpdateRect 358 165 0000CE3B GetUpdateRgn 359 166 00025656 GetUserObjectInformationA 360 167 00008CEF GetUserObjectInformationW 361 168 0004583D GetUserObjectSecurity 362 169 00045873 GetWinStationInfo 363 16A 0000C298 GetWindow 364 16B 00045E59 GetWindowContextHelpId 365 16C 00008FF9 GetWindowDC 366 16D 0000F122 GetWindowInfo 367 16E 0000947C GetWindowLongA 368 16F 0000887E GetWindowLongW 369 170 0005AA8C GetWindowModuleFileName 370 171 0005AA8C GetWindowModuleFileNameA 371 172 00046208 GetWindowModuleFileNameW 372 173 0000EB14 GetWindowPlacement 373 174 0000B57C GetWindowRect 374 175 00022DD1 GetWindowRgn 375 176 00011A39 GetWindowRgnBox 376 177 0002F82E GetWindowTextA 377 178 0003EEAB GetWindowTextLengthA 378 179 000153A8 GetWindowTextLengthW 379 17A 0000C9FD GetWindowTextW 380 17B 00008A58 GetWindowThreadProcessId 381 17C 0000EF8E GetWindowWord 382 17D 000457DD GrayStringA 383 17E 0004580D GrayStringW 384 17F 0000CB4B HideCaret 385 180 0005C8BE HiliteMenuItem 386 181 0005B060 IMPGetIMEA 387 182 0005B04F IMPGetIMEW 388 183 0005B082 IMPQueryIMEA 389 184 0005B071 IMPQueryIMEW 390 185 0005B0A4 IMPSetIMEA 391 186 0005B093 IMPSetIMEW 392 187 0005C8D2 ImpersonateDdeClientWindow 393 188 0002296D InSendMessage 394 189 0002FC8A InSendMessageEx 395 18A 0000C64D InflateRect 396 18B 0004631F InitializeLpkHooks 397 18C 000093FB InitializeWin32EntryTable 398 18D 00024F9A InsertMenuA 399 18E 0003F430 InsertMenuItemA 400 18F 000270FF InsertMenuItemW 401 190 00027145 InsertMenuW 402 191 0000F231 InternalGetWindowText 403 192 0000B3E7 IntersectRect 404 193 0000B49D InvalidateRect 405 194 0001019F InvalidateRgn 406 195 0003F992 InvertRect 407 196 0001760B IsCharAlphaA 408 197 0003F189 IsCharAlphaNumericA 409 198 0002A088 IsCharAlphaNumericW 410 199 0000EBC0 IsCharAlphaW 411 19A 00020AD6 IsCharLowerA 412 19B 0003F0D2 IsCharLowerW 413 19C 00021DC1 IsCharUpperA 414 19D 00059D87 IsCharUpperW 415 19E 0000BEF3 IsChild 416 19F 0000CDED IsClipboardFormatAvailable 417 1A0 00025C98 IsDialogMessage 418 1A1 00025C98 IsDialogMessageA 419 1A2 0002E73E IsDialogMessageW 420 1A3 00030315 IsDlgButtonChecked 421 1A4 00059D47 IsGUIThread 422 1A5 00059809 IsHungAppWindow 423 1A6 0000C48A IsIconic 424 1A7 000254A1 IsMenu 425 1A8 0000C676 IsRectEmpty 426 1A9 0000E599 IsServerSideWindow 427 1AA 0000B04E IsWinEventHookInstalled 428 1AB 0000B7DB IsWindow 429 1AC 0000C592 IsWindowEnabled 430 1AD 0000E5F0 IsWindowInDestroy 431 1AE 0000C416 IsWindowUnicode 432 1AF 0000BD8E IsWindowVisible 433 1B0 0000D420 IsZoomed 434 1B1 00045DA5 KillSystemTimer 435 1B2 00008C1A KillTimer 436 1B3 0002F50D LoadAcceleratorsA 437 1B4 0001372D LoadAcceleratorsW 438 1B5 000167A8 LoadBitmapA 439 1B6 00027D6B LoadBitmapW 440 1B7 0000E8FA LoadCursorA 441 1B8 00043A11 LoadCursorFromFileA 442 1B9 000439F2 LoadCursorFromFileW 443 1BA 00009B69 LoadCursorW 444 1BB 000121AE LoadIconA 445 1BC 00012174 LoadIconW 446 1BD 0002F4DC LoadImageA 447 1BE 000142A4 LoadImageW 448 1BF 00045F3B LoadKeyboardLayoutA 449 1C0 00045F13 LoadKeyboardLayoutEx 450 1C1 00029DE2 LoadKeyboardLayoutW 451 1C2 00029E9E LoadLocalFonts 452 1C3 0003F7A3 LoadMenuA 453 1C4 00011BA3 LoadMenuIndirectA 454 1C5 00011BA3 LoadMenuIndirectW 455 1C6 00011B2C LoadMenuW 456 1C7 0002661B LoadRemoteFonts 457 1C8 0002EC98 LoadStringA 458 1C9 00009C36 LoadStringW 459 1CA 000263BB LockSetForegroundWindow 460 1CB 00029F9B LockWindowStation 461 1CC 0001F84F LockWindowUpdate 462 1CD 0005C8FA LockWorkStation 463 1CE 00046D11 LookupIconIdFromDirectory 464 1CF 00013F5B LookupIconIdFromDirectoryEx 465 1D0 0000AC57 MBToWCSEx 466 1D1 00055931 MB_GetString 467 1D2 0004BA46 MapDialogRect 468 1D3 000103E9 MapVirtualKeyA 469 1D4 0005AC3F MapVirtualKeyExA 470 1D5 00049198 MapVirtualKeyExW 471 1D6 0003FFBE MapVirtualKeyW 472 1D7 0000B9D7 MapWindowPoints 473 1D8 0005C90C MenuItemFromPoint 474 1D9 0004654C MenuWindowProcA 475 1DA 00046507 MenuWindowProcW 476 1DB 000302D3 MessageBeep 477 1DC 0004050B MessageBoxA 478 1DD 0004057D MessageBoxExA 479 1DE 00040559 MessageBoxExW 480 1DF 0002AEF1 MessageBoxIndirectA 481 1E0 000560B7 MessageBoxIndirectW 482 1E1 00055FE8 MessageBoxTimeoutA 483 1E2 00055F65 MessageBoxTimeoutW 484 1E3 00056116 MessageBoxW 485 1E4 0003EF2B ModifyMenuA 486 1E5 00026B6A ModifyMenuW 487 1E6 0000E4E9 MonitorFromPoint 488 1E7 0000E1FB MonitorFromRect 489 1E8 0000D989 MonitorFromWindow 490 1E9 0000D515 MoveWindow 491 1EA 0000BC8E MsgWaitForMultipleObjects 492 1EB 0000BC4A MsgWaitForMultipleObjectsEx 493 1EC 0000C766 NotifyWinEvent 494 1ED 0003FF5C OemKeyScan 495 1EE 0002ECF2 OemToCharA 496 1EF 0002ED31 OemToCharBuffA 497 1F0 0003FFDB OemToCharBuffW 498 1F1 00056A56 OemToCharW 499 1F2 0000B4D9 OffsetRect 500 1F3 0000EEF7 OpenClipboard 501 1F4 00025846 OpenDesktopA 502 1F5 0002E0C2 OpenDesktopW 503 1F6 00045DC0 OpenIcon 504 1F7 00026607 OpenInputDesktop 505 1F8 000256BE OpenWindowStationA 506 1F9 00045AE4 OpenWindowStationW 507 1FA 0004B55B PackDDElParam 508 1FB 0002F76C PaintDesktop 509 1FC 0002EB22 PaintMenuBar 510 1FD 0000CEFD PeekMessageA 511 1FE 00009278 PeekMessageW 512 1FF 0000DB62 PostMessageA 513 200 00008CA3 PostMessageW 514 201 0002EDEB PostQuitMessage 515 202 0002EBB0 PostThreadMessageA 516 203 0000FDEA PostThreadMessageW 517 204 00026420 PrintWindow 518 205 00050604 PrivateExtractIconExA 519 206 0002F185 PrivateExtractIconExW 520 207 000505AA PrivateExtractIconsA 521 208 0001438B PrivateExtractIconsW 522 209 0005CA0E PrivateSetDbgTag 523 20A 0005CA9A PrivateSetRipFlags 524 20B 0000C531 PtInRect 525 20C 0005C95A QuerySendMessage 526 20D 0005C96E QueryUserCounters 527 20E 0005C982 RealChildWindowFromPoint 528 20F 0005AF13 RealGetWindowClass 529 210 0005AF13 RealGetWindowClassA 530 211 000491EF RealGetWindowClassW 531 212 000572BE ReasonCodeNeedsBugID 532 213 000572A7 ReasonCodeNeedsComment 533 214 000492F6 RecordShutdownReason 534 215 0000C6BC RedrawWindow 535 216 00012316 RegisterClassA 536 217 00014315 RegisterClassExA 537 218 0000AE29 RegisterClassExW 538 219 0000A5EC RegisterClassW 539 21A 00008E00 RegisterClipboardFormatA 540 21B 0000ADDE RegisterClipboardFormatW 541 21C 0002A101 RegisterDeviceNotificationA 542 21D 000264D1 RegisterDeviceNotificationW 543 21E 0002678B RegisterHotKey 544 21F 000290BD RegisterLogonProcess 545 220 0002A2F5 RegisterMessagePumpHook 546 221 0005C9AA RegisterRawInputDevices 547 222 0002A3A7 RegisterServicesProcess 548 223 00025937 RegisterShellHookWindow 549 224 00045E71 RegisterSystemThread 550 225 0005C9BE RegisterTasklist 551 226 0002A9DF RegisterUserApiHook 552 227 00008E00 RegisterWindowMessageA 553 228 0000ADDE RegisterWindowMessageW 554 229 0000C9A4 ReleaseCapture 555 22A 0000866D ReleaseDC 556 22B 0002724D RemoveMenu 557 22C 0000EEA2 RemovePropA 558 22D 0000DD70 RemovePropW 559 22E 0002FB88 ReplyMessage 560 22F 0005C9D2 ResolveDesktopForWOW 561 230 0004B6D5 ReuseDDElParam 562 231 0000C5B8 ScreenToClient 563 232 000549F4 ScrollChildren 564 233 0000B086 ScrollDC 565 234 00010438 ScrollWindow 566 235 0002F8A9 ScrollWindowEx 567 236 0002152F SendDlgItemMessageA 568 237 000227FC SendDlgItemMessageW 569 238 0005B03E SendIMEMessageExA 570 239 0005B02D SendIMEMessageExW 571 23A 0000C454 SendInput 572 23B 0000E2AE SendMessageA 573 23C 0005ACD1 SendMessageCallbackA 574 23D 0000EA4B SendMessageCallbackW 575 23E 0000FF21 SendMessageTimeoutA 576 23F 0000E71C SendMessageTimeoutW 577 240 0000B762 SendMessageW 578 241 00043668 SendNotifyMessageA 579 242 0000EB8C SendNotifyMessageW 580 243 00015380 SetActiveWindow 581 244 0000C988 SetCapture 582 245 0001433E SetCaretBlinkTime 583 246 0000CC0B SetCaretPos 584 247 000101DB SetClassLongA 585 248 000259CB SetClassLongW 586 249 0005C9E6 SetClassWord 587 24A 0002FF10 SetClipboardData 588 24B 0002F47E SetClipboardViewer 589 24C 0002F780 SetConsoleReserveKeys 590 24D 0000C6A8 SetCursor 591 24E 0005C9FA SetCursorContents 592 24F 00045E8C SetCursorPos 593 250 00045FC4 SetDebugErrorLevel 594 251 000453DD SetDeskWallpaper 595 252 0004B803 SetDlgItemInt 596 253 000260D5 SetDlgItemTextA 597 254 00022730 SetDlgItemTextW 598 255 00045EA7 SetDoubleClickTime 599 256 0000E5DC SetFocus 600 257 000166A7 SetForegroundWindow 601 258 0005CA36 SetInternalWindowPos 602 259 0000EF49 SetKeyboardState 603 25A 00056B90 SetLastErrorEx 604 25B 000101B3 SetLayeredWindowAttributes 605 25C 0002A3E8 SetLogonNotifyWindow 606 25D 0003F116 SetMenu 607 25E 0005CA5E SetMenuContextHelpId 608 25F 000270EB SetMenuDefaultItem 609 260 00054E34 SetMenuInfo 610 261 0003F7D2 SetMenuItemBitmaps 611 262 0005AA06 SetMenuItemInfoA 612 263 0002C137 SetMenuItemInfoW 613 264 0004659E SetMessageExtraInfo 614 265 0002DA66 SetMessageQueue 615 266 0000FDAE SetParent 616 267 000460D5 SetProcessDefaultLayout 617 268 0002F7BC SetProcessWindowStation 618 269 00045E41 SetProgmanWindow 619 26A 0000EDFA SetPropA 620 26B 0000DDB3 SetPropW 621 26C 0000B46E SetRect 622 26D 0000D450 SetRectEmpty 623 26E 0000902C SetScrollInfo 624 26F 0000F780 SetScrollPos 625 270 0000F6BB SetScrollRange 626 271 00045DED SetShellWindow 627 272 00027AC7 SetShellWindowEx 628 273 00056164 SetSysColors 629 274 00056A9E SetSysColorsTemp 630 275 000562ED SetSystemCursor 631 276 0002398E SetSystemMenu 632 277 0005CAD6 SetSystemTimer 633 278 00027D89 SetTaskmanWindow 634 279 0002F7A8 SetThreadDesktop 635 27A 00008C06 SetTimer 636 27B 0005CA86 SetUserObjectInformationA 637 27C 0005CA86 SetUserObjectInformationW 638 27D 0002A568 SetUserObjectSecurity 639 27E 0002E3D3 SetWinEventHook 640 27F 0002563B SetWindowContextHelpId 641 280 0000DED3 SetWindowLongA 642 281 0000DEF1 SetWindowLongW 643 282 0002FBEA SetWindowPlacement 644 283 0000C78E SetWindowPos 645 284 00011DE0 SetWindowRgn 646 285 00029F0F SetWindowStationUser 647 286 0000DC5A SetWindowTextA 648 287 0000BADE SetWindowTextW 649 288 0000EB28 SetWindowWord 650 289 00024FDD SetWindowsHookA 651 28A 000302B2 SetWindowsHookExA 652 28B 0002E621 SetWindowsHookExW 653 28C 0002A150 SetWindowsHookW 654 28D 0000CB5F ShowCaret 655 28E 0000D787 ShowCursor 656 28F 00045EBF ShowOwnedPopups 657 290 00010142 ShowScrollBar 658 291 0003FE21 ShowStartGlass 659 292 0000D4DE ShowWindow 660 293 0002C233 ShowWindowAsync 661 294 0002B14E SoftModalMessageBox 662 295 00027C72 SubtractRect 663 296 00045EDA SwapMouseButton 664 297 000279A3 SwitchDesktop 665 298 000454F4 SwitchToThisWindow 666 299 00010554 SystemParametersInfoA 667 29A 00009D06 SystemParametersInfoW 668 29B 0004A1DD TabbedTextOutA 669 29C 0004A1AE TabbedTextOutW 670 29D 00045EF2 TileChildWindows 671 29E 00054E0D TileWindows 672 29F 000453F9 ToAscii 673 2A0 00045456 ToAsciiEx 674 2A1 0005628A ToUnicode 675 2A2 000562BB ToUnicodeEx 676 2A3 0000FDC2 TrackMouseEvent 677 2A4 00054F16 TrackPopupMenu 678 2A5 0005CAFE TrackPopupMenuEx 679 2A6 0000FE23 TranslateAccelerator 680 2A7 0000FE23 TranslateAcceleratorA 681 2A8 0000943D TranslateAcceleratorW 682 2A9 0000FE8E TranslateMDISysAccel 683 2AA 00008BCE TranslateMessage 684 2AB 000089F1 TranslateMessageEx 685 2AC 0002E544 UnhookWinEvent 686 2AD 0002A16B UnhookWindowsHook 687 2AE 0002F29F UnhookWindowsHookEx 688 2AF 0000C0FD UnionRect 689 2B0 00045F99 UnloadKeyboardLayout 690 2B1 000229D8 UnlockWindowStation 691 2B2 0004B5BF UnpackDDElParam 692 2B3 0002E438 UnregisterClassA 693 2B4 000098A4 UnregisterClassW 694 2B5 000264EF UnregisterDeviceNotification 695 2B6 0005CB26 UnregisterHotKey 696 2B7 0002793D UnregisterMessagePumpHook 697 2B8 00029EC1 UnregisterUserApiHook 698 2B9 0000DCF3 UpdateLayeredWindow 699 2BA 0002AB02 UpdatePerUserSystemParameters 700 2BB 0000C064 UpdateWindow 701 2BC 0002C4BA User32InitializeImmEntryTable 702 2BD 00010EB9 UserClientDllInitialize 703 2BE 0005CB76 UserHandleGrantAccess 704 2BF 00010DD1 UserLpkPSMTextOut 705 2C0 00049FF3 UserLpkTabbedTextOut 706 2C1 0000D76F UserRealizePalette 707 2C2 00043468 UserRegisterWowHandlers 708 2C3 0005DA68 VRipOutput 709 2C4 0005DA68 VTagOutput 710 2C5 0002EC29 ValidateRect 711 2C6 0000CEDA ValidateRgn 712 2C7 000301A2 VkKeyScanA 713 2C8 0005AD33 VkKeyScanExA 714 2C9 0000C914 VkKeyScanExW 715 2CA 0002FBFE VkKeyScanW 716 2CB 00010227 WCSToMBEx 717 2CC 0005B00B WINNLSEnableIME 718 2CD 0005B01C WINNLSGetEnableStatus 719 2CE 0001D13F WINNLSGetIMEHotkey 720 2CF 0003F815 WaitForInputIdle 721 2D0 000093E9 WaitMessage 722 2D1 0005CB9E Win32PoolAllocationStats 723 2D2 000250CF WinHelpA 724 2D3 000517D4 WinHelpW 725 2D4 0000D757 WindowFromDC 726 2D5 0000C57E WindowFromPoint 727 2D6 00056365 keybd_event 728 2D7 00056321 mouse_event 729 2D8 0000A2DE wsprintfA 730 2D9 0000A862 wsprintfW 731 2DA 0000A041 wvsprintfA 732 2DB 0000A87D wvsprintfW
Summary
2000 .data 3000 .reloc 2B000 .rsrc 5F000 .text
Una volta individuata l’API che pensate che faccia al caso vostro fate una ricerca in internet per approfondire la sintassi di utilizzo e poi potete usarla nelle vostre applicazioni scritte in C# usando una semplice sintassi :
Innanzitutto dovete aggiungere la direttiva using:
using System.Runtime.InteropServices;
per poter usare DllImport(Nome_File) la sintassi finale di utilizzo è :
[DllImport("User32.dll")]
public static extern int MessageBox(int h, string m, string c, int type);
fatto questo potete finalmente utilizzare la vostra Windows API che nel nostro caso è la MessageBox(), nella dichiarazione come vedete dovete specificare la parola chiave extern per informare il compilatore che l’implementazione della funzione è per l'appunto esterna contenuta nella dll specificata nella DllImport, quindi a noi basta solo richiamare (subito dopo avere specificato in quale dll si trova) la sua interfaccia.
E per finire usiamo questa benedetta API :
private void btnMessage_Click ( object sender, EventArgs e) { MessageBox (0,"API Message Box","API Demo",0); }
Ciao a tutti e alla prossima
Ciao, volevo solo segnalare due link che trovo siano utili a chi sta incominciando a programmare :
- Il primo link è quello del Prof. camuso che conta (al momento che sto scrivendo) circa 54506 visite, nel sito si possono trovare delle videolezioni su un bel po’ di argomenti, tra questi : una serie completa sul linguaggio C# e Visual Studio 2005 Express, sul Delphi, sulla OOP in generale, sulla SQL, sull’ASP, sul Pascal, sul C++ e tanti altri argomenti interessanti, vi posso assicurare che le video lezioni sono veramente ben fatte sia come qualità video-audio che come sono strutturate.
- Il secondo link che voglio segnalare è DocentiPuntoOrg, nel quale si possono al C#e dei corsi scritti da veri e propri insegnanti specializzati in diverse materie e diversi cicli scolastici, nel sito si può trovare anche una guida al C# che è ancora in fase di sviluppo.
P.S. : Queta è la prima volta che uso IMHO spero di aver fatto tutto giusto !
|