簡體   English   中英

在Windows 7中注冊COM對象(64位)

[英]Registering COM Objects in Windows 7 (64 bit)

當我在創建COM對象時運行VBScript時,我似乎遇到了問題,但僅在Windows 7上運行。

當您運行VBA腳本時,您將獲得:

Script: C:\Program Files\...
Line: 2
Char: 1
Error: ActiveX Component can't create object: 'my object'
Code: 800A01AD
Source: Microsoft VBScript runtime error

我已經使用命令提示符(Admin)向regsvr32注冊了dll,但是當它運行時我得到另一個錯誤:

The module "my dll" was loaded but the entry-point DLLRegisterServer was not found.
Make sure that "my dll" is a valid DLL or OCX file and then try again

我目前正在運行Windows 7 64位。 該腳本在Windows XP計算機上運行,​​但我不了解Windows Vista計算機(沒有可測試的)。 我使用OLE-COM對象查看器來查看它是否已注冊,但文件未顯示。

這是Windows 7或64位計算機的問題,還是兩者的組合。

嘗試使用%windir%\\ syswow64 \\ regsvr32注冊組件並使用%windir%\\ syswow64 \\ cscript.exe運行vbs文件

你的COM組件大概是32位,所以你需要在64位窗口上使用32位工具才能使它工作。

謝謝,馬克

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM