Jump to content

Recommended Posts

Posted

_WinAPI_GetConnectedDlg ( $iDlg [, $iFlags [, $hParent]] ) $iDlg - Specifies which the dialog should be launched, valid values: |0 - Local area network connectivity. |1 - Internet connectivity. |2 - Virtual private network (VPN) connectivity.

Parameter of the syntax to do. . .

Posted (edited)

_WinAPI_GetConnectedDlg ( $iDlg [, $iFlags [, $hParent]] )

--------------------------------------------------------------

Parameters

$iDlg - Specifies which the dialog should be launched, valid values:

0 - Local area network connectivity.

1 - Internet connectivity.

2 - Virtual private network (VPN) connectivity.

...

Edited by 131738
Posted

_WinAPI_GetConnectedDlg ( $iDlg [, $iFlags [, $hParent]] )

--------------------------------------------------------------

Parameters

$iDlg - Specifies which the dialog should be launched, valid values:

0 - Local area network connectivity.

1 - Internet connectivity.

2 - Virtual private network (VPN) connectivity.

...

That works fine. I don't understand...
Posted

; #FUNCTION# ====================================================================================================================
; Name...........: _WinAPI_GetConnectedDlg
; Description....: Launches the Get Connected wizard within the calling application to enable network connectivity.
; Syntax.........: _WinAPI_GetConnectedDlg ( $iDlg [, $iFlags [, $hParent]] )
;                  $iDlg    - Specifies which the dialog should be launched, valid values:
;                  |0 - Local area network connectivity.
;                  |1 - Internet connectivity.
;                  |2 - Virtual private network (VPN) connectivity.
; Parameters.....: $iFlags  - Specifies an additional options. This parameter can be one or more of the following values.
;                  |0 - Default.
;                  |1 - Do not display the Get Connected wizard page that shows whether or not the user has a working or active Internet connection.
;                  |2 - Do not display the Get Connected wizard page that shows a list of existing internet connections.
;                  |4 - Hide the finish page of the Get Connected wizard.
;                  $hParent - Handle to the parent window that called this API.
; Return values..: Success  - 1 - The Internet is connected.
;                             0 - Otherwise.
;                  Failure  - 0 and sets the @error flag to non-zero, @extended flag may contain the system error code.
; Author.........: Yashied
; Modified.......:
; Remarks........: This function requires Windows Vista or later.
; Related........:
; Link...........: None
; Example........: Yes

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Posted

; #FUNCTION# ====================================================================================================================
; Name...........: _WinAPI_GetConnectedDlg
; Description....: Launches the Get Connected wizard within the calling application to enable network connectivity.
; Syntax.........: _WinAPI_GetConnectedDlg ( $iDlg [, $iFlags [, $hParent]] )
;                  $iDlg    - Specifies which the dialog should be launched, valid values:
;                  |0 - Local area network connectivity.
;                  |1 - Internet connectivity.
;                  |2 - Virtual private network (VPN) connectivity.
; Parameters.....: $iFlags  - Specifies an additional options. This parameter can be one or more of the following values.
;                  |0 - Default.
;                  |1 - Do not display the Get Connected wizard page that shows whether or not the user has a working or active Internet connection.
;                  |2 - Do not display the Get Connected wizard page that shows a list of existing internet connections.
;                  |4 - Hide the finish page of the Get Connected wizard.
;                  $hParent - Handle to the parent window that called this API.
; Return values..: Success  - 1 - The Internet is connected.
;                             0 - Otherwise.
;                  Failure  - 0 and sets the @error flag to non-zero, @extended flag may contain the system error code.
; Author.........: Yashied
; Modified.......:
; Remarks........: This function requires Windows Vista or later.
; Related........:
; Link...........: None
; Example........: Yes

Ah OK, fixed.
  • 2 weeks later...
  • 5 weeks later...
Posted (edited)

The library has been updated.

v3.1

