Yashied Posted July 3, 2010 Author Share Posted July 3, 2010 A small update without changing version of the library.ChangesThe following functions now working with KLID instead LCID. _WinAPI_GetKeyboardLayout _WinAPI_GetKeyboardLayoutList _WinAPI_LoadKeyboardLayout _WinAPI_SetKeyboardLayoutAdded additional parameters to _WinAPI_SetKeyboardLayout() function.Updated documentation. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
131738 Posted July 6, 2010 Share Posted July 6, 2010 (edited) _WinAPI_AssocGetPerceivedType -------------------------------------------------------------------------------- Retrieves a file's perceived type based on its extension. ????????? ******************************************************************************************** ******************************************************************************************** _WinAPI_ShellILCreateFromPath -------------------------------------------------------------------------------- Retrieves a file's perceived type based on its extension. ???????? Edited July 6, 2010 by 131738 Link to comment Share on other sites More sharing options...
Yashied Posted July 6, 2010 Author Share Posted July 6, 2010 (edited) _WinAPI_ShellILCreateFromPath() Creates a pointer to an item identifier list (PIDL) from a path. This is a mistake in description, I will correct it later. Thanks. Edited July 6, 2010 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Yashied Posted July 12, 2010 Author Share Posted July 12, 2010 ?????????Fixed. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Yashied Posted August 6, 2010 Author Share Posted August 6, 2010 (edited) The library has been updated.v2.8ChangesRenamed the following functions. _WinAPI_GetClassLong => _WinAPI_GetClassLongEx _WinAPI_SetClassLong => _WinAPI_SetClassLongExAdded the following functions. _WinAPI_DeleteFile _WinAPI_ExtFloodFill _WinAPI_GetWindowLongEx _WinAPI_MoveToEx _WinAPI_OffsetPoints _WinAPI_PolyBezier _WinAPI_PolyBezierTo _WinAPI_PolyDraw _WinAPI_RegCopyTreeEx _WinAPI_RegDeleteKeyValue _WinAPI_RegDeleteTreeEx _WinAPI_RegDeleteValue _WinAPI_RegDuplicateHKey _WinAPI_RegLoadMUIString _WinAPI_ReOpenFile _WinAPI_RotatePoints _WinAPI_SetWindowLongEx _WinAPI_Wow64EnableWow64FsRedirection Added examples for the functions above.Updated Help file. Edited August 10, 2010 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
netegg Posted August 11, 2010 Share Posted August 11, 2010 hi, does the byte number of the image in the function _WinAPI_CreateStreamOnHGlobal has a limit? thanks Link to comment Share on other sites More sharing options...
Yashied Posted August 11, 2010 Author Share Posted August 11, 2010 MSDN says nothing about it. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
netegg Posted August 21, 2010 Share Posted August 21, 2010 (edited) Would you like to give a _winapi_DeviceIoControl example? I've tried several times. Sadly, not success! Edited August 21, 2010 by netegg Link to comment Share on other sites More sharing options...
Yashied Posted August 21, 2010 Author Share Posted August 21, 2010 Would you like to give a _winapi_DeviceIoControl example? I've tried several times. Sadly, not success! What exactly you trying to do? My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
netegg Posted August 22, 2010 Share Posted August 22, 2010 What exactly you trying to do?just like the type of CDROM(r,rw...)? Link to comment Share on other sites More sharing options...
Yashied Posted August 22, 2010 Author Share Posted August 22, 2010 just like the type of CDROM(r,rw...)?What control code do you use? My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Yashied Posted August 22, 2010 Author Share Posted August 22, 2010 (edited) The library has been updated.v2.9ChangesAdded the following functions. _WinAPI_CoInitialize _WinAPI_CoUninitialize _WinAPI_GetErrorMode _WinAPI_GetFileAttributes _WinAPI_IOCTL _WinAPI_SetErrorMode _WinAPI_SetFileAttributes _WinAPI_SetLocaleInfo _WinAPI_ShellGetSetFolderCustomSettings _WinAPI_ShellOpenFolderAndSelectItems _WinAPI_ShellQueryUserNotificationStateAdded examples for the functions above.Updated Help file. Edited August 25, 2010 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
131738 Posted August 25, 2010 Share Posted August 25, 2010 2.9 _WinAPI_HideCaret -------------------------------------------------------------------------------- Creates a new shape for the system caret and assigns ownership of the caret to the specified window. _WinAPI_CreateCaret -------------------------------------------------------------------------------- Creates a new shape for the system caret and assigns ownership of the caret to the specified window. Link to comment Share on other sites More sharing options...
Yashied Posted August 25, 2010 Author Share Posted August 25, 2010 (edited) 2.9_WinAPI_HideCaret --------------------------------------------------------------------------------Creates a new shape for the system caret and assigns ownership of the caret to the specified window._WinAPI_CreateCaret --------------------------------------------------------------------------------Creates a new shape for the system caret and assigns ownership of the caret to the specified window.Thanks. Fixed. Edited August 25, 2010 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Yashied Posted August 26, 2010 Author Share Posted August 26, 2010 (edited) just like the type of CDROM(r,rw...)? Something like that. expandcollapse popup#Include <WinAPIEx.au3> #cs 0x0000 - No media - 0x0001 - Obsolete Rewritable disk capable with unchanging behavior 0x0002 - Removable disk Writable disk capable with removable media 0x0008 - CD-ROM Read only Compact Disc capable 0x0009 - CD-R Write once Compact Disc capable 0x000A - CD-RW ReWritable Compact Disc capable 0x0010 - DVD-ROM Read only DVD 0x0011 - DVD-R Sequential recording Write once DVD using Sequential recording 0x0012 - DVD-RAM Rewritable DVD 0x0013 - DVD-RW Restricted Overwrite Re-recordable DVD using Restricted Overwrite 0x0014 - DVD-RW Sequential recording Re-recordable DVD using Sequential recording 0x0015 - DVD-R Dual Layer Sequential recording Write once DVD using Sequential recording 0x0016 - DVD-R Dual Layer Jump recording Write once DVD using Layer Jump recording 0x0017 - DVD-RW Dual Layer Re-recordable DVD for Dual Layer 0x0018 - DVD-Download disc recording Write once DVD for CSS managed recording 0x001A - DVD+RW - 0x001B - DVD+R - 0x0040 - BD-ROM - 0x0041 - BD-R Sequential Recording Mode (SRM) - 0x0042 - BD-R Random Recording Mode (RRM) - 0x0043 - BD-RE - 0x0050 - HD DVD-ROM Read only HD DVD 0x0051 - HD DVD-R Write once HD DVD 0x0052 - HD DVD-RAM Rewritable HD DVD 0x0053 - HD DVD-RW Re-recordable HD DVD 0x0058 - HD DVD-R Dual Layer Write once HD DVD Dual Layer 0x005A - HD DVD-RW Dual Layer Re-recordable HD DVD Dual Layer 0xFFFF - Not Conforming The logical unit does not conform to any Profile #ce $sDrive = 'E:' If DriveGetType($sDrive) <> 'CDROM' Then ConsoleWrite($sDrive & ' is not a CD-ROM drive.' & @CR) Exit EndIf $hDrive = _WinAPI_CreateFileEx('\\.\' & $sDrive, $OPEN_EXISTING, BitOR($GENERIC_READ, $GENERIC_WRITE), BitOR($FILE_SHARE_READ, $FILE_SHARE_WRITE)) If @error Then ConsoleWrite(_WinAPI_GetLastErrorMessage() & @CR) Exit EndIf $tSPT = DllStructCreate('ushort Length;byte ScsiStatus;byte PathId;byte TargetId;byte Lun;byte CdbLength;byte SenseInfoLength;byte DataIn;byte Alignment[3];ulong DataTransferLength;ulong TimeOutValue;ulong_ptr DataBufferOffset;ulong SenseInfoOffset;byte Cdb[16];byte Hdr[8]') $tCDB = DllStructCreate('byte;byte;byte[2];byte[3];byte[2];byte;byte[2];byte[4]', DllStructGetPtr($tSPT, 'Cdb')) $tHDR = DllStructCreate('byte[4];byte;byte;byte[2]', DllStructGetPtr($tSPT, 'Hdr')) $Size = DllStructGetSize($tSPT) - 8 DllStructSetData($tSPT, 'Length', $Size) DllStructSetData($tSPT, 'ScsiStatus', 0) DllStructSetData($tSPT, 'PathId', 0) DllStructSetData($tSPT, 'TargetId', 0) DllStructSetData($tSPT, 'Lun', 0) DllStructSetData($tSPT, 'CdbLength', 12) DllStructSetData($tSPT, 'SenseInfoLength', 0) DllStructSetData($tSPT, 'DataIn', 1) DllStructSetData($tSPT, 'DataTransferLength', 8) DllStructSetData($tSPT, 'TimeOutValue', 30) DllStructSetData($tSPT, 'DataBufferOffset', $Size) DllStructSetData($tSPT, 'SenseInfoOffset', 0) DllStructSetData($tCDB, 1, 0x46) ; GET CONFIGURATION DllStructSetData($tCDB, 2, 0) DllStructSetData($tCDB, 3, 0, 1) DllStructSetData($tCDB, 3, 0, 2) DllStructSetData($tCDB, 5, 0, 1) DllStructSetData($tCDB, 5, 8, 2) DllStructSetData($tCDB, 6, 0) DllStructSetData($tCDB, 7, 0, 1) DllStructSetData($tCDB, 7, 0, 2) If Not _WinAPI_DeviceIoControl($hDrive, $IOCTL_SCSI_PASS_THROUGH, DllStructGetPtr($tSPT), $Size, DllStructGetPtr($tSPT), DllStructGetSize($tSPT)) Then ConsoleWrite(_WinAPI_GetLastErrorMessage() & @CR) Exit EndIf _WinAPI_CloseHandle($hDrive) $Profile = BitOR(BitShift(DllStructGetData($tHDR, 4, 1), -8), DllStructGetData($tHDR, 4, 2)) ConsoleWrite('Profile for drive ' & $sDrive & ' - 0x' & Hex($Profile, 4) & @CR) Edited August 26, 2010 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Yashied Posted August 27, 2010 Author Share Posted August 27, 2010 (edited) A small update without changing UDF version.ChangesAdded the following functions. _WinAPI_GetCDType _WinAPI_GetFileSizeOnDisk _WinAPI_GetLogicalDrives _WinAPI_HiByte _WinAPI_IOCTL _WinAPI_LoByte _WinAPI_LongMidAdded constants (Control Codes) for the _WinAPI_DeviceIoControl() function.Added examples for the functions above.Updated documentation. Edited August 27, 2010 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
131738 Posted August 29, 2010 Share Posted August 29, 2010 E:\AUTOIT3\WinAPIEx_2.9\Examples\WinAPIEx\_WinAPI_GetEnhMetaFileDescription.au3(7,63) : ERROR: _WinAPI_GetEnhMetaFile(): undefined function. $hEmf = _WinAPI_GetEnhMetaFile(@ScriptDir & '\Extras\Flag.emf') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ E:\autoit3\AUTOIT3文档\WinAPIEx_2.9\Examples\WinAPIEx\_WinAPI_GetEnhMetaFileDescription.au3(8,48) : ERROR: _WinAPI_GetEnhMetaFileDescription(): undefined function. $Data = _WinAPI_GetEnhMetaFileDescription($hEmf) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ E:\autoit3\AUTOIT3文档\WinAPIEx_2.9\Examples\WinAPIEx\_WinAPI_GetEnhMetaFileDescription.au3(9,32) : ERROR: _WinAPI_DeleteEnhMetaFile(): undefined function. _WinAPI_DeleteEnhMetaFile($hEmf) Link to comment Share on other sites More sharing options...
Yashied Posted August 29, 2010 Author Share Posted August 29, 2010 E:\AUTOIT3\WinAPIEx_2.9\Examples\WinAPIEx\_WinAPI_GetEnhMetaFileDescription.au3(7,63) : ERROR: _WinAPI_GetEnhMetaFile(): undefined function. $hEmf = _WinAPI_GetEnhMetaFile(@ScriptDir & '\Extras\Flag.emf') ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ E:\autoit3\AUTOIT3文档\WinAPIEx_2.9\Examples\WinAPIEx\_WinAPI_GetEnhMetaFileDescription.au3(8,48) : ERROR: _WinAPI_GetEnhMetaFileDescription(): undefined function. $Data = _WinAPI_GetEnhMetaFileDescription($hEmf) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ E:\autoit3\AUTOIT3文档\WinAPIEx_2.9\Examples\WinAPIEx\_WinAPI_GetEnhMetaFileDescription.au3(9,32) : ERROR: _WinAPI_DeleteEnhMetaFile(): undefined function. _WinAPI_DeleteEnhMetaFile($hEmf) You forgot to write #Include <WinAPIEx.au3>. In my example are no errors. #Include <WinAPIEx.au3> Opt('MustDeclareVars', 1) Global $hEmf, $Data $hEmf = _WinAPI_GetEnhMetaFile(@ScriptDir & '\Extras\Flag.emf') $Data = _WinAPI_GetEnhMetaFileDescription($hEmf) _WinAPI_DeleteEnhMetaFile($hEmf) ConsoleWrite('Application: ' & $Data[0] & @CR) ConsoleWrite('Picture: ' & $Data[1] & @CR) My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
131738 Posted September 5, 2010 Share Posted September 5, 2010 Sorry! As the old version of WinAPIEx.au3 not deleted! Link to comment Share on other sites More sharing options...
Mat Posted September 5, 2010 Share Posted September 5, 2010 You seem to have most of the path functions... But not PathRelativePathTo, which is VERY useful ; #FUNCTION# ==================================================================================================================== ; Name...........: _WinApi_PathRelativePathTo ; Description ...: Creates a relative path from one file or folder to another. ; Syntax.........: _WinApi_PathRelativePathTo($sFrom, $sTo) ; Parameters ....: $sFrom - The path that defines the start of the relative path. (can be a file or a directory) ; $sTo - The path that defines the endpoint of the relative path. (can be a file or a directory) ; Return values .: Success - The relative path. ; Failure - A blank string with @error set to not zero ; Author ........: Mat ; Modified.......: ; Remarks .......: The paths do not have to be fully-qualified, but they must have a common prefix, or the function will fail. ; For example, let the starting point, $sFrom, be "c:\FolderA\FolderB\FolderC", and the ending point, $sTo, be ; "c:\FolderA\FolderD\FolderE". _WinAPi_PathRelativePathTo will return the relative path from $sFrom to $sTo as: ; "..\..\FolderD\FolderE". You will get the same result if you set $sFrom to "\FolderA\FolderB\FolderC" and $sTo ; to "\FolderA\FolderD\FolderE". On the other hand, "c:\FolderA\FolderB" and "a:\FolderA\FolderD do not share a ; common prefix, and the function will fail. Note that "\\" is not considered a prefix and is ignored. If you ; set $sFrom to "\\FolderA\FolderB", and $sTo to "\\FolderC\FolderD", the function will fail. ; Related .......: _WinApi_PathIsRelative ; Link ..........: http://msdn.microsoft.com/en-us/library/bb773740(VS.85).aspx ; Example .......: Yes ; =============================================================================================================================== Func _WinApi_PathRelativePathTo($sFrom, $sTo) Local $iAttrFrom = 0, $iAttrTo = 0, $aRet If _WinAPI_PathIsDirectory($sFrom) Then $iAttrFrom = 16 If _WinAPI_PathIsDirectory($sTo) Then $iAttrTo = 16 $aRet = DllCall("shlwapi.dll", "int", "PathRelativePathToW", "wstr", 0, "wstr", $sFrom, "int", $iAttrFrom, "wstr", $sTo, "int", $iAttrTo) If @error Or Not $aRet[0] Then Return SetError(@error, @extended, "") Return $aRet[1] EndFunc ;==>_WinApi_PathRelativePathTo I left the FILE_ATTRIBUTE_DIRECTORY constant out and used its value instead as it is defined in FileConstants.au3 and I don't know if you want to include constants like that. Thanks for the amazing set of functions Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now