Jump to content

Again problems with ObjCreateInterface and DllStructCreate


Go to solution Solved by Danyfirex,

Recommended Posts

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. 🙏

Link to comment
Share on other sites

  • Solution

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 by Danyfirex
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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