FaridAgl Posted June 1, 2014 Share Posted June 1, 2014 (edited) After running the following code on a Windows Server 2008 vps: #include <GDIPlus.au3> Global $ret = _GDIPlus_Startup() Global $err = @error Global $ext = @extended MsgBox(0, "", StringFormat("Return:\t%d\nError:\t%d\nExtented:\t%d", $ret, $err, $ext)) It always gives the following output, however it worked fine in Windows Server 2003, Windows XP and Windows 7 in all the tests: Return: 0 Error: 1 Extended: 2 Any help? Edited June 1, 2014 by D4RKON3 http://faridaghili.ir Link to comment Share on other sites More sharing options...
FaridAgl Posted June 1, 2014 Author Share Posted June 1, 2014 Well, something is wrong with this part: If $sGDIPDLL = Default Then If @OSBuild > 4999 And @OSBuild < 7600 Then ; Vista or Server R2008 $sGDIPDLL = @WindowsDir & "\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.6000.16386_none_8df21b8362744ace\gdiplus.dll" Else $sGDIPDLL = "gdiplus.dll" EndIf EndIf http://faridaghili.ir Link to comment Share on other sites More sharing options...
FaridAgl Posted June 1, 2014 Author Share Posted June 1, 2014 I fixed the issue with the following code: If (_GDIPlus_Startup(@WindowsDir & "\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.6000.16386_none_8df21b8362744ace\gdiplus.dll") = 0) Then If (_GDIPlus_Startup("gdiplus.dll") = 0) Then ;Failed... EndIf EndIf It's working fine now http://faridaghili.ir Link to comment Share on other sites More sharing options...
UEZ Posted June 1, 2014 Share Posted June 1, 2014 Do you have tested it on Windows Server 2008 and/or Windows Server 2008 R2? What is the return value for @OSBuild? I don't have Win2k8 available right now to make some tests. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
FaridAgl Posted June 1, 2014 Author Share Posted June 1, 2014 Windows Server 2008 Standard Arch: X86 Build: 6002 Lang: 0409 SPack: Service Pack 2 Type: WIN32_NT Ver: WIN_2008 http://faridaghili.ir Link to comment Share on other sites More sharing options...
mLipok Posted June 1, 2014 Share Posted June 1, 2014 I have accces to Win2008 R2 Foundation What exactly to check give me a REPRO. Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
UEZ Posted June 1, 2014 Share Posted June 1, 2014 (edited) @D4RKON3: Can you search for @WindowsDir & "winsxsx86_microsoft.windows.gdiplus_* folder(s) please? Just list them here. @mLipok: Can you test the code from post#1 please and post the results here? Br, UEZ Edited June 1, 2014 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
mLipok Posted June 1, 2014 Share Posted June 1, 2014 (edited) I make a litle change: #include <GDIPlus.au3> Global $ret = _GDIPlus_Startup() Global $err = @error Global $ext = @extended ConsoleWrite(StringFormat("Return:\t%d\nError:\t%d\nExtented:\t%d", $ret, $err, $ext) & @CRLF) Results: >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Program Files (x86)\AutoIt3\SciTE\test.au3" /autoit3dir "C:\Program Files (x86)\AutoIt3" /UserParams +>23:13:05 Starting AutoIt3Wrapper v.2.0.1.24 Environment(Language:0409 Keyboard:00000415 OS:WIN_2008R2/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (3.3.12.0) from:C:\Program Files (x86)\AutoIt3 +>23:13:06 AU3Check ended.rc:0 >Running:(3.3.12.0):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Program Files (x86)\AutoIt3\SciTE\test.au3" Return: 1 Error: 0 Extented: 0 +>23:13:06 AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 1.751 EDIT: NOTE: AutoIt 3.3.12.0 Edited June 1, 2014 by mLipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
JFX Posted June 2, 2014 Share Posted June 2, 2014 If $sGDIPDLL = Default Then If @OSBuild > 4999 And @OSBuild < 7600 Then ; Vista or Server R2008 $sGDIPDLL = @WindowsDir & "\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.6000.16386_none_8df21b8362744ace\gdiplus.dll" Else $sGDIPDLL = "gdiplus.dll" EndIf EndIf How is it possible that such code find a place in the standard UDF Link to comment Share on other sites More sharing options...
jpm Posted June 2, 2014 Share Posted June 2, 2014 If $sGDIPDLL = Default Then If @OSBuild > 4999 And @OSBuild < 7600 Then ; Vista or Server R2008 $sGDIPDLL = @WindowsDir & "\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.6000.16386_none_8df21b8362744ace\gdiplus.dll" Else $sGDIPDLL = "gdiplus.dll" EndIf EndIf How is it possible that such code find a place in the standard UDF sometime difficult to follow Windows version ... Link to comment Share on other sites More sharing options...
UEZ Posted June 2, 2014 Share Posted June 2, 2014 (edited) @WindowsDir & "winsxsx86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.6000.16386_none_8df21b8362744acegdiplus.dll" handles also GDI+ v1.1 functions on Vista and Server 2008 operating systems whereas the default gdiplus.dll cannot on those os'. Br, UEZ Edited June 2, 2014 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
guinness Posted June 2, 2014 Share Posted June 2, 2014 If $sGDIPDLL = Default Then If @OSBuild > 4999 And @OSBuild < 7600 Then ; Vista or Server R2008 $sGDIPDLL = @WindowsDir & "\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.6000.16386_none_8df21b8362744ace\gdiplus.dll" Else $sGDIPDLL = "gdiplus.dll" EndIf EndIf How is it possible that such code find a place in the standard UDF Instead of complaining about it offer a better suggestion, including the workaround UEZ mentioned. 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
JFX Posted June 2, 2014 Share Posted June 2, 2014 Well obviously, It could be done with FileFindFirstFile. However the right solution is to respect that the OS doesn't want to load it. Link to comment Share on other sites More sharing options...
MHz Posted June 2, 2014 Share Posted June 2, 2014 Considering that the winsxs folder is a backup up folder, amongst other temporary uses, I do not consider it as a good idea to base production code on it especially when Microsoft has released an optional update which allows the option for the "Disk Cleanup Wizard" to remove files from it. A link discusses it here. About "Disk Cleanup Wizard" topic here. The update info is here. Link to comment Share on other sites More sharing options...
UEZ Posted June 2, 2014 Share Posted June 2, 2014 The consequences are that GDI+ v1.1 functions (e.g. _GDIPlus_Effect*) are not available for Vista / Server 2008. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
trancexx Posted June 2, 2014 Share Posted June 2, 2014 sometime difficult to follow Windows version ... Nor you should, be reasonable. JFX is completely right, that code should not be part of anything standard. No FileFind or any alternative method sould be supported either. Function accepts dll path as optional first parameter, that's all. By default it loads gdiplus.dll. Don't make up things. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
FaridAgl Posted June 2, 2014 Author Share Posted June 2, 2014 @UEZ, sorry I didn't had access to that vps till now, here you go: http://faridaghili.ir Link to comment Share on other sites More sharing options...
jpm Posted June 3, 2014 Share Posted June 3, 2014 from Windows build reference 2008R2 is the same as Win7. different from Vista/2008 Link to comment Share on other sites More sharing options...
UEZ Posted June 3, 2014 Share Posted June 3, 2014 @UEZ, sorry I didn't had access to that vps till now, here you go: 1.png Thanks D4RKON3, meanwhile I had downloaded Server 2008 x64 and tested the issue. C:\Windows\winsxs>dir *.gdiplus* Volume in drive C has no label. Volume Serial Number is 1840-42C3 Directory of C:\Windows\winsxs 01/19/2008 03:11 AM <DIR> amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.6001.18000_none_56c7f783b549f0ed 04/11/2009 09:12 AM <DIR> amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.6002.18005_none_56a37cbfb59b8501 01/19/2008 03:11 AM <DIR> amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.6001.18000_none_461966684e4fca94 04/11/2009 09:11 AM <DIR> amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.6002.18005_none_45f4eba44ea15ea8 01/19/2008 03:11 AM <DIR> x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.6001.18000_none_9e752e5ac9c619f3 04/11/2009 09:12 AM <DIR> x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.6002.18005_none_9e50b396ca17ae07 01/19/2008 03:11 AM <DIR> x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.6001.18000_none_8dc69d3f62cbf39a 04/11/2009 09:11 AM <DIR> x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.6002.18005_none_8da2227b631d87ae 0 File(s) 0 bytes 8 Dir(s) 16,588,165,120 bytes free C:\Windows\winsxs>ver Microsoft Windows [Version 6.0.6002] The path to the GDI+ v1.1 DLL varies. That means we should remove the section to load GDI+ v1.1 DLL for Vista/Server 2008. The user has the possibility to provide the correct path manually if GDI+ v1.1 is needed. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
FaridAgl Posted June 3, 2014 Author Share Posted June 3, 2014 You are right, that's the correct way I guess, as trancexx just explained. http://faridaghili.ir 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