.OCX

Файл OCX

ActiveX Control
Задать вопрос
БЫСТРЫЙ ОТВЕТ

An OCX file is an ActiveX Control, a Windows library (technically a COM-based DLL) that provides a reusable component to other programs, common in old Visual Basic 6 and Office VBA applications. You cannot open it by double-clicking. If a program reports a missing or unregistered OCX, reinstall the program that owns it rather than downloading the file from a third-party site. If you must register it manually, use "regsvr32 file.ocx" from an elevated Command Prompt.

Разработчик: Microsoft Категория: Файлы разработчика MIME: application/octet-stream
ОТКРЫВАЕТСЯ НА Windows
Связанные: .DO · .MD · .HEX · .XSD

На этой странице

Проиндексировано расширений: 19k+
Последняя проверка: Jul 21, 2026

Не знаете, что это за файл?

Перетащите любой файл в наш идентификатор - мы прочитаем первые байты, чтобы определить формат.

Идентифицировать файл

Что такое формат файла OCX?

.ocx files are associated with the ActiveX control module for the Microsoft Windows operating system. The format originated in 1994 as OLE Custom Controls and was rebranded as ActiveX Controls in 1996. Structurally, an .ocx file is a compiled Windows PE binary - effectively a .dll that starts with the MZ magic header and exposes COM control interfaces, including the mandatory DllRegisterServer export.

ActiveX is a software framework for managing components used by applications developed in programming languages such as:

  • Visual Basic,
  • C++,
  • Delphi,
  • PowerBuilder.

Controls stored in .ocx files allow for fast and efficient data exchange between various applications running on Windows. They facilitate information transmission between elements and allow for rapid application development. Each control is registered in the Windows Registry by running regsvr32 file.ocx; to unregister, use regsvr32 /u file.ocx. Controls can also be used to run components in various environments - for example, as in-page web browser applets - though this use is now considered legacy since ActiveX support was dropped in Microsoft Edge and retired with Internet Explorer in 2022-2023. An embedded .tlb type library inside the .rsrc section describes the control's interfaces to host tools.

It is advised to disable ActiveX due to the known security risks it exposes the system to. Disabling ActiveX prevents .ocx files from being loaded by browsers or legacy host applications. For new Windows development, WinForms and WPF controls have effectively replaced the ActiveX model.

Безопасность и защита

РИСК: HIGH

An OCX is executable code that registers itself deep in Windows (COM/CLSID), so it deserves caution. Risks: malicious or trojanised ActiveX controls can run with the host app's privileges, and ActiveX was historically a major browser-drive-by vector in Internet Explorer (now retired). "OCX download" sites are a classic malware/PUP channel and usually supply a wrong-version control that won't fix the app anyway. Rules: fix missing-OCX errors by reinstalling the program that owns the control, not by downloading the OCX from a third-party site; if you must obtain a known Microsoft control (e.g. MSCOMCTL.OCX), get it from the official Microsoft package; check an unknown OCX's digital signature (Properties > Digital Signatures) and scan it on VirusTotal before registering it. Never register OCX files you don't trust.

Детали формата

в двух словах
ПОЛНОЕ НАЗВАНИЕActiveX Controlтакже известен как OLE Control Extension, ActiveX Control file
РАЗРАБОТЧИКMicrosoftс 1994 (OLE Custom Controls / OCX); rebranded ActiveX Controls in 1996
MIME-ТИПapplication/octet-stream
ТИПWindows PE (Portable Executable) DLL exposing COM/ActiveX controls - compiled binary
СВЯЗАННЫЕ.do.md.hex.xsd
MAGIC BYTES · СИГНАТУРА ФАЙЛА
СМЕЩЕНИЕ
0001
HEX
4D5A
ASCII
MZ
An OCX is a PE file: it starts with "MZ", and "PE\0\0" (50 45 00 00) appears at the offset stored in the DOS header field e_lfanew (0x3C). The DLL flag (bit 0x2000 in the COFF Characteristics field) is set - an OCX is structurally a DLL that exports DllRegisterServer and exposes COM control interfaces.

Программы, открывающие файлы OCX

