Здравствуйте. Возникла проблема при получении интерфейса ICircles из IDrawingContainer. При выполнении выскакивает исключение. Пишет что интерфейс не зарегистрирован (HRESULT 0x80040155).
То же самое с IBeziers и IEllipses.
С ILineSegments и разными размерами все работает;
Visual Studio 2010 Язык C# Компас 13-й.
IKompasDocument2D doc=(IKompasDocument2D)app.Documents.Add(DocumentTypeEnum.ksDocumentDrawing, true);
IKompasDocument2D doc = (IKompasDocument2D)app.ActiveDocument;
IDrawingContainer box = (IDrawingContainer)doc.ViewsAndLayersManager.Views.ActiveView;
ISymbols2DContainer sco = (ISymbols2DContainer)doc.ViewsAndLayersManager.Views.ActiveView;
ICircles cls=box.Circles; //<-Здесь косяк.
ILineSegments lines = box.LineSegments; <-Здесь нормально
ILineDimensions dims = sco.LineDimensions; <-Здесь нормально
IRadialDimensions rs = sco.RadialDimensions; <-Здесь нормально
IDiametralDimensions ds = sco.DiametralDimensions; <-Здесь нормально
При этом окружности у меня однозначно есть в документе. Да и даже если бы их не было — без доступа к коллекции все равно в API7 их не нарисуешь. Подскажите пожалуйста в чем может быть проблема.
I’m making a synchronous cross-process COM call that executes successfully, but when I check the HRESULT returned it’s the aforementioned 0x80040155, or «Interface not Registered» and the out parameter doesn’t contain any data.
Is there a way to re-register COM executibles? I’m not even sure that this would fix it, so is there an alternative way to fix this?
This problem appears to be localized to a particular system, as it works successfully on other systems.
asked Nov 23, 2010 at 2:53
4
Most COM executables can be registered by running COMserver.exe /regserver
answered Nov 23, 2010 at 7:45
![]()
MottiMotti
109k46 gold badges185 silver badges259 bronze badges
After registering the COM executables, I still received the same Interface not Registered error.
I was able to get rid of the exception by repairing Visual Studio. You can do by clicking Repair in the setup wizard, or in Visual Studio 2017, open the Visual Studio Installer then click Additional Choices -> Repair.
answered Aug 2, 2017 at 17:30
![]()
Kyle WilliamsonKyle Williamson
2,2415 gold badges45 silver badges72 bronze badges
0
I’m making a synchronous cross-process COM call that executes successfully, but when I check the HRESULT returned it’s the aforementioned 0x80040155, or «Interface not Registered» and the out parameter doesn’t contain any data.
Is there a way to re-register COM executibles? I’m not even sure that this would fix it, so is there an alternative way to fix this?
This problem appears to be localized to a particular system, as it works successfully on other systems.
asked Nov 23, 2010 at 2:53
4
Most COM executables can be registered by running COMserver.exe /regserver
answered Nov 23, 2010 at 7:45
![]()
MottiMotti
109k46 gold badges185 silver badges259 bronze badges
After registering the COM executables, I still received the same Interface not Registered error.
I was able to get rid of the exception by repairing Visual Studio. You can do by clicking Repair in the setup wizard, or in Visual Studio 2017, open the Visual Studio Installer then click Additional Choices -> Repair.
answered Aug 2, 2017 at 17:30
![]()
Kyle WilliamsonKyle Williamson
2,2415 gold badges45 silver badges72 bronze badges
0

