COMException: 80040154: Class not registered
David Hay <[email protected]>
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
Hi, Sorry - another newbie question I'm sure... It appears that when the product I am trying to interface to is installed, the class does not get registered? I am getting the following exception when I try and create an Engine object: org.jawin.COMException: 80040154: Class not registered at org.jawin.marshal.GenericStub.win32Invoke0(Native Method) at org.jawin.marshal.GenericStub.win32Invoke(GenericStub.java:152) at org.jawin.FuncPtr.invoke(FuncPtr.java:186) at org.jawin.FuncPtr.invoke(FuncPtr.java:205) at org.jawin.win32.Ole32.CoCreateInstance(Ole32.java:169) at org.jawin.COMPtr.<init>(COMPtr.java:134) at org.jawin.DispatchPtr.<init>(DispatchPtr.java:104) at com.lexmark.olympus.action.ocr.jawin.IEngine.<init> (IEngine.java:55) at com.lexmark.olympus.action.ocr.OCR.go(OCR.java:27) at com.lexmark.olympus.action.ocr.OCRTest.testBarcodeRead (OCRTest.java:44) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (RemoteTestRunner.java:421) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (RemoteTestRunner.java:305) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (RemoteTestRunner.java:186) As I'm new to COM, I'm not sure what to do! Does it have to be installed before I can use Jawin stubs? Can I call it another way? I have looked at some of the C++ samples supplied with the product, and they seem to load the dll first, then call the GetEngineObject method (funnily enough the one in my previous post) to create the Engine. So, can I load the dll from Java and then use Jawin to call methods on it? I'm confused! thanks for any clarification... David