Windows5 apps
Microsoft Visual Studio Freemium For developers: inspect or host the control; use the legacy ActiveX Control Test Container / OLE-COM Object Viewer to view its interfaces.
Resource Hacker Бесплатно Open the OCX to view/extract icons, dialogs, version info and other resources (it's a PE file).
Microsoft Windows (regsvr32, built-in) Встроенная Register the control: open an elevated Command Prompt and run 'regsvr32 path\to\file.ocx' (use the 32-bit C:\Windows\SysWOW64\regsvr32 for 32-bit OCX on 64-bit Windows).
Visual Basic 6 IDE (legacy) Платно Add the OCX via Project > Components to drop the control onto a form - the original ActiveX host. Legacy/EOL.
Dependencies (lucasg) Открытый код Open the OCX to see its imports/exports and which DLLs it requires - useful when registration fails with missing dependencies.

Технические подробности

глубокая спецификация
File structurePE (Portable Executable) binary - same container as a .dll; DOS stub + MZ header, PE/COFF headers, section table, code/data sections, and a .rsrc resource section
Magic bytes0x4D 0x5A ("MZ") at offset 0; PE signature 0x50 0x45 0x00 0x00 at the offset stored in the DOS e_lfanew field (0x3C)
PE variantPE32 (x86/32-bit) or PE32+ (AMD64/x64); DLL characteristic flag (0x2000) set in the COFF Characteristics field
Required exportsDllRegisterServer, DllUnregisterServer, DllGetClassObject, DllCanUnloadNow - mandatory for a self-registering COM server
Registration mechanismregsvr32 file.ocx writes CLSID, ProgID, and type-library GUIDs under HKCR\CLSID\{...} in the Windows Registry; regsvr32 /u removes them
COM interfaces (UI control)Must implement IUnknown; in-process UI controls additionally expose IOleObject, IOleControl, IOleInPlaceObject, and IDispatch for scripting and VBA automation
Embedded type libraryA compiled .tlb type-library resource is typically embedded in the .rsrc PE section, describing the control's interfaces to IDEs and VBA hosts
Byte orderLittle-endian (Intel/x86 native)
EncodingBinary (compiled native code - not interpreted or text-based)
Typical file size20 KB - 10 MB depending on the number of controls and embedded UI resources
Authenticode supportOptional Authenticode digital signature for publisher verification; PE header CheckSum field provides a basic integrity check
MIME typeapplication/octet-stream (no MIME type specific to .ocx is registered)
Host dependencyCannot run standalone; must be instantiated by a COM-aware host: VB6 IDE, MFC/ATL application, Office VBA user form, or legacy Internet Explorer
Security statusConsidered high-risk (arbitrary native-code execution in host process); dropped in Microsoft Edge; retired with Internet Explorer in 2022-2023
Predecessor formatReplaced 16-bit .vbx (Visual Basic Extension) controls introduced with Visual Basic 1.0 in 1991
Platform supportWindows (Win32 / Win64) only; no native support on macOS or Linux
Выпущен1994 (OLE Custom Controls / OCX); rebranded ActiveX Controls in 1996
Последняя версияN/A (tied to the COM/ActiveX model; effectively frozen, legacy on modern Windows)
Спецификацияlearn.microsoft.com

Конвертации OCX

Вопросы и ответы сообщества

спрошено пользователями
Задать быстрый вопрос
Получите помощь от людей, работающих с файлами OCX. Будьте конкретны - укажите вашу систему и версию ПО.
Аккаунт не нужен · ответы обычно в течение дня

Вопросов пока нет - станьте первым, кто спросит о файлах OCX.

Часто задаваемые вопросы

How do I register an OCX file with regsvr32?
Open an elevated Command Prompt and run 'regsvr32 path\to\file.ocx'. On 64-bit Windows a 32-bit control must be registered with the 32-bit tool: 'C:\Windows\SysWOW64\regsvr32 file.ocx'. Unregister with the '/u' switch.
How do I fix 'Component XXXX.ocx not correctly registered' or 'missing OCX'?
Best: reinstall the program that owns the control. If you have the OCX, copy it to the app's folder (or System32/SysWOW64) and register it with regsvr32. For Microsoft controls like MSCOMCTL.OCX, install the official Microsoft package rather than a random download.
What is an OCX file and how is it different from a DLL?
An OCX is an ActiveX Control - structurally a DLL (PE library) but specialised to expose COM controls (UI widgets, components) that host apps embed. The .ocx name signals it's a registerable ActiveX control rather than a general library.
Can I open or run an OCX by double-clicking it?
No - an OCX has no standalone entry point. It's loaded by a host program (VB6, an Office VBA form, a legacy app) via its COM CLSID after being registered with regsvr32.
Is it safe to download an OCX from an 'OCX download' website?
No. Those sites are an unverified malware/PUP vector, and a mismatched version usually won't fix your app. Reinstall the owning program or get Microsoft controls from official Microsoft packages instead.
Are OCX files still used? Do they work in Edge/modern Windows?
They're legacy. ActiveX never worked in Microsoft Edge and went away with Internet Explorer's retirement (2022-2023). OCX controls still run inside old desktop apps (VB6/VBA) on current Windows, but new software uses .NET controls instead.

Ссылки

1Microsoft Learn - ActiveX Controls (MFC)learn.microsoft.com
2Microsoft Learn - PE Format specificationlearn.microsoft.com

Узнать больше

по всей базе данных

Популярные расширения на этой неделе

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.PARTPartial Download File
4.DATProgram Data File (generic)
5.BINCD/DVD Disc Image (BIN/CUE)
6.EXEWindows Executable (Portable Executable)
7.RPMSGRestricted Permission Message
8.NOMEDIAAndroid No-Media Marker File
9.MDMarkdown Document
10.TXTPlain Text File

Похожие расширения

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Бесплатные инструменты для файлов

Идентификатор файлов и конвертер изображений в браузере - все работает на вашем устройстве.

Открыть инструменты

Обзор расширений файлов A-Z