True Vendor Neutrality
0x80040155 DCOM Error
This video shows how to identify and repair OPC/DCOM error 0x80040155.
Cause
Windows reports error 0x80040155 as: Interface not registered. Programmers know this error as REGDB_E_IIDNOTREG.
This error typically occurs when trying to connect to remote applications. During this error condition, DCOM was able to find the required (server) application on the target computer. However, this application uses interfaces (i.e. features) not locally registered.
Repair
- Open OPC Expert
- Select ‘Tools’
- Select ‘Options’
- Ensure ‘Enable Essential OPC Features’ is enabled
- Select ‘Options’
- Try your connection again
Return to OPC Support
Title
Page load link
Problem
User clicks ‘Company — Data Entry — Reported Values’. This triggers Excel to open. An error appears.
Symptom
The error message will vary slightly, but (in general) it will be similar to:
Standard Error
Details:
Source: Microsoft.Office.Interop.Excel
Description: Interface not registered (Exception from HRESULT: 0x80040155)
at Microsoft.Office.Interop.ApplicationClass.get_COMAddins()
at Cognos.Controller.Forms.Common.fFrmFrangoFunc.InitExcelLink
(Ibject & xlApp, String s Text, Int32 excelProcessId)
at Congos.ControllerForms12.frmDataEntrySlection.StartExcel()
Cause
Problem with Microsoft Office installation on the client device.
There are several known problems with MS Office which have caused similar ‘0x80040155’ errors:
- Scenario #1 — Client device (for example and user’s PC) does not have a full/complete Microsoft Office installation.
- Some of the ‘optional’ components (for example, the shared components) were not selected/chosen during the Microsoft Office installation routine
- Scenario #2 — Microsoft Office has become corrupt, and requires repairing.
- Scenario #3 — Client device had incompatible version of Microsoft Office installed.
- Scenario #4 — Client device had incompatible combinations of MS Office and MS Skype installed.
- Because some versions of MS Skype are packaged in the same way as MS Office, Skype can cause MS Office registry keys to get created which make it appear that there are two versions of MS Office installed. This confuses Controller
- Example: In one real-life customer example, the client device had Office 365 with Skype 365.
- Scenario #5 — Corruption in the client device’s registry, triggered by installing/uninstalling different Microsoft Office-related components.
- For more information see separate IBM Technote #10738179.
Resolving The Problem
Scenario #1:
1. Uninstall Microsoft Office from client device
2. Install Microsoft Office, typically choosing the default settings
- In other words, during the Microsoft Office installation wizard, make sure you choose the default options (which installs the required components), or (if unsure) simply install *all* Microsoft Office components.
Scenario #2:
Repair Microsoft Office.
Steps:
The steps vary depending on operating system and version of MS Office. For example, for Windows 10:
1. Right-click the Start button Windows Start button (lower-left corner), and select Programs and Features
2 .Right-click the entry for Microsoft Office, and select Change.
3. Inside the «How would you like to repair your Office Programs» screen, typically select Repair, and then select Continue.
4. Follow the instructions on the screen to complete.
Scenario #3:
In one real-life customer case, the client device had:
— Early version of Controller 10.2.1
— Microsoft Office «Home and Business» 2016, 32-bit, installed via click-to-run
In their cause, the solution was to:
1. Uninstall MS Office Home and Business
2. Install a supported ‘MSI/traditional-installation’ version of MS Office.
Scenario #4:
In some situations, try ininstalling MS Skype, then rebooting the client device, and re-trying.
Scenario #5:
Delete the ‘wrong’ entries, related to the registry key: {000C033A-0000-0000-C000-000000000046}
- For more information see separate IBM Technote #10738179.
Related Information
[{«Product»:{«code»:»SS9S6B»,»label»:»IBM Cognos Controller»},»Business Unit»:{«code»:»BU059″,»label»:»IBM Software w/o TPS»},»Component»:»Controller»,»Platform»:[{«code»:»PF033″,»label»:»Windows»}],»Version»:»10.2.1″,»Edition»:»All Editions»,»Line of Business»:{«code»:»LOB10″,»label»:»Data and AI»}}]
Содержание
- Interface not registered 80040155 windows server
- Answered by:
- Question
- Answers
- All replies
- Interface not registered 80040155 windows server
- Answered by:
- Question
- Answers
- Interface not registered(0x80040155) when running Pex On Specific machine
- Pex 0.94.0.0 Release Visual Studio 10.0.40219.1 Bug Report
- COM Exception 64-bit Outlook [0x80040155 Interface not registered] #220
- Comments
- phw198 commented May 26, 2017 •
- phw198 commented May 26, 2017
- TontonLud commented May 26, 2017
- phw198 commented May 26, 2017
- TontonLud commented May 29, 2017 •
- jonathanlaf commented Jun 14, 2017
- gruset commented Jun 16, 2017
- phw198 commented Jun 17, 2017
- gruset commented Jun 19, 2017
- TontonLud commented Jun 19, 2017
- gruset commented Jun 20, 2017
- phw198 commented Jun 20, 2017
- gruset commented Jun 20, 2017
- phw198 commented Jul 8, 2017
- TontonLud commented Jul 9, 2017
- phw198 commented Jul 17, 2017 •
- TontonLud commented Jul 17, 2017
- phw198 commented Aug 8, 2017
- TontonLud commented Aug 10, 2017
- phw198 commented Aug 10, 2017
- TontonLud commented Aug 12, 2017 •
- phw198 commented Aug 12, 2017
- Tripartio commented Aug 27, 2017
- phw198 commented Aug 27, 2017
- Tripartio commented Aug 27, 2017
- phw198 commented Aug 28, 2017
- Tripartio commented Aug 28, 2017
- Interface not registered 80040155 windows server
- Вопрос
- Все ответы
Interface not registered 80040155 windows server
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
![]()
Answered by:

