DonChunior Posted July 29, 2021 Posted July 29, 2021 I am still trying to implement a UDF for the Background Intelligent Transfer Service. In the meantime, I've managed to do quite a bit, but the method IBackgroundCopyJob::SetProxySettings is causing me some problems. You can find the current development status of my UDF here: https://github.com/DonChunior/BITS-UDF/tree/SetProxySettings You can understand my problem with the following example code: #include <BITS.au3> #include <Array.au3> Main() Func Main() Local $oBackgroundCopyManager = _BITS_Connect() Local $oJob = _BITS_BackgroundCopyManager_CreateJob($oBackgroundCopyManager, "Test_Job", $BG_JOB_TYPE_DOWNLOAD) _BITS_BackgroundCopyJob_SetProxySettings($oJob, $BG_JOB_PROXY_USAGE_OVERRIDE, "test.proxy.i:8080", "") ConsoleWrite(_ArrayToString(_BITS_BackgroundCopyJob_GetProxySettings($oJob)) & @CRLF) _BITS_BackgroundCopyJob_Cancel($oJob) EndFunc ;==>Main This code outputs the following line in the console: 2|| However, it should read as follows: 2|test.proxy.i:8080| I hope someone of you can tell me where I made the mistake. 🙏
Solution Danyfirex Posted July 29, 2021 Solution Posted July 29, 2021 (edited) Use: SetProxySettings hresult(int;wstr;wstr) Edit: line above will need you pass direct string $sProxyList and $sProxyBypassList. if you want to keep using the structure as parameters. Use: SetProxySettings hresult(int;struct*;struct*); Saludos Edited July 29, 2021 by Danyfirex DonChunior 1 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
DonChunior Posted July 30, 2021 Author Posted July 30, 2021 Perfect, thanks @Danyfirex! 💪 I think I'm starting to see through how the ObjCreateInterface and DllStructCreate functions work.
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