jacob – Can’t co-create object
Hey, im trying to get a mycomobject.dll file to download can i get some help please. Wednesday, August 1, 2018 6:14 AM. Windows XP, Vista, 7, 10 - C: Windows System32 If you use a 64-bit. Windows 95/98/Me - C: Windows System Windows NT/2000 - C: WINNT System32 Windows XP, Vista, 7, 10 - C: Windows System32 If you use a 64-bit version of Windows, you should also copy engine.dll to C: Windows SysWOW64 Make a backup copy of the original files Overwrite any existing files Reboot your computer. If the problem still occurs, try the. Hi Peter, This problem may occur if a file that the Windows Product Activation (WPA) requires is damaged or missing. This behavior occurs if one or both of the following conditions are true. The problem, once again, is KB4556799, a recent Windows 10 update pushed to millions of PCs which has already caused numerous issues, including Blue Screen of Death (BSOD) crashes, deleted user. My VM SCCM windows 2012 R2 server can't get a sccm-client on my windows 7 VM. I tried client-push and the CCMSetup.exe is running, but eventually stops. The ccmsetup.log gives me GetDPLocations f.
Probably you have a Java Application that uses jacob library to call a method inside a Windows COM object.
When executing the above code, you may run into this error:
com.jacob.com.ComFailException: Can’t co-create object
at com.jacob.com.Dispatch.createInstance(Native Method)
First, a little bit of theory.
Intro on COM objects
A COM object exposes a piece of functionality. For example if you want to manipulate Excel, there is a COM object that encapsulates all the methods needed to do pretty much anything you want (create charts, Pivot Tables, etc). Each COM object can be uniquely identified via a 128-bit number, e.g. {0EA22763-9933-11D0-A535-00C04AEV3F} called or CLSID ,orGUID
- All objects available in your system can be seen using regedit.exe. Open it and go to HKEY_CLASSES_ROOTCLSID.
Nobody wants to remember a 128 bit number, so an additional level of abstraction exists for identifying COM objects, called ProgID which is basically an alias.
- The GUID – ProgID mapping is also stored in the Windows Registry. Open regedit and browse to HKEY_LOCAL_MACHINESOFTWAREClassesWord.ApplicationCLSID to view the CLSID of the COM object that allows you manipulating the Word application.
Functionality offered by a COM object is exposed through interfaces, which contain one or more methods. Each interface is uniquely identifiable via a CLSID as well.
- For example, Excel.Application COM object exposes the Charts interface, which contains the Add method.
Object Browser in Visual Studio can be used for browsing the
COM objects and the interfaces exposed by them: Click on View->Object Browser. From the Browse select list, choose Edit Custom Component Set Switch to the COM tab
Using a COM object
Mycomobject.dll Download Windows 10
Before using a COM object, it must be registered to the system (e.g. it’s CLSID or ProgID must exist in Windows Registry). If it’s not registered, regasm.exe utility can be used to do that:
%systemroom%Microsoft.NETFrameworkv2.0.50727RegAsm.exe /verbose /nologo /codebase C:tempmyCOMObject.dll
Once it’s registered CoCreateInstance() API method can be used to obtain a reference to an interface exposed by the object and call its methods.
Windows 10 Download
Troubleshooting the jacob error
Under the hood, jacob will do the following:
- Obtain the CLSID of the ProgId supplied in the ActiveXComponent constructor
- Call CoCreateInstance to get a reference to the object
- CoCreateInstance fails and the error is thrown back in Java.
Resolution
- Either your object is not registered (use RegAsm.exe to register it)
- Jacob attempts to get a reference to a 32 bit COM object from a 64 bit environment, e.g. Java application running inside a JRE 64 (this was my case)
- Unregister the 32 bit version
- %systemroom%Microsoft.NETFrameworkv2.0.50727RegAsm.exe /unregister C:tempmyCOMObject.dll
- register again the object using the 64 bit version of regasm
- %systemroom%Microsoft.NETFramework64v2.0.50727RegAsm.exe /verbose /nologo /codebase C:tempmyCOMObject.dll
- Unregister the 32 bit version
Having all this info, hopefully you can fix your applications as well. If you have found a different cause for this error, leave it in the comments and I’ll update the post.
UPDATE: Use OLE /COM Object viewer to manage COM objects registered in your system: