COM库无法在Access 2016中使用Windows 10,运行时错误429 [英] COM library not working in Access 2016 with Windows 10, Runtime Error 429

查看:83
本文介绍了COM库无法在Access 2016中使用Windows 10,运行时错误429的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个COM库dll,我想在Windows 10机器上运行Access 2015。



为此,我制作了一个看起来像这样的COM课程



I have created a COM library dll that i want to use with Access 2015 running on a Windows 10 machine.

For this I have made a COM class that looks like this

Imports System.Runtime.InteropServices
Imports System.Drawing
Imports System.IO


<Guid("752F9930-6E87-417D-8AD4-1240E9CA2E46")>
Public Interface imageProcessorInterface
    Function getInfo() As String
    Function getImage(itemId As String) As String

End Interface

<Guid("722676EC-BCFA-4478-B850-7B2B753E8E68")>
<ClassInterface(ClassInterfaceType.None)>
Public Class imageProcess
    Implements imageProcessorInterface

    Public Function info() As String Implements imageProcessorInterface.getInfo
        Return "Version 1.0 2015-12-23"
    End Function

    Public Function getImage(itemId As String) As String Implements imageProcessorInterface.getImage
        If My.Computer.Clipboard.ContainsImage = True Then
            Try
                Dim image As System.Drawing.Image = My.Computer.Clipboard.GetImage
                Dim bitmap As New Bitmap(image)
                bitmap.Save("C:\test\" & itemId & ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg)

            Catch ex As Exception
                Return "CM Error Message : " & ex.Message
            End Try
            Return "OK"
        Else
            Return "NOK"
        End If
    End Function

    Public Sub New()
        MyBase.New()
    End Sub

End Class





当我用所有设置的COM选项构建这个库时,它在Access的引用框中很好地显示。它甚至可以正常工作。



但是,在我的桌面上运行Access 2016在Windows 7上它就像一个魅力,而在我的Windows 10机器上它失败了错误:



运行时错误429 - ActiveX组件无法创建对象



有人可以帮助我们解决这个问题,我只有一台在WX上运行的机器,所以我无法检查它是机器还是拥有该机器权限的东西。



我以管理员身份运行Access,但这也无效。



库被调用由VBA使用:





When I build this library with COM options all set, it shows up nicely in my reference box in Access. It even has intellisense working just fine.

However, on my labtop running Access 2016 on Windows 7 it works like a charm, while on my windows 10 machine it fails with an error :

Runtime Error 429 - ActiveX Component Can't Create Object

Can someone help we work this out, I only have one machine that runs on WX so I can't check if it's the machine or something with rights on this machine.

I run Access as an administrator, but that also did not work.

The library is called by VBA using :

Dim newImageProcessor As New imageProcess
Debug.Print newImageProcessor.getInfo





但是当你试图运行它时,429出现了。



我已经针对运行时错误429的问题尝试了几个修复程序,但是没有运气,有没有人有另一个建议?



But when you try to run it, the 429 shows up.

I have tried several fixes for problems with runtime error 429, but no luck yet, anyone have another suggestion ?

推荐答案

我已经使它工作,但不得不重新安装Office 365.不知道为什么在这个时候,但我的库不适用于64位版本的Office。



我现在安装了32位版本的Office,它可以工作。



这将.NET COM Libray设置为同时针对x86和x64 CPU,但这也不起作用。



现在很高兴至少有一个工作版本,在某些时候我将不得不调查为什么64位版本的Office不起作用。
I have made it work, but had to reinstall Office 365. Don't know why at this time, but my library did not work with the 64bits version of Office.

I have now installed the 32bits version of Office and it works.

This having the .NET COM Libray set to target both x86 and x64 CPU's, but that didn't work either.

Now happy to at least have a working version, at some point I will have to look into why the 64bits version of Office does not work.


这篇关于COM库无法在Access 2016中使用Windows 10,运行时错误429的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