Changes

  • Added the following functions.

    _WinAPI_AbortPath

    _WinAPI_AngleArc

    _WinAPI_Arc

    _WinAPI_ArcTo

    _WinAPI_BeginPath

    _WinAPI_CloseFigure

    _WinAPI_CreateMutex

    _WinAPI_DuplicateHandle

    _WinAPI_EndPath

    _WinAPI_ExcludeClipRect

    _WinAPI_ExtCreateRegion

    _WinAPI_FillPath

    _WinAPI_FlattenPath

    _WinAPI_GetArcDirection

    _WinAPI_GetClassInfoEx

    _WinAPI_GetClipBox

    _WinAPI_GetClipRgn

    _WinAPI_GetFileTitle

    _WinAPI_GetPolyFillMode

    _WinAPI_GetRegionData

    _WinAPI_IntersectClipRect

    _WinAPI_LineDDA

    _WinAPI_MessageBoxIndirect

    _WinAPI_OpenMutex

    _WinAPI_PathIsURL

    _WinAPI_PathParseIconLocation

    _WinAPI_PathRemoveArgs

    _WinAPI_PathToRegion

    _WinAPI_PathUnquoteSpaces

    _WinAPI_PtVisible

    _WinAPI_RectInRegion

    _WinAPI_RectVisible

    _WinAPI_RegisterClassEx

    _WinAPI_RegNotifyChangeKeyValue

    _WinAPI_ReleaseMutex

    _WinAPI_ResetEvent

    _WinAPI_SelectClipPath

    _WinAPI_SelectClipRgn

    _WinAPI_SetArcDirection

    _WinAPI_SetDIBitsToDevice

    _WinAPI_SetPolyFillMode

    _WinAPI_SetRectRgn

    _WinAPI_SetWindowTheme

    _WinAPI_StrokeAndFillPath

    _WinAPI_StrokePath

    _WinAPI_UnregisterClass

    _WinAPI_WidenPath

  • Added examples for the functions above.
  • _WinAPI_*MRU*() functions no longer supports a binary data.
  • All constants are now in a separate APIConstants.au3 file.
  • Fixed description of some functions.
  • Updated documentation (WinAPIEx Help).

Edited by Yashied
Posted (edited)

Thanks for this great UDF Yashield ! Posted Image

I wanted to use your _WinAPI_ShellGetSpecialFolderPath Function for get the recyclebin path like this,

Global Const $FOLDERID_RecycleBinFolder = '{B7534046-3ECB-4C18-BE4E-64CD4CB7D6AC}'

ConsoleWrite ( " : " & _WinAPI_ShellGetSpecialFolderPath ( $FOLDERID_RecycleBinFolder ) & @Crlf )

Func _WinAPI_ShellGetSpecialFolderPath($CSIDL, $fCreate = 0)
    Local $tPath = DllStructCreate('wchar[1024]')
    Local $Ret = DllCall('shell32.dll', 'int', 'SHGetSpecialFolderPathW', 'hwnd', 0, 'ptr', DllStructGetPtr($tPath), 'int', $CSIDL, 'int', $fCreate)
    If (@error) Or (Not $Ret[0]) Then
        Return SetError(1, 0, '')
    EndIf
    Return DllStructGetData($tPath, 1)
EndFunc   ;==>_WinAPI_ShellGetSpecialFolderPath

but it return the desktop path...

what i'm doing wrong ? Posted Image

edit : may be it's the RecycleBin Desktop link path ?

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Posted

What happens when you change the Const?

Global Const $FOLDERID_RecycleBinFolder = '{B7534046-3ECB-4C18-BE4E-64CD4CB7D6AC}'

To

Global Const $FOLDERID_RecycleBinFolder = "{645FF040-5081-101B-9F08-00AA002F954E}"

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Posted (edited)

What happens when you change the Const?

Global Const $FOLDERID_RecycleBinFolder = '{B7534046-3ECB-4C18-BE4E-64CD4CB7D6AC}'

To

Global Const $FOLDERID_RecycleBinFolder = "{645FF040-5081-101B-9F08-00AA002F954E}"

Same result : desktop path !

edit : i have found the problem :

i don't use the good constant !

it's not a $FOLDERID but a $CSIDL that i should use...

but i don't find it for recyclebin...

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Posted (edited)

If a virtual folder is specified, this function will fail.

Recycle Bin is a virtual folder. This function return E_FAIL (0x80004005) error code.

EDIT:

What do you want to do?

EDIT2:

#Include <Array.au3>