Question


I am attempting to run a previously developed program on a new computer, but am receiving «Error Interface Not Registered 0x80040155». It appears to be happening at a point in the code that attempts to use Access 2010 automation to create several query definitions in an Access 2010 database via the code:
Dim accSummary as Access.DAO.Querydef = accApp.CurrentDB.CreateQueryDef(«[SQL Query Text Here]»)
. where accApp refers to an already established Access Application object. This program was originally designed for and operated fine on a Windows XP x86 SP3 machine with Office 2007 and works fine on my development machine a Windows 7 x64 machine with Office 2010. The problem machine is another Windows XP x86 SP3 machine with Office 2010.
Answers




Microsoft MVP (Visual Basic)


The program was originally designed for x86 with Office 2007. Does the copy from the development machine work on the x86 Office 2007 machine?
Now it is on a development machine which is x64.
Is the app compiled to x86 and works on the x64 development machine?
Is Office 2010 on the development machine an x86 or x64 install of Office?
Is Office 2010 on the XP machine x86 or x64 install of Office?
Are all the service packs for Office 2010 installed on both the development machine and the XP machine?


Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.




The program was originally designed for x86 with Office 2007. The copy from the development machine worked properly on the x86 Office 2007 machine (that is before that machine died. ). Currently the only working copy is the x64 development machine with Office 2010.
The application is compiled for x86 (not «any cpu») and works on the x64 machine
The Office installation on the development machine is a 32-bit installation
The Office installation on the XP machine is a 32-bit installation
Office 2010 is current to Service Pack 2




According to this link by emerset Consulting Group Microsoft Office 2010 Standard does not come with Access and Microsoft 2010 Professional Plus does come with Access.
So if Microsoft Office installed on the XP machine does have Access and I suppose you are copying an Access Database onto that PC when your app is installed on that PC I don’t know what the issue(s) could be.
However if the XP machine has more than one version of Office on it for some reason perhaps that would be an issue. Here’s another link for doing what Paul P Clement IV advised with regard to an XP machine. It’s a video and specifies it may work if there is a single installation of Office 2010 on the machine. Although maybe the video means only one install of Office on the machine and that install must be Office 2010 (and in your case I suppose Office 2010 Professional Plus with service packs 1 and 2 maybe).
I don’t have XP and know nothing about its filesystem so if you install your app on XP and you copy a database onto XP for your app to use I suppose you would have to make sure in some way that you can connect to that database at whatever location it would be in. I know Windows 7 special folders are different than XP’s special folders to some extent but don’t know how you install your app to a particular location on XP or where you place your database when you install your app on XP.
Also is your app installed on the development x64 machine or just working from Visual Studio debugger on the development machine?
Источник
Interface not registered 80040155 windows server
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:

Question


I´m getting this error:
Any idea on how to fix it?
Answers


