从word中使用dll [英] using dll from word

查看:72
本文介绍了从word中使用dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个我想在word中使用的dll。


设置将dll复制到程序文件夹并将dll注册到

GAC。这一切似乎工作正常(文件被复制并在

GAC中注册)。


在单词中我在我的vba项目中注册dll(勾选它寄存器

我的dll对话框 - 现在指的是mydll.tlb)并尝试运行

这样的dll:


sub main()

set t = createobject(" mydll.mydll")


运行代码会给我错误:


运行时错误''429'':

ActiveX组件无法创建对象


我得到了如果我使用同样的错误:

set t = new mydll.mydll


(当我执行上述操作时new mydll.mydll我得到了mydll请参考

intellisense,所以它必须以某种方式注册...)


这个dll在我的开发电脑上运行得很好。只有新的

机器我才会收到错误。


我能做错什么?


Morten

解决方案

新机器是否安装了.Net框架?

Han Sen < ha*@sen.se>在消息中写道

news:cu ******************************** @ 4ax.com ...

我正在创建一个我想从word中使用的dll。

设置将dll复制到程序文件夹并在
GAC。这一切似乎工作正常(文件被复制并在GAC中注册)。

在单词中我在我的vba项目中注册了dll(在注册表中打勾
对话框我的dll - 现在指的是mydll.tlb)并尝试运行这样的dll:

