---
product: Chilkat
product_version: 11.7.0
language: activex
language_label: ActiveX
document: language guide
---
> Chilkat 11.7.0 · language=activex · this file: `https://www.chilkatsoft.com/ai-docs/v/11.7.0/activex/guide.md`
> Class pages: `https://www.chilkatsoft.com/ai-docs/v/11.7.0/activex/classes/<Class>.md`

# Chilkat for ActiveX — language guide — v11.7.0

## 1. Which Chilkat binding this is

This is the **Chilkat ActiveX** (COM) component for Windows, used from VB6, VBA (Excel/Access), VBScript, Classic ASP, AutoIt, FoxPro, PowerBuilder, DataFlex, SQL Server, Xbase++, PHP ActiveX, Delphi ActiveX and any other COM-capable language. One DLL (32-bit and 64-bit installers) exposes every class as a COM object with ProgID `Chilkat.<Class>` — `Chilkat.Http`, `Chilkat.Zip`, `Chilkat.BinData`, … — or `Chilkat.<Class>.<major>` (e.g. `Chilkat.Http.11`) to pin a major version. Properties are COM properties; methods are COM methods; strings are BSTR/Variant. .NET programs should use the Chilkat .NET assembly instead. Several COM-hosted languages have their own page in this reference (`asp/`, `autoit/`, `foxpro/`, `powerbuilder/`, `sqlserver/`, `xbase/`, `dataflex/`, `phpx/`, `delphix/`); this `activex/` reference shows the VB6/VBScript-style signatures.

## 2. Install and requirements

Download and run the MSI installer (32-bit for 32-bit hosts such as VBA in 32-bit Office or VB6; 64-bit for 64-bit hosts) from [https://www.chilkatsoft.com/downloads_activex.asp](https://www.chilkatsoft.com/downloads_activex.asp). The installer registers the component; registration help: [https://www.chilkatsoft.com/activex_dll_registration_tutorial.asp](https://www.chilkatsoft.com/activex_dll_registration_tutorial.asp).

## 3. Unlocking and object creation

```vb
' VB6 / VBA (late-bound; early binding with a project reference to "Chilkat ActiveX" also works)
' Required once per process, before any other Chilkat object. Any string unlocks a 30-day trial.
Dim glob As Object
Set glob = CreateObject("Chilkat.Global")
Dim success As Long
success = glob.UnlockBundle("Anything for 30-day trial")
If success <> 1 Then
    Debug.Print glob.LastErrorText
    Exit Sub
End If

Dim http As Object
Set http = CreateObject("Chilkat.Http")
```

Other hosts create objects their own way with the same ProgID: `Server.CreateObject("Chilkat.Http")` (Classic ASP), `ObjCreate("Chilkat.Http")` (AutoIt), `CreateObject('Chilkat.Http')` (FoxPro), `sp_OACreate 'Chilkat.Http'` (SQL Server), `new ActiveXObject("Chilkat.Http")` (JScript).

- Unlocking only sets a flag in memory: no license files, no network call, so the call is repeated each time the program runs. Extra calls are harmless no-ops; the `Global` object can be discarded afterwards.
- If a program forgets to unlock, Chilkat runs in trial mode and stops working when the trial expires — always include the call, and use the purchased unlock code in production.
- `UnlockBundle` unlocks every class; per-class `UnlockComponent` methods exist only in old code.

## 4. Error model

Methods **do not raise COM errors** for Chilkat-level failures. The note under each method on the class page says how it reports failure: a status method returns `0` (`False`); a string-returning method returns `Nothing`/an empty Variant (`IsNull`/empty check, or test `LastMethodSuccess`); a byte-array method returns a zero-length Variant array (`UBound` = -1); an object-returning method returns `Nothing`; for a numeric result check `LastMethodSuccess`. `LastErrorText` holds the diagnostic in every case. COM errors do occur for host-level problems (object not registered, wrong bitness).

Literals in ActiveX: true is `1`, false is `0`, null/none is `Nothing`.

## 5. Strings, bytes and encodings

- Strings are BSTR (Unicode) through Variants; a `charset` argument names the encoding of the *bytes* being produced or read.
- Binary data is a Variant byte array (`Byte()`) in and out; larger or reusable data goes through `Chilkat.BinData` (`Bd` methods) and text through `Chilkat.StringBuilder` (`Sb` methods).
- Methods with `2`/`3` suffixes or `Quick*` prefixes are distinct members, not overloads.

## 6. Object lifetime and threading

COM reference counting releases objects (`Set obj = Nothing` releases early).

A Chilkat object may be used from any thread, but **one object must not be used by two threads at the same time**: create one object per thread or protect it with a lock. Objects are independent — there is no shared global state other than the unlock flag and the few `Global` settings. The component is apartment-threaded; create objects on the thread that uses them.

## 7. Progress callbacks and async

Progress events are supported: see the "Events and callbacks" section of a class page for the event list and how to attach a handler in this binding (AbortCheck, PercentDone, ProgressInfo and TaskCompleted are the standard ones). Every method with an "Async variant" line also has an `XAsync` twin that returns a `Task` immediately; poll `Finished` or use the `TaskCompleted` event, then read the result from the task. No new Async methods are added from 11.7.0 on. In VB6/VBA, declare the object `WithEvents` to receive events; see the "Events and callbacks" section of a class page. Hosts without event support use the `*Async` methods and poll the `Task`.

## 8. Common mistakes an AI makes with this binding

1. Using the wrong bitness (32-bit host with the 64-bit DLL or vice versa) — "ActiveX component can't create object".
2. Writing .NET spelling (`New Chilkat.Http()` without `CreateObject`, `Chilkat.Http` as a .NET type) in a COM host; or `CkHttp` from other bindings.
3. Testing a status result with `True` instead of `1`/`<> 0` in hosts where booleans are Longs.
4. Omitting `Global.UnlockBundle` (the program runs in trial mode and stops working after 30 days).
5. Inventing members by analogy with other libraries. If a member is not on the class page, it does not exist — look it up rather than guessing.
6. Using deprecated members that older examples still show. The class page lists each one with its replacement; `deprecated.md` lists them all.
7. Ignoring the failure path. Every Chilkat method reports failure (see each method's note); `LastErrorText` says why, and printing it is the first debugging step.
8. Using one Chilkat object from two threads at the same time. Create one object per thread, or protect it with a lock.

## 9. Instructions block for coding agents

Paste into `CLAUDE.md`, `.cursor/rules`, or Copilot instructions:

```
This project uses Chilkat 11.7.0 from ActiveX (COM) (ProgID Chilkat.<Class>, e.g. CreateObject("Chilkat.Http")).
- Reference: https://www.chilkatsoft.com/ai-docs/v/11.7.0/activex/ — read guide.md once, then classes/<Class>.md for each class used.
- Call UnlockBundle on CreateObject("Chilkat.Global") once at startup.
- Methods never raise COM errors on failure: check the 0/Nothing/empty result and print obj.LastErrorText.
- Never use a member that is not on the class page; never use members listed as deprecated.
```

## 10. Classes

[Class index for ActiveX](https://www.chilkatsoft.com/ai-docs/v/11.7.0/activex/index.md)
