We have developed a dll which contains APIs to take camera snap using DirectShow( windows). It uses COM(component object model) for accessing directshow API's and its working fine using in VS2008 MFC application. Then we created JNI wrapper functions to call above dll functions from Java. But when we call functions from Java it showing error when executing COM related part(ie calls to 'CoInitialize', 'CoCreateInstance' etc). Is there any way to call to call COM & DirectShow components from java using JNI?