Hi,
I'm doing a program to capture from USB camera. And to do the program, I need directshow which can be found in directX sdk. I read that the new versions of directx are not compatable with VC++ 6.0. Does anybody know where I can get an old version which is compatable with VC++ 6.0?

If lets say it is not possible to get it, does anybody know of another alternative way of capturing image from USB camera, maybe can point me to documents or sample codes for it.

Thanks

Dani AI

Generated

Brief summary and practical options tied to the thread: asked for DirectShow support under VC++ 6.0. ’s idea of building a newer-VC++ DLL and calling it from VC6 is a valid, commonly used approach; is also correct that VC6 is very old and will cause friction. The realistic choices are:

  • Wrap DirectShow in a separate DLL built with a modern compiler (for example VC++ 2008 Express as suggested). Export a plain C API or implement a COM in-proc server. Avoid exposing C++ classes, STL types, exceptions, or CRT-managed memory across the DLL boundary. Prefer caller-provided buffers or provide explicit alloc/free functions so each module manages its own memory.

  • Use an external capture process (small EXE) that streams frames to the VC6 app via shared memory, a named pipe, or temporary files. This isolates runtime/CRT differences and is robust when mixing toolchains.

  • Stay entirely in VC6 and use older capture APIs that are simpler and historically supported by older toolchains (for basic webcam capture). These APIs are limited compared to DirectShow but can be enough for single-frame grabbing.

  • Use a third-party library (OpenCV, libuvc, etc.) for capture and either link it to a wrapper DLL or run it out-of-process. Libraries can hide DirectShow/MediaFoundation differences and simplify frame handling.

Example of a safe export pattern (conceptual):

extern "C" __declspec(dllexport) void* Capture_Open(int deviceIndex);
extern "C" __declspec(dllexport) int   Capture_GrabFrame(void* handle, unsigned char* buf, int bufSize);
extern "C" __declspec(dllexport) void  Capture_Close(void* handle);

Checklist / cautions: build both modules as 32-bit, match calling conventions, register COM servers if used, do not free memory allocated in another runtime, and test on the target OS/driver setup. These patterns let VC6 remain the host while letting modern SDKs handle DirectShow complexities.

Recommended Answers

All 4 Replies

why don't you use Visual C++ 2008 Express. it's free & it's compatiable with DirectX. You may make a dll with VC++ 2008 & use it in VC++ 6.0!

Oh.. thanks for the idea.. Do you know where I can find tutorial for that..?
I mean how to make a DLL in VC++ 2008 & use it in VC++ 6.0.
Thanks alot..

Do NOT use Visual C-- 6 AT ALL. It's WAY outdated, unsupported, non-standard compliant, etc. etc.
There is NO NEED WHATSOEVER to use it unless you're maintaining a large project created with it years ago that would take a lot of effort to migrate (in which case it's probably best to rewrite the whole thing, only doing critical maintenance on the old version while doing so).

>> Do you know where..
no. but search google, or create a new thread in this forum!
but I think the best tutorials about dlls are a few simple examples!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.