Func _EnumRecycleBinItems($sRoot = '')

    Local $oShellApp, $oRecycleBin, $oFolderItems, $oItem

    $oShellApp = ObjCreate('Shell.Application')
    $oRecycleBin = $oShellApp.NameSpace(10) ; CSIDL_BITBUCKET
    If Not IsObj($oRecycleBin) Then
        Return SetError(1, 0, 0)
    EndIf

    Local $Ret, $Result[101][6] = [[0]]

    $sRoot = StringStripWS($sRoot, 3)
    If $sRoot Then
        If StringInStr($sRoot, ':') Then
            $sRoot = StringRegExpReplace($sRoot, ':.*', '')
        Else
            $sRoot = ''
        EndIf
        If Not FileExists($sRoot & ':') Then
            Return SetError(1, 0, 0)
        EndIf
    EndIf
    $Ret = DllCall('shell32.dll', 'none', 'SHGetSettings', 'uint*', 0, 'dword', 2)
    If @error Then
        Return SetError(1, 0, 0)
    EndIf
    $oFolderItems = $oRecycleBin.Items()
    For $oItem In $oFolderItems
        If ($sRoot) And (StringCompare($sRoot, StringLeft($oItem.Path, 1))) Then
            ContinueLoop
        EndIf
        $Result[0][0] += 1
        If $Result[0][0] > UBound($Result) - 1 Then
            ReDim $Result[$Result[0][0] + 100][UBound($Result, 2)]
        EndIf
        $Result[$Result[0][0]][0] = $oRecycleBin.GetDetailsOf($oItem, 0) ; Original name
        $Result[$Result[0][0]][1] = $oRecycleBin.GetDetailsOf($oItem, 1) ; Original path
        $Result[$Result[0][0]][2] = $oRecycleBin.GetDetailsOf($oItem, 2) ; Deleted date
;       $Result[$Result[0][0]][3] = $oRecycleBin.GetDetailsOf($oItem, 3) ; Size
        $Result[$Result[0][0]][3] = $oItem.Size ; Size
        $Result[$Result[0][0]][4] = FileGetAttrib($oItem.Path) ; Attributes
        $Result[$Result[0][0]][5] = $oItem.Path ; Recycle name
        If (Not $Ret[1]) And (Not StringInStr($Result[$Result[0][0]][4], 'D')) Then
            If StringInStr($Result[$Result[0][0]][5], '.') Then
                $Result[$Result[0][0]][0] &= StringRegExpReplace($Result[$Result[0][0]][5], '^.*\.', '.')
            EndIf
        EndIf
    Next
    ReDim $Result[$Result[0][0] + 1][UBound($Result, 2)]
    Return $Result
EndFunc   ;==>_EnumRecycleBinItems

$Data = _EnumRecycleBinItems()
_ArrayDisplay($Data)
Edited by Yashied
  • 2 weeks later...
Posted

Correction for the help-file for _WinAPI_PathIsDirectory():

Success:

1 - The path is a valid directory.

0 - Otherwise.

should be

Success:

16 - The path is a valid directory (FILE_ATTRIBUTE_DIRECTORY).

0 - Otherwise.

  • 2 weeks later...
Posted

A small update without changing UDF version.

Changes

  • Added the following functions.

    _WinAPI_CreateBitmapIndirect

    _WinAPI_CreateDIBitmap

    _WinAPI_GetBitmapBits

    _WinAPI_MaskBlt

    _WinAPI_SetBitmapBits

  • Fixed description of some functions.
  • Updated documentation (WinAPIEx Help).

  • 1 month later...
Posted

Hi Yashied,

do you have some idea about 'Windows Event Log Functions'[http://msdn.microsoft.com/en-us/library/aa385784%28v=VS.85%29.aspx]?

Posted

Please read the Help File and look for _EventLog__. And maybe this question should have been asked in General Support.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted

Please read the Help File and look for _EventLog__. And maybe this question should have been asked in General Support.

I know the _eventlog__ function. But it seems like to operate with eventlog(who is the component of service Eventlog). Now, under windows 7, there is a service named Windows event collection whose log is different from that one. I look for MSDN, and find a serie of funtions formed Evt*. I try the _eventlog__ function, but failed.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...