login about faq

I'm trying the vbscript codes like below.

Set task = sftp.UploadFileByNameAsync(targetpath, localpath)
rc = task.Run()
curPctDone = 0

Do While task.Finished <> 1 If (task.PercentDone <> curPctDone) Then curPctDone = task.PercentDone f.WriteLine(curPctDone & " % done") End If task.SleepMs 100 Loop

Set task = http.DownloadAsync(targetUrl, localPath) rc = task.Run() Do While task.Finished <> 1 count = task.PercentDone

Call progressBarDisp(count)
Wscript.Sleep 100


Although the vbscript code, the version of Chilkat ActiveX (, and unlock code are identically the same, the above codes work on a PC (Windows 10), but not in others (Windows 10 and Windows 7). In the latter PCs, where http and sftp and other Chilkat ActiveX functions, at least excpet async methods, are working fine, task object creation (Set task = ...) fails.

I tried new version,, but the result was the same. What's the problem? What should I check?

sftp.LastErrorText reads,

    DllDate: Mar 11 2016
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 1
    Cannot get ActiveX Interface

asked May 18 '16 at 06:42

hagi's gravatar image


Is it possible the Chilkat Active DLL is located on a non-local hard drive?

You might try re-registering the ActiveX DLL to see if that fixes it.

Internally,when an ActiveX method returns an instance of another object, that object is created in the internal C++ code via CoCreateInstance in a very standard/simple way:

    IChilkatTask *iObj = 0;

HRESULT hr = CoCreateInstance(CLSID_ChilkatTask,
    (void **)&iObj);

This is what failed. All Chilkat objects returned by a method,whether it be an XML object, Cert object, JSON object, etc. are created in this way.


answered May 20 '16 at 09:47

chilkat's gravatar image

chilkat ♦♦

If you are using using SxS registration with a manifest, it's possible that it has been improperly defined (missing class/object definitions perhaps?) which could cause problems with creating objects.


answered May 20 '16 at 11:35

jpbro's gravatar image

jpbro ♦

After I posted my question, I also thought re-registering DLL might fix the problem and tried it for one of the problem PCs.

It worked! Thans for your help.

I expect, taking your suggestion into account, other problem PCs can also be fixed in the same manner, because the ActiveX DLL in all of the PCs seems to have been installed before the ActiveX supports async methods. The activeX DLL file have been updeted since its initial instalation by simply overwriting the old by new version file.

So, on updating ActiveX DLL, it should be re-registered, right?


answered May 20 '16 at 11:45

hagi's gravatar image


Yes, you should always re-register the component after updating it to ensure that all classes, interfaces, etc... are updated in the registry.

(May 20 '16 at 11:47) jpbro ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: May 18 '16 at 06:42

Seen: 2,369 times

Last updated: May 20 '16 at 11:47

powered by OSQA