sub main()
set t = createobject(" mydll。 mydll运行代码会给我错误:

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

如果我使用的话我会得到同样的错误:
设置t = new mydll.mydll

(当我做上面的新mydll.mydll时我得到了智能感知中的mydll参考,所以它必须以某种方式注册...)

从我的开发电脑运行的dll运行良好。只有在新机器上我才会收到错误。

我可能做错了什么?

Morten



是的,安装了.net框架(相同版本)。


当我尝试使用regsvr32 mydll.dll注册dll时我得到了

消息(免费翻译):


mydll.dll已加载,但未找到入口点DllRegisterServer。

文件可以没有注册。


开发和测试/生产机器都运行xp pro sp2 ++(只有

语言差异)。


Morten


2005年1月5日星期三10:31:30 GMT,JohnFol

< Ou ****** ******@WibbleObbble.Com>写道:

新机器是否安装了.Net框架?

Han Sen < ha*@sen.se>在消息中写道
新闻:cu ******************************** @ 4ax.com ..。< blockquote class =post_quotes>我正在创建一个我想从word中使用的dll。

设置将dll复制到程序文件夹并在g / GAC中注册dll。这一切似乎工作正常(文件被复制并在GAC中注册)。

在单词中我在我的vba项目中注册了dll(在注册表中打勾
对话框我的dll - 现在指的是mydll.tlb)并尝试运行这样的dll:

sub main()
set t = createobject(" mydll。 mydll运行代码会给我错误:

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

如果我使用的话我会得到同样的错误:
设置t = new mydll.mydll

(当我做上面的新mydll.mydll时我得到了智能感知中的mydll参考,所以它必须以某种方式注册...)

从我的开发电脑运行的dll运行良好。只有在新机器上我才会收到错误。

我可能做错了什么?

Morten




听起来用户有一个早于MS />
库的版本的MS Word,或者没有安装MS Word 。如果不是这种情况

让他们重新安装MS Word。


" Han Sen" < ha*@sen.se>在消息新闻中写道:ha *@sen.se:

是的,安装了.net框架(相同版本)。

当我尝试使用regsvr32注册dll时mydll.dll我收到了
消息(自由翻译):

mydll.dll已加载,但未找到入口点DllRegisterServer。
文件无法注册。语言不同)。

Morten

2005年1月5日星期三10:31:30 GMT,JohnFol
< Ou ************ @ WibbleObbble.Com>写道:

新机器是否安装了.Net框架?

Han Sen < ha*@sen.se>在消息中写道
新闻:cu ******************************** @ 4ax.com ..。< blockquote class =post_quotes>我正在创建一个我想从word中使用的dll。

设置将dll复制到程序文件夹并在g / GAC中注册dll。这一切似乎工作正常(文件被复制并在GAC中注册)。

在单词中我在我的vba项目中注册了dll(在注册表中打勾
对话框我的dll - 现在指的是mydll.tlb)并尝试运行这样的dll:

sub main()
set t = createobject(" mydll。 mydll运行代码会给我错误:

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

如果我使用的话我会得到同样的错误:
设置t = new mydll.mydll

(当我做上面的新mydll.mydll时我得到了智能感知中的mydll参考,所以它必须以某种方式注册...)

从我的开发电脑运行的dll运行良好。只有在新机器上我才会收到错误。

我可能做错了什么?

Morten




I''m creating a dll that I want to use from word.

The setup copies dll to program folder and registers the dll in the
GAC. This all seems to work fine (file gets copied and registered in
GAC).

In word I register the dll in my vba project (tick it in the register
dialog for my dll - which now refers to the mydll.tlb) and try to run
the dll like this:

sub main()
set t = createobject("mydll.mydll")

Running the code gives me the error:

Run-time error ''429'':
ActiveX component can''t create object

I get the same error if I use:
set t = new mydll.mydll

(when I do the above "new mydll.mydll" I get the mydll reference in
the intellisense, so it must be registered somehow...)

The dll runs just fine from my development pc. It''s only on new
machines I get the error.

What could I be doing wrong?

Morten

解决方案

do the new machines have the .Net framework installed?
"Han Sen" <ha*@sen.se> wrote in message
news:cu********************************@4ax.com...

I''m creating a dll that I want to use from word.

The setup copies dll to program folder and registers the dll in the
GAC. This all seems to work fine (file gets copied and registered in
GAC).

In word I register the dll in my vba project (tick it in the register
dialog for my dll - which now refers to the mydll.tlb) and try to run
the dll like this:

sub main()
set t = createobject("mydll.mydll")

Running the code gives me the error:

Run-time error ''429'':
ActiveX component can''t create object

I get the same error if I use:
set t = new mydll.mydll

(when I do the above "new mydll.mydll" I get the mydll reference in
the intellisense, so it must be registered somehow...)

The dll runs just fine from my development pc. It''s only on new
machines I get the error.

What could I be doing wrong?

Morten



yes, the .net framework is installed (same version).

When I try to register the dll using regsvr32 mydll.dll I get the
message (freely translated):

mydll.dll was loaded, but entry point DllRegisterServer was not found.
File can not be registered.

Both develop and test/production machines runs xp pro sp2++ (only
language differes).

Morten

On Wed, 05 Jan 2005 10:31:30 GMT, "JohnFol"
<Ou************@WibbleObbble.Com> wrote:

do the new machines have the .Net framework installed?
"Han Sen" <ha*@sen.se> wrote in message
news:cu********************************@4ax.com.. .

I''m creating a dll that I want to use from word.

The setup copies dll to program folder and registers the dll in the
GAC. This all seems to work fine (file gets copied and registered in
GAC).

In word I register the dll in my vba project (tick it in the register
dialog for my dll - which now refers to the mydll.tlb) and try to run
the dll like this:

sub main()
set t = createobject("mydll.mydll")

Running the code gives me the error:

Run-time error ''429'':
ActiveX component can''t create object

I get the same error if I use:
set t = new mydll.mydll

(when I do the above "new mydll.mydll" I get the mydll reference in
the intellisense, so it must be registered somehow...)

The dll runs just fine from my development pc. It''s only on new
machines I get the error.

What could I be doing wrong?

Morten




It sounds like the user has an earlier version of MS Word than what your
library is or does not have MS Word installed. If neither is the case
have them reinstall MS Word.

"Han Sen" <ha*@sen.se> wrote in message news:ha*@sen.se:

yes, the .net framework is installed (same version).

When I try to register the dll using regsvr32 mydll.dll I get the
message (freely translated):

mydll.dll was loaded, but entry point DllRegisterServer was not found.
File can not be registered.

Both develop and test/production machines runs xp pro sp2++ (only
language differes).

Morten

On Wed, 05 Jan 2005 10:31:30 GMT, "JohnFol"
<Ou************@WibbleObbble.Com> wrote:

do the new machines have the .Net framework installed?
"Han Sen" <ha*@sen.se> wrote in message
news:cu********************************@4ax.com.. .

I''m creating a dll that I want to use from word.

The setup copies dll to program folder and registers the dll in the
GAC. This all seems to work fine (file gets copied and registered in
GAC).

In word I register the dll in my vba project (tick it in the register
dialog for my dll - which now refers to the mydll.tlb) and try to run
the dll like this:

sub main()
set t = createobject("mydll.mydll")

Running the code gives me the error:

Run-time error ''429'':
ActiveX component can''t create object

I get the same error if I use:
set t = new mydll.mydll

(when I do the above "new mydll.mydll" I get the mydll reference in
the intellisense, so it must be registered somehow...)

The dll runs just fine from my development pc. It''s only on new
machines I get the error.

What could I be doing wrong?

Morten




这篇关于从word中使用dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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