The scenario:
-------------
I've created a simple COM object according to a tutorial I found: http://www.csharphelp.com/archives/archive281.html
It automatically creates a Type Library (TLB) so that I can hook into the
object using the virtual table provided in the tlb file.
On the development machine, it seems to register the COM into the registry
properly, so I can create an instance of the object (via IDispatch) from
vbscript say (using CreateObject(.. .) ).
I turned on the option in the config for registering for COM interop.
The problem:
-------------
There's a clean box that I transfer this same script to, and my DLL. But I
can't get it to register on my machine. I've called RegAsm as recommended
for .Net libraries, and that should apparently register is for the COM stuff
as well, but it doesn't work, failing with something like "can't create
component".
Questions:
----------
What is VS.Net doing to register the program on my machine that regasm
isn't?
How to i register this DLL (if this isn't included in the first question)
for use with the IDispatch interface? 6 1993
Daniel,
The RegAsm.exe tool should do the job. VS .NET possibly also runs TlbExp to
produce the .tlb file after running RegAsm, but I have never had problems
with registering my assemblies with RegAsm.
You could probably post the detailed error message?
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Daniel Bass" <I'm really @ sick of spam> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. .. The scenario: -------------
I've created a simple COM object according to a tutorial I found:
http://www.csharphelp.com/archives/archive281.html
It automatically creates a Type Library (TLB) so that I can hook into the object using the virtual table provided in the tlb file.
On the development machine, it seems to register the COM into the registry properly, so I can create an instance of the object (via IDispatch) from vbscript say (using CreateObject(.. .) ).
I turned on the option in the config for registering for COM interop.
The problem: -------------
There's a clean box that I transfer this same script to, and my DLL. But I can't get it to register on my machine. I've called RegAsm as recommended for .Net libraries, and that should apparently register is for the COM
stuff as well, but it doesn't work, failing with something like "can't create component".
Questions: ----------
What is VS.Net doing to register the program on my machine that regasm isn't? How to i register this DLL (if this isn't included in the first question) for use with the IDispatch interface?
Thanks for your reply.
the RegAsm says that it sucessfully registers the Types, and the Type
Library was correctly exported and registered.
the script error I get (when it's embedded in an HTML page) is
"ActiveX component can't create object:
'BIF_COM_API.BI F_Instantiation .Class' "
All the script does at the moment is:
<!--
option explicit
sub VB_Click
Dim bifapi
set bifapi = CreateObject ( "BIF_COM_API.BI F_Instantiation " )
' bifapi.SetDesti nationQueueName "Local_In"
' bifapi.Send
end sub
-->
It just gets me why it works a treat on the machine on which i built this
COM object, but not on any other machine.
Thanks again.
Dan.
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.c om> wrote
in message news:OJ******** ******@TK2MSFTN GP10.phx.gbl...
Daniel,
The RegAsm.exe tool should do the job. VS .NET possibly also runs TlbExp to
produce the .tlb file after running RegAsm, but I have never had problems
with registering my assemblies with RegAsm.
You could probably post the detailed error message?
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Daniel Bass" <I'm really @ sick of spam> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. .. The scenario: -------------
I've created a simple COM object according to a tutorial I found:
http://www.csharphelp.com/archives/archive281.html
It automatically creates a Type Library (TLB) so that I can hook into the object using the virtual table provided in the tlb file.
On the development machine, it seems to register the COM into the registry properly, so I can create an instance of the object (via IDispatch) from vbscript say (using CreateObject(.. .) ).
I turned on the option in the config for registering for COM interop.
The problem: -------------
There's a clean box that I transfer this same script to, and my DLL. But I can't get it to register on my machine. I've called RegAsm as recommended for .Net libraries, and that should apparently register is for the COM
stuff as well, but it doesn't work, failing with something like "can't create component".
Questions: ----------
What is VS.Net doing to register the program on my machine that regasm isn't? How to i register this DLL (if this isn't included in the first question) for use with the IDispatch interface?
Daniel,
I believe the problem is not with the registration. I'd rather say the COM
exposed object itself lacks some attributes. For instance, instantiating a
COM object within a Web page requires the COM object to be marked as "Safe
for scripting", if this action is at all enabled for the IE security zone
the page is opened in.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Daniel Bass" <I'm really @ sick of spam> wrote in message
news:eT******** ******@TK2MSFTN GP11.phx.gbl... Thanks for your reply.
the RegAsm says that it sucessfully registers the Types, and the Type Library was correctly exported and registered.
the script error I get (when it's embedded in an HTML page) is "ActiveX component can't create object: 'BIF_COM_API.BI F_Instantiation .Class' "
All the script does at the moment is:
<!-- option explicit
sub VB_Click
Dim bifapi set bifapi = CreateObject ( "BIF_COM_API.BI F_Instantiation " ) ' bifapi.SetDesti nationQueueName "Local_In" ' bifapi.Send
end sub -->
It just gets me why it works a treat on the machine on which i built this COM object, but not on any other machine.
Thanks again. Dan.
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.c om> wrote in message news:OJ******** ******@TK2MSFTN GP10.phx.gbl... Daniel,
The RegAsm.exe tool should do the job. VS .NET possibly also runs TlbExp
to produce the .tlb file after running RegAsm, but I have never had problems with registering my assemblies with RegAsm.
You could probably post the detailed error message?
-- Dmitriy Lapshin [C# / .NET MVP] X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx Bring the power of unit testing to VS .NET IDE
"Daniel Bass" <I'm really @ sick of spam> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. .. The scenario: -------------
I've created a simple COM object according to a tutorial I found:
http://www.csharphelp.com/archives/archive281.html
It automatically creates a Type Library (TLB) so that I can hook into
the object using the virtual table provided in the tlb file.
On the development machine, it seems to register the COM into the
registry properly, so I can create an instance of the object (via IDispatch) from vbscript say (using CreateObject(.. .) ).
I turned on the option in the config for registering for COM interop.
The problem: -------------
There's a clean box that I transfer this same script to, and my DLL. But
I can't get it to register on my machine. I've called RegAsm as
recommended for .Net libraries, and that should apparently register is for the COM stuff as well, but it doesn't work, failing with something like "can't create component".
Questions: ----------
What is VS.Net doing to register the program on my machine that regasm isn't? How to i register this DLL (if this isn't included in the first
question) for use with the IDispatch interface?
That's fair comment, but it still doesn't explain the reason for it working
fine one the machine on which it is compiled, and not on any others. This
forces me to disagree with you on the fact that it must be something in the
registry?
I've just created a little COM dll from VB's COM template, but this has the
same affect... there must be some switch somewhere to allow this?
Dan.
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.c om> wrote
in message news:u0******** ******@TK2MSFTN GP09.phx.gbl...
Daniel,
I believe the problem is not with the registration. I'd rather say the COM
exposed object itself lacks some attributes. For instance, instantiating a
COM object within a Web page requires the COM object to be marked as "Safe
for scripting", if this action is at all enabled for the IE security zone
the page is opened in.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Daniel Bass" <I'm really @ sick of spam> wrote in message
news:eT******** ******@TK2MSFTN GP11.phx.gbl... Thanks for your reply.
the RegAsm says that it sucessfully registers the Types, and the Type Library was correctly exported and registered.
the script error I get (when it's embedded in an HTML page) is "ActiveX component can't create object: 'BIF_COM_API.BI F_Instantiation .Class' "
All the script does at the moment is:
<!-- option explicit
sub VB_Click
Dim bifapi set bifapi = CreateObject ( "BIF_COM_API.BI F_Instantiation " ) ' bifapi.SetDesti nationQueueName "Local_In" ' bifapi.Send
end sub -->
It just gets me why it works a treat on the machine on which i built this COM object, but not on any other machine.
Thanks again. Dan.
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.c om> wrote in message news:OJ******** ******@TK2MSFTN GP10.phx.gbl... Daniel,
The RegAsm.exe tool should do the job. VS .NET possibly also runs TlbExp
to produce the .tlb file after running RegAsm, but I have never had problems with registering my assemblies with RegAsm.
You could probably post the detailed error message?
-- Dmitriy Lapshin [C# / .NET MVP] X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx Bring the power of unit testing to VS .NET IDE
"Daniel Bass" <I'm really @ sick of spam> wrote in message news:%2******** ********@tk2msf tngp13.phx.gbl. .. The scenario: -------------
I've created a simple COM object according to a tutorial I found:
http://www.csharphelp.com/archives/archive281.html
It automatically creates a Type Library (TLB) so that I can hook into
the object using the virtual table provided in the tlb file.
On the development machine, it seems to register the COM into the
registry properly, so I can create an instance of the object (via IDispatch) from vbscript say (using CreateObject(.. .) ).
I turned on the option in the config for registering for COM interop.
The problem: -------------
There's a clean box that I transfer this same script to, and my DLL. But
I can't get it to register on my machine. I've called RegAsm as
recommended for .Net libraries, and that should apparently register is for the COM stuff as well, but it doesn't work, failing with something like "can't create component".
Questions: ----------
What is VS.Net doing to register the program on my machine that regasm isn't? How to i register this DLL (if this isn't included in the first
question) for use with the IDispatch interface?
I think I used to have a similar problem.
try to use the /codebase option with regasm command
José
"Daniel Bass" <I'm really @ sick of spam> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. .. The scenario: -------------
I've created a simple COM object according to a tutorial I found:
http://www.csharphelp.com/archives/archive281.html
It automatically creates a Type Library (TLB) so that I can hook into the object using the virtual table provided in the tlb file.
On the development machine, it seems to register the COM into the registry properly, so I can create an instance of the object (via IDispatch) from vbscript say (using CreateObject(.. .) ).
I turned on the option in the config for registering for COM interop.
The problem: -------------
There's a clean box that I transfer this same script to, and my DLL. But I can't get it to register on my machine. I've called RegAsm as recommended for .Net libraries, and that should apparently register is for the COM
stuff as well, but it doesn't work, failing with something like "can't create component".
Questions: ----------
What is VS.Net doing to register the program on my machine that regasm isn't? How to i register this DLL (if this isn't included in the first question) for use with the IDispatch interface?
IT WORKS!!!
Thanks so much. =o)
Dan.
"José Joye" <jo*******@KILL THESPAMSbluewin .ch> wrote in message
news:eu******** ******@tk2msftn gp13.phx.gbl...
I think I used to have a similar problem.
try to use the /codebase option with regasm command
José
"Daniel Bass" <I'm really @ sick of spam> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. .. The scenario: -------------
I've created a simple COM object according to a tutorial I found:
http://www.csharphelp.com/archives/archive281.html
It automatically creates a Type Library (TLB) so that I can hook into the object using the virtual table provided in the tlb file.
On the development machine, it seems to register the COM into the registry properly, so I can create an instance of the object (via IDispatch) from vbscript say (using CreateObject(.. .) ).
I turned on the option in the config for registering for COM interop.
The problem: -------------
There's a clean box that I transfer this same script to, and my DLL. But I can't get it to register on my machine. I've called RegAsm as recommended for .Net libraries, and that should apparently register is for the COM
stuff as well, but it doesn't work, failing with something like "can't create component".
Questions: ----------
What is VS.Net doing to register the program on my machine that regasm isn't? How to i register this DLL (if this isn't included in the first question) for use with the IDispatch interface? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: fig000 |
last post by:
Hi,
I've just created a vb.net project and want to use the crystal
reports object that I used in vb6 (the one with properties such as
"reportfilename"). I unstalled crystal 8.5 and found crystl32.ocx and
cyrstl32.dep in the \windows\system32 directory so I know they are
there. I created a reference (in the "com" section) in the project to
cyrstl32.ocx and couldn't find it on the components or windows forms
part of the toolbox; all I...
|
by: Mr Sir |
last post by:
Hello, My company is experimenting with adding VB.NET classes to currently
existing VB 6 code. The idea is to gradually migrate to a purely object
oriented solution. When I run the code in development environment it works
fine - but when I sent the dll (NET) I created and the Interop.dlls along
with the exe to be reviewed, the reviewer got an error "Could not create
ActiveX control". I asked if he had registered them and it turned out...
|
by: Ryan Mitchley |
last post by:
Hi all
I have code for an object factory, heavily based on an article by Jim Hyslop
(although I've made minor modifications). The factory was working fine using
g++, but since switching to the Intel compiler it has stopped working. I
think the singleton pattern static instance thing may be at the root of the
problem, but I'm not sure. I had to add calls to instance() in regCreateFn,
which gets the behaviour more in line with what I was...
|
by: Steve Lutz |
last post by:
Hi All,
I have a Windows Service that runs well. The service hosts a remote object.
The purpose of the object is so that I can "peak" into the service to see
what it's doing. I wrote a small Windows Application that connects to the
remote object and prints out status information.
Everything works fine when I first start the service. However, after some
period, when I attempt to connect to the remote object, I get "Requested
Service not...
|
by: Herb |
last post by:
I have a database table of x elements. I need to loop through the database
table and add a checkbox for each entry to an asp:Table object. This I can
do.
Dim tRow As New TableRow
Dim tCell As New TableCell
Dim cbDT As New CheckBox
tblDTCodes.Rows.Add(tRow)
cbDT.Text = reader(0)
cbDT.Checked = False
| |
by: CharlesA |
last post by:
This is not really a problem I'm having it's more of a general question
if you had an html page with embedded javascript script and you sent it to
the
browser if the script wasn't buggy, it would instantly work because
javascript is interpreted
I have created buttons on the fly (say in the editmode of a 1.x datagrid)
and I added the function as an attribute of that button, using
Attributes.add() etc...
|
by: =?Utf-8?B?RWR3YXJkUw==?= |
last post by:
I would greatly appreciate some help on passing managed object into unmanaged
code.
I need to pass a reference (address of) of a managed class into unmanaged
code (written by a thrid party). The 3rd party unmanaged DLL will pass this
reference into standard Win32 unmanaged static callback function in my code.
Inside this unmanaged callback function I need to cast this unmnaged pointer
that I have received from 3rd party back into the...
|
by: applejump |
last post by:
Hi all,
I'm a Python beginner and trying to run the codes from Chapter 5 of Python pramming on win32. But when I tested the COM object with VBA, I got an error msg saying runtime error 438. Is there anyone can help me out? Thanks in advance!
Here are the codes:
class PythonUtilities:
_public_methods_ =
_reg_progid_ = "PythonDemos.Utilities"
_reg_clsid_ = "{D81903FB-62F2-4FB1-993E-63CAF4C963A0}"
|
by: Oltmans |
last post by:
Hi all,
I'm stuck in a situation where I need help. Any help will be highly
appreciated. I've created an object, after creating the object, I'm
assigning one of its functions to an event handler i.e. to onBlur
event of Text-area. Problem is that when I try to access object
properties from the handler function, I cannot access them in some
cases and get a value of undefined. Here is the sample code that I'm
trying
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |