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

Loop

Although the vbscript code, the version of Chilkat ActiveX (9.5.0.55), 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, 9.5.0.56, but the result was the same. What's the problem? What should I check?

sftp.LastErrorText reads,

ChilkatLog:
  ActiveXError:
    DllDate: Mar 11 2016
    ChilkatVersion: 9.5.0.56
    UnlockPrefix: 
    Username: 
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 1
    Cannot get ActiveX Interface
  --ActiveXError
--ChilkatLog

asked May 18 at 06:42

hagi's gravatar image

hagi
1


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,
    NULL,CLSCTX_INPROC_SERVER,
    IID_IChilkatTask,
    (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.

link

answered May 20 at 09:47

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

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.

link

answered May 20 at 11:35

jpbro's gravatar image

jpbro ♦
1.1k2618

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?

link

answered May 20 at 11:45

hagi's gravatar image

hagi
1

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

By RSS:

Answers

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

Tags:

×96
×22
×13
×9

Asked: May 18 at 06:42

Seen: 390 times

Last updated: May 20 at 11:47

powered by OSQA