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

# Chilkat for VB.NET — language guide — v11.7.0

## 1. Which Chilkat binding this is

This is **Chilkat for .NET** used from VB.NET: namespace `Chilkat`, classes `Chilkat.Http`, `Chilkat.Zip`, … (no `Ck` prefix). Same assembly and packages as for C#: NuGet **`ChilkatDnCore`** for .NET 6 and later (Windows, Linux, macOS), `ChilkatDnCore31` for .NET Core 3.1, NuGet or ZIP for the .NET Framework 2.0–4.8 (Windows). Not the Chilkat ActiveX (that is for VB6/VBA/VBScript).

## 2. Install and requirements

```
dotnet add package ChilkatDnCore
```

Details and the .NET Framework packages: [https://www.chilkatsoft.com/dotnet.asp](https://www.chilkatsoft.com/dotnet.asp).

## 3. Unlocking and object creation

```vbnet
' Required once per process, before any other Chilkat object. Any string unlocks a 30-day trial.
Dim glob As New Chilkat.Global()
Dim success As Boolean = glob.UnlockBundle("Anything for 30-day trial")
If Not success Then
    Console.WriteLine(glob.LastErrorText)
    Return
End If

Dim http As New Chilkat.Http()
```

- 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

Chilkat methods **do not throw** for Chilkat-level failures. The note under each method on the class page says how it reports failure: a `Boolean` status method returns `False`; a `String`-returning method returns `Nothing`; a `Byte()`-returning method returns an empty array; an object-returning method returns `Nothing`; for an `Integer` result check `LastMethodSuccess`. `LastErrorText` holds the diagnostic in every case. Properties are real .NET properties (`http.Port = 443`).

Literals in VB.NET: true is `True`, false is `False`, null/none is `Nothing`.

## 5. Strings, bytes and encodings

- Strings are .NET `String`; a `charset` argument names the encoding of the *bytes* being produced or read.
- Binary data is `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

Managed objects wrapping a native object, released by the garbage collector; call `Dispose()` for deterministic release.

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.

## 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. VB.NET attaches handlers with `AddHandler http.OnPercentDone, AddressOf …` — see [https://www.chilkatsoft.com/vbnet_dotnet_core_event_callbacks.asp](https://www.chilkatsoft.com/vbnet_dotnet_core_event_callbacks.asp). Chilkat's `*Async` methods return a Chilkat `Task`, not an awaitable .NET Task.

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

1. Writing VB6/ActiveX code (`CreateObject("Chilkat.Http")`, `Set`) in a VB.NET program. In .NET it is `New Chilkat.Http()`.
2. Using `Try/Catch` to detect a Chilkat failure — check the return value instead.
3. Omitting `Global.UnlockBundle` (the program runs in trial mode and stops working after 30 days).
4. 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.
5. Using deprecated members that older examples still show. The class page lists each one with its replacement; `deprecated.md` lists them all.
6. 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.
7. 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 VB.NET (the .NET assembly: NuGet ChilkatDnCore for .NET 6+, namespace Chilkat).
- Reference: https://www.chilkatsoft.com/ai-docs/v/11.7.0/vbnet/ — read guide.md once, then classes/<Class>.md for each class used.
- Call New Chilkat.Global().UnlockBundle(...) once at startup.
- Chilkat methods never throw on failure: check the Boolean/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 VB.NET](https://www.chilkatsoft.com/ai-docs/v/11.7.0/vbnet/index.md)