Try to use the late-binding instead using the CreateObject method, see Using early binding and late binding in Automation for more information.
Also you can try to check the type library reference. Open the VB Editor, then choose Tools->References from its main menu. I suspect you will see «Missing» reported for the «cTWSControl» reference. If so, uncheck that reference, find the valid reference offered in the drop-down list and place a check mark next to that one.
Click «OK», and then choose Debug->Compile from the VB Editor’s main menu. If the project compiles without error, you’re done. If not, you will have to fix anything the compiler complains about.
Источник
Interface not registered(0x80040155) when running Pex On Specific machine
Pex 0.94.0.0 Release Visual Studio 10.0.40219.1 Bug Report
I run without problem on another machine (In Office, VS2010 Utimate)
But I got this exception on my home computer(VS2010 Professtional)
exception details: System.InvalidCastException: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘EnvDTE.DTE’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘<04a72314-32e9-48e2-9b87-a63603454f3e>‘) failed due to the following error: Interface not registered. (Exception from HRESULT: 0x80040155) at Microsoft.Pex.VsPackage.VsServiceProviderHelper.GetService[T](IServiceProvider serviceProvider) at Microsoft.Pex.VsPackage.Helpers.ProjectHelper.SaveAllFiles(IServiceProvider serviceProvider) at Microsoft.Pex.VsPackage.Actions.ActionComponent.SaveAll() at Microsoft.Pex.VsPackage.Actions.ExplorationActionBase.InternalExecute() at Microsoft.Pex.VsPackage.Actions.ActionComponent.Execute(Object target)
Current stacktrace at Microsoft.Pex.VsPackage.Controls.ErrorReport.CreateReport(Exception ex) at Microsoft.Pex.VsPackage.Controls.ErrorReport.<>c_DisplayClass4.b_3() at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at Microsoft.Pex.VsPackage.Helpers.UIThreadInvoker.SafeMethodInvoker.Invoke() at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks() at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
relevant environment variables: COR_ENABLE_PROFILER= COR_PROFILER= PROCESSOR_ARCHITECTURE=x86
Источник
Issue forked from Issue #90
Same error here with Outlook 2016 on Windows 10 (1703), Exchange 2016.
Outlook Google Calendar Sync.zip
Possible fixes to try [updated 17 Jul]:
The text was updated successfully, but these errors were encountered:
First things first. Have you tried running an Office Repair?
@phw198 office repair done. same problem
Are you running 64-bit Office? Could you try Hotfix-v2.4.0.4.zip which is compiled to handle 64-bit as well [see instructions for applying].
Are you running 64-bit Office? Could you try Hotfix-v2.4.0.4.zip which is compiled to handle 64-bit as well [see instructions for applying].
Yes I’m running Office 2016 64 bits.
I’ve tried the Hotfix, nothing change, same error.
Same problem here, Win10 x64, Office 2016. Tried the hotfix, but since it’s not installed yet, it’s not really relevant. Tried the portable version too, was not working either.
I’m seeing the same problem. Windows 10, Office 360 (Outlook 2016) x64 version.
I’m on ver. 2.5.0 beta.
Could you try following through these instruction and see if that helps?
It looks like that may have solved the issue. The initial reboot after registering the dll did not throw an error, lets hop it continues working. 32/64 bit incompatibility is a struggle!
Not solved for me. Same error. I can provide logs if needed.
And we are back to square. This morning it threw the error again. My log file is attached.
OGcalsync.zip
That is true. I don’t know why the log didn’t show anything from the 20th. I’ve closed the program and checked the log. Now it has the correct entries. See attachment.
This is probably whats going on: System.Runtime.InteropServices.COMException: Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE))
I still don’t see any logging of the original error 0x80040155 on the 20th.
Are you sure the problem isn’t fixed??
I’ve just updated to 2.5.1. Problem isn’t fixed for me. See attached debug logs
@TontonLud Just to be clear, the problem is primarily with your install of Office, will require searching Google and likely a registry fix on your computer. I say «primarily» as it may be possible to perform late binding within OGCS (note to self) to workaround an unregistered interface.
I’ve already checked my registry and everything seems to fine (see my registry export)
registry.zip
@TontonLud So something looks a bit off in your registry export:
Mine has an extra Root directory in there:
@=»C:\Program Files\Microsoft Office\Root\Office16\MSOUTL.OLB»
Can you check if the path in your registry to MSOUTL.OLB is actually correct?
@phw198 my MSOUTL.OB file is in C:Program FilesMicrosoft OfficeOffice16 directory.
I don’t have Root folder because it depends of the installation of Office 2016 (if you have Office 2016 or Office 365 ProPlus 2016)

