你调用未了公开的函数?未公开的函数可能在XP做了变化,不一样了,我以前也有这个经验,不过不是这个API,是其他的,也是在XP下无效

解决方案 »

  1.   

    这是我机器上的Shell32.dll函数列表,也没有181号函数,但是在我的机器上却可以使用!!
    LIBRARY     SHELL32.DLLEXPORTS
        CheckEscapesA                  @44  ; CheckEscapesA
        CheckEscapesW                  @81  ; CheckEscapesW
        CommandLineToArgvW             @125 ; CommandLineToArgvW
        Control_FillCache_RunDLL       @133 ; Control_FillCache_RunDLL
        Control_FillCache_RunDLLA      @135 ; Control_FillCache_RunDLLA
        Control_FillCache_RunDLLW      @138 ; Control_FillCache_RunDLLW
        Control_RunDLL                 @148 ; Control_RunDLL
        Control_RunDLLA                @150 ; Control_RunDLLA
        Control_RunDLLAsUserW          @199 ; Control_RunDLLAsUserW
        Control_RunDLLW                @226 ; Control_RunDLLW
        DllCanUnloadNow                @228 ; DllCanUnloadNow
        DllGetClassObject              @229 ; DllGetClassObject
        DllGetVersion                  @233 ; DllGetVersion
        DllInstall                     @234 ; DllInstall
        DllRegisterServer              @235 ; DllRegisterServer
        DllUnregisterServer            @236 ; DllUnregisterServer
        DoEnvironmentSubstA            @237 ; DoEnvironmentSubstA
        DoEnvironmentSubstW            @238 ; DoEnvironmentSubstW
        DragAcceptFiles                @241 ; DragAcceptFiles
        DragFinish                     @245 ; DragFinish
        DragQueryFile                  @246 ; DragQueryFile
        DragQueryFileA                 @247 ; DragQueryFileA
        DragQueryFileAorW              @248 ; DragQueryFileAorW
        DragQueryFileW                 @253 ; DragQueryFileW
        DragQueryPoint                 @254 ; DragQueryPoint
        DuplicateIcon                  @255 ; DuplicateIcon
        ExtractAssociatedIconA         @260 ; ExtractAssociatedIconA
        ExtractAssociatedIconExA       @261 ; ExtractAssociatedIconExA
        ExtractAssociatedIconExW       @262 ; ExtractAssociatedIconExW
        ExtractAssociatedIconW         @263 ; ExtractAssociatedIconW
        ExtractIconA                   @264 ; ExtractIconA
        ExtractIconEx                  @265 ; ExtractIconEx
        ExtractIconExA                 @266 ; ExtractIconExA
        ExtractIconExW                 @267 ; ExtractIconExW
        ExtractIconResInfoA            @268 ; ExtractIconResInfoA
        ExtractIconResInfoW            @269 ; ExtractIconResInfoW
        ExtractIconW                   @270 ; ExtractIconW
        ExtractVersionResource16W      @271 ; ExtractVersionResource16W
        FindExeDlgProc                 @272 ; FindExeDlgProc
        FindExecutableA                @273 ; FindExecutableA
        FindExecutableW                @274 ; FindExecutableW
        FreeIconList                   @275 ; FreeIconList
        InternalExtractIconListA       @276 ; InternalExtractIconListA
        InternalExtractIconListW       @277 ; InternalExtractIconListW
        OpenAs_RunDLL                  @278 ; OpenAs_RunDLL
        OpenAs_RunDLLA                 @279 ; OpenAs_RunDLLA
        OpenAs_RunDLLW                 @280 ; OpenAs_RunDLLW
        PrintersGetCommand_RunDLL      @281 ; PrintersGetCommand_RunDLL
        PrintersGetCommand_RunDLLA     @282 ; PrintersGetCommand_RunDLLA
        PrintersGetCommand_RunDLLW     @283 ; PrintersGetCommand_RunDLLW
        RealShellExecuteA              @284 ; RealShellExecuteA
        RealShellExecuteExA            @285 ; RealShellExecuteExA
        RealShellExecuteExW            @286 ; RealShellExecuteExW
        RealShellExecuteW              @287 ; RealShellExecuteW
        RegenerateUserEnvironment      @288 ; RegenerateUserEnvironment
        SHAddToRecentDocs              @289 ; SHAddToRecentDocs
        SHAppBarMessage                @290 ; SHAppBarMessage
        SHBindToParent                 @291 ; SHBindToParent
        SHBrowseForFolder              @292 ; SHBrowseForFolder
        SHBrowseForFolderA             @293 ; SHBrowseForFolderA
        SHBrowseForFolderW             @294 ; SHBrowseForFolderW
        SHChangeNotify                 @295 ; SHChangeNotify
        SHChangeNotifySuspendResume    @296 ; SHChangeNotifySuspendResume
        SHCreateDirectoryExA           @297 ; SHCreateDirectoryExA
        SHCreateDirectoryExW           @298 ; SHCreateDirectoryExW
        SHCreateProcessAsUserW         @299 ; SHCreateProcessAsUserW
        SHEmptyRecycleBinA             @300 ; SHEmptyRecycleBinA
        SHEmptyRecycleBinW             @301 ; SHEmptyRecycleBinW
        SHExtractIconsW                @302 ; SHExtractIconsW
        SHFileOperation                @303 ; SHFileOperation
        SHFileOperationA               @304 ; SHFileOperationA
        SHFileOperationW               @305 ; SHFileOperationW
        SHFormatDrive                  @306 ; SHFormatDrive
        SHFreeNameMappings             @307 ; SHFreeNameMappings
        SHGetDataFromIDListA           @308 ; SHGetDataFromIDListA
        SHGetDataFromIDListW           @309 ; SHGetDataFromIDListW
        SHGetDesktopFolder             @310 ; SHGetDesktopFolder
        SHGetDiskFreeSpaceA            @311 ; SHGetDiskFreeSpaceA
        SHGetDiskFreeSpaceExA          @312 ; SHGetDiskFreeSpaceExA
        SHGetDiskFreeSpaceExW          @313 ; SHGetDiskFreeSpaceExW
        SHGetFileInfo                  @314 ; SHGetFileInfo
        SHGetFileInfoA                 @315 ; SHGetFileInfoA
        SHGetFileInfoW                 @316 ; SHGetFileInfoW
        SHGetFolderLocation            @317 ; SHGetFolderLocation
        SHGetFolderPathA               @318 ; SHGetFolderPathA
        SHGetFolderPathW               @319 ; SHGetFolderPathW
        SHGetIconOverlayIndexA         @320 ; SHGetIconOverlayIndexA
        SHGetIconOverlayIndexW         @321 ; SHGetIconOverlayIndexW
        SHGetInstanceExplorer          @322 ; SHGetInstanceExplorer
        SHGetMalloc                    @323 ; SHGetMalloc
        SHGetNewLinkInfo               @324 ; SHGetNewLinkInfo
        SHGetNewLinkInfoA              @179 ; SHGetNewLinkInfoA
        SHGetNewLinkInfoW              @180 ; SHGetNewLinkInfoW
        SHGetPathFromIDList            @325 ; SHGetPathFromIDList
        SHGetPathFromIDListA           @326 ; SHGetPathFromIDListA
        SHGetPathFromIDListW           @327 ; SHGetPathFromIDListW
        SHGetSettings                  @328 ; SHGetSettings
        SHGetSpecialFolderLocation     @329 ; SHGetSpecialFolderLocation
        SHGetSpecialFolderPathA        @330 ; SHGetSpecialFolderPathA
        SHGetSpecialFolderPathW        @331 ; SHGetSpecialFolderPathW
        SHHelpShortcuts_RunDLL         @332 ; SHHelpShortcuts_RunDLL
      

  2.   

    SHHelpShortcuts_RunDLLA        @333 ; SHHelpShortcuts_RunDLLA
        SHHelpShortcuts_RunDLLW        @334 ; SHHelpShortcuts_RunDLLW
        SHInvokePrinterCommandA        @335 ; SHInvokePrinterCommandA
        SHInvokePrinterCommandW        @336 ; SHInvokePrinterCommandW
        SHIsFileAvailableOffline       @337 ; SHIsFileAvailableOffline
        SHLoadInProc                   @338 ; SHLoadInProc
        SHLoadNonloadedIconOverlayIdentifiers @339 ; SHLoadNonloadedIconOverlayIdentifiers
        SHPathPrepareForWriteA         @340 ; SHPathPrepareForWriteA
        SHPathPrepareForWriteW         @341 ; SHPathPrepareForWriteW
        SHQueryRecycleBinA             @342 ; SHQueryRecycleBinA
        SHQueryRecycleBinW             @343 ; SHQueryRecycleBinW
        SHUpdateRecycleBinIcon         @344 ; SHUpdateRecycleBinIcon
        SheChangeDirA                  @345 ; SheChangeDirA
        SheChangeDirExA                @346 ; SheChangeDirExA
        SheChangeDirExW                @347 ; SheChangeDirExW
        SheChangeDirW                  @348 ; SheChangeDirW
        SheConvertPathW                @349 ; SheConvertPathW
        SheFullPathA                   @350 ; SheFullPathA
        SheFullPathW                   @351 ; SheFullPathW
        SheGetCurDrive                 @352 ; SheGetCurDrive
        SheGetDirA                     @353 ; SheGetDirA
        SheGetDirExW                   @354 ; SheGetDirExW
        SheGetDirW                     @355 ; SheGetDirW
        SheGetPathOffsetW              @356 ; SheGetPathOffsetW
        SheRemoveQuotesA               @357 ; SheRemoveQuotesA
        SheRemoveQuotesW               @358 ; SheRemoveQuotesW
        SheSetCurDrive                 @359 ; SheSetCurDrive
        SheShortenPathA                @360 ; SheShortenPathA
        SheShortenPathW                @361 ; SheShortenPathW
        ShellAboutA                    @362 ; ShellAboutA
        ShellAboutW                    @363 ; ShellAboutW
        ShellExec_RunDLL               @364 ; ShellExec_RunDLL
        ShellExec_RunDLLA              @365 ; ShellExec_RunDLLA
        ShellExec_RunDLLW              @366 ; ShellExec_RunDLLW
        ShellExecuteA                  @367 ; ShellExecuteA
        ShellExecuteEx                 @368 ; ShellExecuteEx
        ShellExecuteExA                @369 ; ShellExecuteExA
        ShellExecuteExW                @370 ; ShellExecuteExW
        ShellExecuteW                  @371 ; ShellExecuteW
        ShellHookProc                  @372 ; ShellHookProc
        Shell_NotifyIcon               @373 ; Shell_NotifyIcon
        Shell_NotifyIconA              @374 ; Shell_NotifyIconA
        Shell_NotifyIconW              @375 ; Shell_NotifyIconW
        StrChrA                        @376 ; StrChrA
        StrChrIA                       @377 ; StrChrIA
        StrChrIW                       @378 ; StrChrIW
        StrChrW                        @379 ; StrChrW
        StrCmpNA                       @380 ; StrCmpNA
        StrCmpNIA                      @381 ; StrCmpNIA
        StrCmpNIW                      @382 ; StrCmpNIW
        StrCmpNW                       @383 ; StrCmpNW
        StrCpyNA                       @384 ; StrCpyNA
        StrCpyNW                       @385 ; StrCpyNW
        StrNCmpA                       @386 ; StrNCmpA
        StrNCmpIA                      @387 ; StrNCmpIA
        StrNCmpIW                      @388 ; StrNCmpIW
        StrNCmpW                       @389 ; StrNCmpW
        StrNCpyA                       @390 ; StrNCpyA
        StrNCpyW                       @391 ; StrNCpyW
        StrRChrA                       @392 ; StrRChrA
        StrRChrIA                      @393 ; StrRChrIA
        StrRChrIW                      @394 ; StrRChrIW
        StrRChrW                       @395 ; StrRChrW
        StrRStrA                       @396 ; StrRStrA
        StrRStrIA                      @397 ; StrRStrIA
        StrRStrIW                      @398 ; StrRStrIW
        StrRStrW                       @399 ; StrRStrW
        StrStrA                        @400 ; StrStrA
        StrStrIA                       @401 ; StrStrIA
        StrStrIW                       @402 ; StrStrIW
        StrStrW                        @403 ; StrStrW
        WOWShellExecute                @404 ; WOWShellExecute
      

  3.   

    SHHelpShortcuts_RunDLLA        @333 ; SHHelpShortcuts_RunDLLA
        SHHelpShortcuts_RunDLLW        @334 ; SHHelpShortcuts_RunDLLW
        SHInvokePrinterCommandA        @335 ; SHInvokePrinterCommandA
        SHInvokePrinterCommandW        @336 ; SHInvokePrinterCommandW
        SHIsFileAvailableOffline       @337 ; SHIsFileAvailableOffline
        SHLoadInProc                   @338 ; SHLoadInProc
        SHLoadNonloadedIconOverlayIdentifiers @339 ; SHLoadNonloadedIconOverlayIdentifiers
        SHPathPrepareForWriteA         @340 ; SHPathPrepareForWriteA
        SHPathPrepareForWriteW         @341 ; SHPathPrepareForWriteW
        SHQueryRecycleBinA             @342 ; SHQueryRecycleBinA
        SHQueryRecycleBinW             @343 ; SHQueryRecycleBinW
        SHUpdateRecycleBinIcon         @344 ; SHUpdateRecycleBinIcon
        SheChangeDirA                  @345 ; SheChangeDirA
        SheChangeDirExA                @346 ; SheChangeDirExA
        SheChangeDirExW                @347 ; SheChangeDirExW
        SheChangeDirW                  @348 ; SheChangeDirW
        SheConvertPathW                @349 ; SheConvertPathW
        SheFullPathA                   @350 ; SheFullPathA
        SheFullPathW                   @351 ; SheFullPathW
        SheGetCurDrive                 @352 ; SheGetCurDrive
        SheGetDirA                     @353 ; SheGetDirA
        SheGetDirExW                   @354 ; SheGetDirExW
        SheGetDirW                     @355 ; SheGetDirW
        SheGetPathOffsetW              @356 ; SheGetPathOffsetW
        SheRemoveQuotesA               @357 ; SheRemoveQuotesA
        SheRemoveQuotesW               @358 ; SheRemoveQuotesW
        SheSetCurDrive                 @359 ; SheSetCurDrive
        SheShortenPathA                @360 ; SheShortenPathA
        SheShortenPathW                @361 ; SheShortenPathW
        ShellAboutA                    @362 ; ShellAboutA
        ShellAboutW                    @363 ; ShellAboutW
        ShellExec_RunDLL               @364 ; ShellExec_RunDLL
        ShellExec_RunDLLA              @365 ; ShellExec_RunDLLA
        ShellExec_RunDLLW              @366 ; ShellExec_RunDLLW
        ShellExecuteA                  @367 ; ShellExecuteA
        ShellExecuteEx                 @368 ; ShellExecuteEx
        ShellExecuteExA                @369 ; ShellExecuteExA
        ShellExecuteExW                @370 ; ShellExecuteExW
        ShellExecuteW                  @371 ; ShellExecuteW
        ShellHookProc                  @372 ; ShellHookProc
        Shell_NotifyIcon               @373 ; Shell_NotifyIcon
        Shell_NotifyIconA              @374 ; Shell_NotifyIconA
        Shell_NotifyIconW              @375 ; Shell_NotifyIconW
        StrChrA                        @376 ; StrChrA
        StrChrIA                       @377 ; StrChrIA
        StrChrIW                       @378 ; StrChrIW
        StrChrW                        @379 ; StrChrW
        StrCmpNA                       @380 ; StrCmpNA
        StrCmpNIA                      @381 ; StrCmpNIA
        StrCmpNIW                      @382 ; StrCmpNIW
        StrCmpNW                       @383 ; StrCmpNW
        StrCpyNA                       @384 ; StrCpyNA
        StrCpyNW                       @385 ; StrCpyNW
        StrNCmpA                       @386 ; StrNCmpA
        StrNCmpIA                      @387 ; StrNCmpIA
        StrNCmpIW                      @388 ; StrNCmpIW
        StrNCmpW                       @389 ; StrNCmpW
        StrNCpyA                       @390 ; StrNCpyA
        StrNCpyW                       @391 ; StrNCpyW
        StrRChrA                       @392 ; StrRChrA
        StrRChrIA                      @393 ; StrRChrIA
        StrRChrIW                      @394 ; StrRChrIW
        StrRChrW                       @395 ; StrRChrW
        StrRStrA                       @396 ; StrRStrA
        StrRStrIA                      @397 ; StrRStrIA
        StrRStrIW                      @398 ; StrRStrIW
        StrRStrW                       @399 ; StrRStrW
        StrStrA                        @400 ; StrStrA
        StrStrIA                       @401 ; StrStrIA
        StrStrIW                       @402 ; StrStrIW
        StrStrW                        @403 ; StrStrW
        WOWShellExecute                @404 ; WOWShellExecute
      

  4.   

    你有没有设个断点看看SubClassWndProc是否响应?
      

  5.   

    如果用 98/2000 的Shell32.dll就可以,而XP的就不可以!!(Shell32.dll版本6.2600.0)
      

  6.   

    RegisterShellHook这个函数在DLL中并没有名字,而是通过索引号调用的。这点从VB的声明中可以看出,Alias "#181"说明该函数的索引号为181,对于这种函数,应该这样声明: 
        Function RegisterShellHook(hwnd ,nAction:integer):integer; stdcall; external 'Shell32.dll' index 181; 
      

  7.   

    设个断点看看SubClassWndProc是否响应