c:WindowsMicrosoft.NETFramework64v4.0.30319regtlibv12.exe C:Program FilesMicrosoft OfficeOffice16MSOUTL.OLB
@phw198 C:Programmes is an alias of C:Program Files because I have a french Windows 10.
The real path is for sure C:Program FilesMicrosoft OfficeOffice16MSOUTL.OLB
Unfortunately, I’ve tried everything here, and nothing works. I still get the 0x80040155 error every time. Specifically:
I tried the solution at https://www.fieldstonsoftware.com/support/support_gsyncit_8002801D.shtml even before I joined the issue discussion here, and there is no problem with my registry. I have only one registered version, 9.6, which is correct for Outlook 2016.
I applied the solution at http://synqit.com/0x80040155-error-howto, and it made no difference whatsoever.
I tried running the Hotfix-v2.4.0.4.zip hotfix you provided, but then OGCS doesn’t execute at all.
My current version is 2.6.1 alpha.
However, I don’t understand your last post that says, «Have you tried re-registering it with regtlibv12.exe?», so I haven’t tried that. Could you please clarify what that means?
Yeah, I wouldn’t apply the hotfix 2.4.0.4 to 2.6.1 🙂
My last post was referencing my previous post which also provided an example command to execute.
Thanks for the response, but:
My registry key HKEY_CLASSES_ROOTWow6432NodeTypeLib<00062fff-0000-0000-c000-000000000046>9.6Win64 correctly points to the valid file «C:Program FilesMicrosoft OfficeRootOffice16MSOUTL.OLB». There doesn’t seem to be any problem there.
I’m sorry that you’re spending so much time on this, but I really do appreciate it. Do you have anything else I might try?
Looks like reglibv12.exe can be downloaded here.
Voilà! The reglibv12.exe finally worked! Specifically:
Источник
Interface not registered 80040155 windows server

Вопрос


This is a recent problem that just appeared this morning. The code is a VBA macro (not VB.Net) from Solidworks (CAD software) that opens and reads an Excel sheet before returning back to Solidowrks. It’s currently running fine on two other network computers, and was running fine on this one until this morning. Operating system is Windows 10.
Here is a snippet of the code: (error occurs on line three)
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set xlApp = New Excel.Application
xlApp.Visible = False
Using this code for late-binding does not work either, however this brings up an ActiveX error.
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set xlApp = CreateObject(«Excel.Application»)
xlApp.Visible = False
This brings up an error «ActiveX cannot create object.»
I’ve tried with different object libraries. The standard throughout the workplace is the Excel 14.0 object library. (Computer is currently running Excel 2019). I’ve tried with the Excel 16.0 object library and it made no difference.
Any thoughts on where this problem could be coming from?
Edit: This topic has been re-posted to the correct VBA forum instead of VB.Net. (That thread has the same title)
Все ответы


It’s currently running fine on two other network computers, and was running fine on this one until this morning.
Then its (of course you realize this) an environmental issue which is unrelated to VB.NET code. So the solution is to find out what is different between the computer which works and then one that does not past the OS.
Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.


SW is just an abbreviation for Solidworks, which is CAD software.
I understand there must have been some change on the problem computer, however I am self-taught in VB so I’m confident there are places I don’t know to look.


SW is just an abbreviation for Solidworks, which is CAD software.
I understand there must have been some change on the problem computer, however I am self-taught in VB so I’m confident there are places I don’t know to look.
VB.NET has nothing to do with the issue, it’s environmental outside of code.
Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.


I understand it’s not a coding issue, as the code works fine elsewhere. I’m looking for help identifying where that change could be, or ideally a more universal/robust method for adding the object libraries that would not be subject to seemingly random changes.


I understand it’s not a coding issue, as the code works fine elsewhere. I’m looking for help identifying where that change could be, or ideally a more universal/robust method for adding the object libraries that would not be subject to seemingly random changes.
Okay, EPPlus is a great choice yet all examples are in C# but take the documentation should make it easier to use in VB.NET (and we only deal with VB.NET in this forum). Add the library from NuGet.
Personally I’ve not done anything with Excel automation in over 15 years as this is problematic while using libraries that don’t depend on Excel to even be installed is better which is why I use GemBox Excel library (and its not cheap but worth it many times over).
Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
Источник