I am unclear about what all the requirements are to call a simple vb.net
application, installed in the GAC, from COM (such as writing vba in Word to
call the dotnet dll).
I believe I have installed the dll in the GAC. It is in there and has a
public token. I did not create a key-value pair. I believe it is strong
named, as it shows up in the GAC.
How do I browse the objects of it? I would like to call it late bound, but
the errors I get show that the properties or methods are not available.
I have put <ComClass()as an attribute at the beginning of the public
class.
In VS 2008, I have chosen Register to COM interop.
I have all the options in Wise Installbuilder showing that it installs the
assembly in the GAC.
I have made sure that the class has this code:
Public Sub New
MyBase.New
End Sub
Just how many guesses do we need to do to just call a dotnet object? Is
there an article that lists what is required, instead of just parts and
pieces.
Please help. 8 1968
Also, I found this article: http://msdn.microsoft.com/en-us/libr...sz(vs.71).aspx
In which it states:
In addition, it is not necessary to install assemblies into the global
assembly cache to make them accessible to COM interop or unmanaged code.
I sure wish I could figure out how to deploy a dotnet application, with has
a dll with public functions, and have COM objects use that, and not have to
use the GAC. But I need the code to be late bound in the COM programs
because I will not be able to set references to the DLLs or even know where
they are installed. Please point me in the right direction!
"Derek Hart" <de********@yahoo.comwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
>I am unclear about what all the requirements are to call a simple vb.net application, installed in the GAC, from COM (such as writing vba in Word to call the dotnet dll).
I believe I have installed the dll in the GAC. It is in there and has a
public token. I did not create a key-value pair. I believe it is strong
named, as it shows up in the GAC.
How do I browse the objects of it? I would like to call it late bound, but
the errors I get show that the properties or methods are not available.
I have put <ComClass()as an attribute at the beginning of the public
class.
In VS 2008, I have chosen Register to COM interop.
I have all the options in Wise Installbuilder showing that it installs the
assembly in the GAC.
I have made sure that the class has this code:
Public Sub New
MyBase.New
End Sub
Just how many guesses do we need to do to just call a dotnet object? Is
there an article that lists what is required, instead of just parts and
pieces.
Please help.
Hello Derek ,
All the steps that you describe ( make the assembly com visisble , create
a public sub new )
sounds how i create my .Net dll`s COM callable however i missed only one
thing you did not mention
Did you register the COM capable assembly with regasm.exe ?
My dll`s are callable with CreateObject from VBA ,VBS and even PHP , with
PHP however i discovered that the assembly needed to be deployed in the GAC
or the APACHE assembly directory
here is some copy paste code i created a long time ago for this group http://groups.google.com/group/micro...996d74d250974e
As you see i create my own interface id`s , as this gives me the benefit of
compatibility through my rules
HTH
Michel Posseth http://www.vbdotnetcoder.com
"Derek Hart" <de********@yahoo.comschreef in bericht
news:uy**************@TK2MSFTNGP06.phx.gbl...
Also, I found this article:
http://msdn.microsoft.com/en-us/libr...sz(vs.71).aspx
In which it states:
In addition, it is not necessary to install assemblies into the global
assembly cache to make them accessible to COM interop or unmanaged code.
I sure wish I could figure out how to deploy a dotnet application, with
has a dll with public functions, and have COM objects use that, and not
have to use the GAC. But I need the code to be late bound in the COM
programs because I will not be able to set references to the DLLs or even
know where they are installed. Please point me in the right direction!
"Derek Hart" <de********@yahoo.comwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
>>I am unclear about what all the requirements are to call a simple vb.net application, installed in the GAC, from COM (such as writing vba in Word to call the dotnet dll).
I believe I have installed the dll in the GAC. It is in there and has a public token. I did not create a key-value pair. I believe it is strong named, as it shows up in the GAC.
How do I browse the objects of it? I would like to call it late bound, but the errors I get show that the properties or methods are not available.
I have put <ComClass()as an attribute at the beginning of the public class.
In VS 2008, I have chosen Register to COM interop.
I have all the options in Wise Installbuilder showing that it installs the assembly in the GAC.
I have made sure that the class has this code: Public Sub New MyBase.New End Sub
Just how many guesses do we need to do to just call a dotnet object? Is there an article that lists what is required, instead of just parts and pieces.
Please help.
"I would like to call it late bound, but the errors I get show that the
properties or methods are not available"
That is, when doing what ? Calling CreateObject or CreateObject works and it
fails when you call a method ? Also what is the error you get ?
I've done this once by calling manuall regasm (that shows a warning if the
DLL is not in the GAC). It still worked for me
--
Patrice
"Derek Hart" <de********@yahoo.coma écrit dans le message de groupe de
discussion : uy**************@TK2MSFTNGP06.phx.gbl...
Also, I found this article:
http://msdn.microsoft.com/en-us/libr...sz(vs.71).aspx
In which it states:
In addition, it is not necessary to install assemblies into the global
assembly cache to make them accessible to COM interop or unmanaged code.
I sure wish I could figure out how to deploy a dotnet application, with
has a dll with public functions, and have COM objects use that, and not
have to use the GAC. But I need the code to be late bound in the COM
programs because I will not be able to set references to the DLLs or even
know where they are installed. Please point me in the right direction!
"Derek Hart" <de********@yahoo.comwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
>>I am unclear about what all the requirements are to call a simple vb.net application, installed in the GAC, from COM (such as writing vba in Word to call the dotnet dll).
I believe I have installed the dll in the GAC. It is in there and has a public token. I did not create a key-value pair. I believe it is strong named, as it shows up in the GAC.
How do I browse the objects of it? I would like to call it late bound, but the errors I get show that the properties or methods are not available.
I have put <ComClass()as an attribute at the beginning of the public class.
In VS 2008, I have chosen Register to COM interop.
I have all the options in Wise Installbuilder showing that it installs the assembly in the GAC.
I have made sure that the class has this code: Public Sub New MyBase.New End Sub
Just how many guesses do we need to do to just call a dotnet object? Is there an article that lists what is required, instead of just parts and pieces.
Please help.
If I could get more specific, I would appreciate your thoughts. Please let
me know if my steps are wrong, or I am missing some, or if I don't need
some.
1) This is all I have done to strong name the vb.net dll. In the project
properties, under Signing, I have chosen Sign The Assembly and chosen New in
the combo box to make a new file. I simply named the file and gave it a
password. I did nothing in reference to the key value pair, as I do not need
this level of security. Is it required to make a key value pair, or is
simply naming this file enough? In my references, I see the name of my key
file. Should I set the build action to Embedded Resource, or is none the
right choice?
2) I don't want to install my DLL in the GAC. So please let me know if
that should be okay. Remember, I simply want to call the dll late bound from
vba, or other com programs.
3) I have made a public sub new in the main class I am calling with no
constructors.
4) My application compiles fine, as I made every dll "strong named",
using the rules stated above. No key value pairs were done. Just what I did
above.
5) I have the following at the top of my class:
<ComClass()Public Class MyClass
6) I did not do any other code inside the class, using the GUIDs as you
showed in your explanation. I did not do ComVisible anywhere, just the
ComClass code.
7) I chose Register for Com Interop in the project properties, which is
probably why it works on my development machine.
8) I chose a similar option in Wise InstallBuilder when deploying, so it
should be doing regasm in the install.
9) My CreateObject on the deployed machine still gets ActiveX cannot
create object. It seems like I am going to have to go at this for a while.
Your feedback would be appreciated.
Thank You!
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:u4**************@TK2MSFTNGP05.phx.gbl...
Hello Derek ,
All the steps that you describe ( make the assembly com visisble ,
create a public sub new )
sounds how i create my .Net dll`s COM callable however i missed only one
thing you did not mention
Did you register the COM capable assembly with regasm.exe ?
My dll`s are callable with CreateObject from VBA ,VBS and even PHP , with
PHP however i discovered that the assembly needed to be deployed in the
GAC or the APACHE assembly directory
here is some copy paste code i created a long time ago for this group
http://groups.google.com/group/micro...996d74d250974e
As you see i create my own interface id`s , as this gives me the benefit
of compatibility through my rules
HTH
Michel Posseth http://www.vbdotnetcoder.com
"Derek Hart" <de********@yahoo.comschreef in bericht
news:uy**************@TK2MSFTNGP06.phx.gbl...
>Also, I found this article:
http://msdn.microsoft.com/en-us/libr...sz(vs.71).aspx
In which it states: In addition, it is not necessary to install assemblies into the global assembly cache to make them accessible to COM interop or unmanaged code.
I sure wish I could figure out how to deploy a dotnet application, with has a dll with public functions, and have COM objects use that, and not have to use the GAC. But I need the code to be late bound in the COM programs because I will not be able to set references to the DLLs or even know where they are installed. Please point me in the right direction!
"Derek Hart" <de********@yahoo.comwrote in message news:Oi**************@TK2MSFTNGP03.phx.gbl...
>>>I am unclear about what all the requirements are to call a simple vb.net application, installed in the GAC, from COM (such as writing vba in Word to call the dotnet dll).
I believe I have installed the dll in the GAC. It is in there and has a public token. I did not create a key-value pair. I believe it is strong named, as it shows up in the GAC.
How do I browse the objects of it? I would like to call it late bound, but the errors I get show that the properties or methods are not available.
I have put <ComClass()as an attribute at the beginning of the public class.
In VS 2008, I have chosen Register to COM interop.
I have all the options in Wise Installbuilder showing that it installs the assembly in the GAC.
I have made sure that the class has this code: Public Sub New MyBase.New End Sub
Just how many guesses do we need to do to just call a dotnet object? Is there an article that lists what is required, instead of just parts and pieces.
Please help.
See if this helps: http://www.simple-talk.com/dotnet/vi...-com-assembly/
--
Phil Wilson
Definitive Guide to Windows Installer http://www.apress.com/book/view/1590592972
"Derek Hart" <de********@yahoo.comwrote in message
news:uy**************@TK2MSFTNGP06.phx.gbl...
Also, I found this article:
http://msdn.microsoft.com/en-us/libr...sz(vs.71).aspx
In which it states:
In addition, it is not necessary to install assemblies into the global
assembly cache to make them accessible to COM interop or unmanaged code.
I sure wish I could figure out how to deploy a dotnet application, with
has a dll with public functions, and have COM objects use that, and not
have to use the GAC. But I need the code to be late bound in the COM
programs because I will not be able to set references to the DLLs or even
know where they are installed. Please point me in the right direction!
"Derek Hart" <de********@yahoo.comwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
>>I am unclear about what all the requirements are to call a simple vb.net application, installed in the GAC, from COM (such as writing vba in Word to call the dotnet dll).
I believe I have installed the dll in the GAC. It is in there and has a public token. I did not create a key-value pair. I believe it is strong named, as it shows up in the GAC.
How do I browse the objects of it? I would like to call it late bound, but the errors I get show that the properties or methods are not available.
I have put <ComClass()as an attribute at the beginning of the public class.
In VS 2008, I have chosen Register to COM interop.
I have all the options in Wise Installbuilder showing that it installs the assembly in the GAC.
I have made sure that the class has this code: Public Sub New MyBase.New End Sub
Just how many guesses do we need to do to just call a dotnet object? Is there an article that lists what is required, instead of just parts and pieces.
Please help.
Hello Derek ,
About 1 and 2 , This is only necesary for the GAC i do not sign or strong
name my COM dll`s at all as i install them in the callers directory path ,
note that for a hosted runtime this must be the directory of the excution
host ( for PHP the apache assembly directory and for VBS the system32 dir )
The call places are , Callers instrallation directory , GAC and System32
so your dll must be in one of these locations
As the assembly behaves as expected on your development system ,(the VS IDE
is taking care of registering the COM assembly on the dev system )
this is where your focus should be .
I guess that Wise is not registering your .Net COM component the right way
, to confirm that this is the case do the following , open a command
window on a target system , go through the command prompt to the framework
directory ( normally this is "C:\Windows\Microsoft.Net\FrameworkNumber\"
If you have the blinking cursor on that location , type regasm
C:\FullpathTo\YourComDllName.dll and press enter you should get a
confirmation that it succeeded .
Now your assembly should work as expected , if it does ( i know that for
95% sure ) here is the solutions for your Wise project
on any system ( this may be your dev machine ) type now at the framework
command prompt :
regasm C:\FullpathTo\YourComDllName.dll /regfile:myRegistrationFile.reg
The registration file that is now created , should be included in your Wise
setup project http://www.wisesolutions.com/upload/wfwi.pdf
see page 144 ( adding registry keys )
If you have done this , it should work for every installation you make with
your deploy package
I hope to hear from you if you succeeded (or not :-( )
Regards,
Michel Posseth
"Derek Hart" <de********@yahoo.comschreef in bericht
news:u$**************@TK2MSFTNGP03.phx.gbl...
If I could get more specific, I would appreciate your thoughts. Please let
me know if my steps are wrong, or I am missing some, or if I don't need
some.
1) This is all I have done to strong name the vb.net dll. In the
project properties, under Signing, I have chosen Sign The Assembly and
chosen New in the combo box to make a new file. I simply named the file
and gave it a password. I did nothing in reference to the key value pair,
as I do not need this level of security. Is it required to make a key
value pair, or is simply naming this file enough? In my references, I see
the name of my key file. Should I set the build action to Embedded
Resource, or is none the right choice?
2) I don't want to install my DLL in the GAC. So please let me know if
that should be okay. Remember, I simply want to call the dll late bound
from vba, or other com programs.
3) I have made a public sub new in the main class I am calling with no
constructors.
4) My application compiles fine, as I made every dll "strong named",
using the rules stated above. No key value pairs were done. Just what I
did above.
5) I have the following at the top of my class:
<ComClass()Public Class MyClass
6) I did not do any other code inside the class, using the GUIDs as
you showed in your explanation. I did not do ComVisible anywhere, just the
ComClass code.
7) I chose Register for Com Interop in the project properties, which
is probably why it works on my development machine.
8) I chose a similar option in Wise InstallBuilder when deploying, so
it should be doing regasm in the install.
9) My CreateObject on the deployed machine still gets ActiveX cannot
create object. It seems like I am going to have to go at this for a while.
Your feedback would be appreciated.
Thank You!
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:u4**************@TK2MSFTNGP05.phx.gbl...
>Hello Derek ,
All the steps that you describe ( make the assembly com visisble , create a public sub new ) sounds how i create my .Net dll`s COM callable however i missed only one thing you did not mention
Did you register the COM capable assembly with regasm.exe ?
My dll`s are callable with CreateObject from VBA ,VBS and even PHP , with PHP however i discovered that the assembly needed to be deployed in the GAC or the APACHE assembly directory
here is some copy paste code i created a long time ago for this group
http://groups.google.com/group/micro...996d74d250974e
As you see i create my own interface id`s , as this gives me the benefit of compatibility through my rules
HTH
Michel Posseth http://www.vbdotnetcoder.com
"Derek Hart" <de********@yahoo.comschreef in bericht news:uy**************@TK2MSFTNGP06.phx.gbl...
>>Also, I found this article:
http://msdn.microsoft.com/en-us/libr...sz(vs.71).aspx
In which it states: In addition, it is not necessary to install assemblies into the global assembly cache to make them accessible to COM interop or unmanaged code.
I sure wish I could figure out how to deploy a dotnet application, with has a dll with public functions, and have COM objects use that, and not have to use the GAC. But I need the code to be late bound in the COM programs because I will not be able to set references to the DLLs or even know where they are installed. Please point me in the right direction!
"Derek Hart" <de********@yahoo.comwrote in message news:Oi**************@TK2MSFTNGP03.phx.gbl... I am unclear about what all the requirements are to call a simple vb.net application, installed in the GAC, from COM (such as writing vba in Word to call the dotnet dll).
I believe I have installed the dll in the GAC. It is in there and has a public token. I did not create a key-value pair. I believe it is strong named, as it shows up in the GAC.
How do I browse the objects of it? I would like to call it late bound, but the errors I get show that the properties or methods are not available.
I have put <ComClass()as an attribute at the beginning of the public class.
In VS 2008, I have chosen Register to COM interop.
I have all the options in Wise Installbuilder showing that it installs the assembly in the GAC.
I have made sure that the class has this code: Public Sub New MyBase.New End Sub
Just how many guesses do we need to do to just call a dotnet object? Is there an article that lists what is required, instead of just parts and pieces.
Please help.
Hi Michael,
We register out .NET DLL's by installing them to the target location and
then using the following command:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegA sm
<targetdir>\whatever.dll /codebase /s /tlb
This works for us. You did not mention the requirement to use /codebase when
registering the DLL. Isn't this required for DLL's which are not in the GAC?
This article says that it is required. http://www.code-magazine.com/article...0703112&page=3
Developers should use the /codebase switch whenever they install the
assembly into a location other than the GAC. Basically, /codebase tells
Regasm.exe to include the path to the assembly in the registry so that the
COM client using it can find it. A quick look in the registry will reveal
that, in the CLSID key of the registered .NET assembly classes, Regasm added
a string value named CodeBase to the InprocServer32\ProductVersion subkeys.
This string value is the fully qualified path to the assembly that was
registered with the /codebase switch.
Maybe this will help the OP with his issue?
Hope this helps,
Joseph Geretz
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:ev**************@TK2MSFTNGP04.phx.gbl...
Hello Derek ,
About 1 and 2 , This is only necesary for the GAC i do not sign or
strong
name my COM dll`s at all as i install them in the callers directory path
,
note that for a hosted runtime this must be the directory of the excution
host ( for PHP the apache assembly directory and for VBS the system32
dir )
The call places are , Callers instrallation directory , GAC and System32
so your dll must be in one of these locations
As the assembly behaves as expected on your development system ,(the VS
IDE
is taking care of registering the COM assembly on the dev system )
this is where your focus should be .
I guess that Wise is not registering your .Net COM component the right
way
, to confirm that this is the case do the following , open a command
window on a target system , go through the command prompt to the
framework
directory ( normally this is "C:\Windows\Microsoft.Net\FrameworkNumber\"
If you have the blinking cursor on that location , type regasm
C:\FullpathTo\YourComDllName.dll and press enter you should get a
confirmation that it succeeded .
Now your assembly should work as expected , if it does ( i know that
for
95% sure ) here is the solutions for your Wise project
on any system ( this may be your dev machine ) type now at the framework
command prompt :
regasm C:\FullpathTo\YourComDllName.dll /regfile:myRegistrationFile.reg
The registration file that is now created , should be included in your
Wise
setup project http://www.wisesolutions.com/upload/wfwi.pdf
see page 144 ( adding registry keys )
If you have done this , it should work for every installation you make
with
your deploy package
I hope to hear from you if you succeeded (or not :-( )
Regards,
Michel Posseth
"Derek Hart" <de********@yahoo.comschreef in bericht
news:u$**************@TK2MSFTNGP03.phx.gbl...
>If I could get more specific, I would appreciate your thoughts. Please let me know if my steps are wrong, or I am missing some, or if I don't need some. 1) This is all I have done to strong name the vb.net dll. In the project properties, under Signing, I have chosen Sign The Assembly and chosen New in the combo box to make a new file. I simply named the file and gave it a password. I did nothing in reference to the key value pair, as I do not need this level of security. Is it required to make a key value pair, or is simply naming this file enough? In my references, I see the name of my key file. Should I set the build action to Embedded Resource, or is none the right choice?
2) I don't want to install my DLL in the GAC. So please let me know if that should be okay. Remember, I simply want to call the dll late bound from vba, or other com programs.
3) I have made a public sub new in the main class I am calling with no constructors.
4) My application compiles fine, as I made every dll "strong named", using the rules stated above. No key value pairs were done. Just what I did above.
5) I have the following at the top of my class: <ComClass()Public Class MyClass
6) I did not do any other code inside the class, using the GUIDs as you showed in your explanation. I did not do ComVisible anywhere, just the ComClass code.
7) I chose Register for Com Interop in the project properties, which is probably why it works on my development machine.
8) I chose a similar option in Wise InstallBuilder when deploying, so it should be doing regasm in the install.
9) My CreateObject on the deployed machine still gets ActiveX cannot create object. It seems like I am going to have to go at this for a while. Your feedback would be appreciated. Thank You!
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message news:u4**************@TK2MSFTNGP05.phx.gbl...
>>Hello Derek ,
All the steps that you describe ( make the assembly com visisble , create a public sub new ) sounds how i create my .Net dll`s COM callable however i missed only one thing you did not mention
Did you register the COM capable assembly with regasm.exe ?
My dll`s are callable with CreateObject from VBA ,VBS and even PHP , with PHP however i discovered that the assembly needed to be deployed in the GAC or the APACHE assembly directory
here is some copy paste code i created a long time ago for this group
http://groups.google.com/group/micro...996d74d250974e
As you see i create my own interface id`s , as this gives me the benefit of compatibility through my rules
HTH
Michel Posseth http://www.vbdotnetcoder.com
"Derek Hart" <de********@yahoo.comschreef in bericht news:uy**************@TK2MSFTNGP06.phx.gbl... Also, I found this article:
http://msdn.microsoft.com/en-us/libr...sz(vs.71).aspx
In which it states: In addition, it is not necessary to install assemblies into the global assembly cache to make them accessible to COM interop or unmanaged code.
I sure wish I could figure out how to deploy a dotnet application, with has a dll with public functions, and have COM objects use that, and not have to use the GAC. But I need the code to be late bound in the COM programs because I will not be able to set references to the DLLs or even know where they are installed. Please point me in the right direction!
"Derek Hart" <de********@yahoo.comwrote in message news:Oi**************@TK2MSFTNGP03.phx.gbl... >I am unclear about what all the requirements are to call a simple >vb.net application, installed in the GAC, from COM (such as writing vba >in Word to call the dotnet dll). > I believe I have installed the dll in the GAC. It is in there and has a public token. I did not create a key-value pair. I believe it is strong named, as it shows up in the GAC. > How do I browse the objects of it? I would like to call it late bound, but the errors I get show that the properties or methods are not available. > I have put <ComClass()as an attribute at the beginning of the public class. > In VS 2008, I have chosen Register to COM interop. > I have all the options in Wise Installbuilder showing that it installs the assembly in the GAC. > I have made sure that the class has this code: Public Sub New MyBase.New End Sub > Just how many guesses do we need to do to just call a dotnet object? Is there an article that lists what is required, instead of just parts and pieces. > Please help. >
Hello Joseph,
That is a good one , i guess that this is exactly what the OP needs as this
saves him form installing a copy of the Dll to the system32 or GAC to get it
to work in
third party applications that he is not aware of at the moment of
installation .
As far as i know the article you mention should tell it this way
Developers should use the /codebase switch whenever they install the
assembly into a location other than the GAC.
my version :-)
Developers should use the /codebase switch whenever they install the
assembly into a location other than the callers assembly directory , the
systen32 directory or the GAC.
However AFAIK then it is also required to sign and strong name the assembly
, personally i just copy my dll to the callers directory
regards
Michel
"Joseph Geretz" <jg*****@nospam.comschreef in bericht
news:eP**************@TK2MSFTNGP02.phx.gbl...
Hi Michael,
We register out .NET DLL's by installing them to the target location and
then using the following command:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegA sm
<targetdir>\whatever.dll /codebase /s /tlb
This works for us. You did not mention the requirement to use /codebase
when registering the DLL. Isn't this required for DLL's which are not in
the GAC?
This article says that it is required.
http://www.code-magazine.com/article...0703112&page=3
Developers should use the /codebase switch whenever they install the
assembly into a location other than the GAC. Basically, /codebase tells
Regasm.exe to include the path to the assembly in the registry so that the
COM client using it can find it. A quick look in the registry will reveal
that, in the CLSID key of the registered .NET assembly classes, Regasm
added a string value named CodeBase to the InprocServer32\ProductVersion
subkeys. This string value is the fully qualified path to the assembly
that was registered with the /codebase switch.
Maybe this will help the OP with his issue?
Hope this helps,
Joseph Geretz
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message
news:ev**************@TK2MSFTNGP04.phx.gbl...
>Hello Derek ,
About 1 and 2 , This is only necesary for the GAC i do not sign or strong name my COM dll`s at all as i install them in the callers directory path , note that for a hosted runtime this must be the directory of the excution host ( for PHP the apache assembly directory and for VBS the system32 dir )
The call places are , Callers instrallation directory , GAC and System32 so your dll must be in one of these locations
As the assembly behaves as expected on your development system ,(the VS IDE is taking care of registering the COM assembly on the dev system ) this is where your focus should be .
I guess that Wise is not registering your .Net COM component the right way , to confirm that this is the case do the following , open a command window on a target system , go through the command prompt to the framework directory ( normally this is "C:\Windows\Microsoft.Net\FrameworkNumber\"
If you have the blinking cursor on that location , type regasm C:\FullpathTo\YourComDllName.dll and press enter you should get a confirmation that it succeeded .
Now your assembly should work as expected , if it does ( i know that for 95% sure ) here is the solutions for your Wise project on any system ( this may be your dev machine ) type now at the framework command prompt :
regasm C:\FullpathTo\YourComDllName.dll /regfile:myRegistrationFile.reg
The registration file that is now created , should be included in your Wise setup project http://www.wisesolutions.com/upload/wfwi.pdf see page 144 ( adding registry keys ) If you have done this , it should work for every installation you make with your deploy package
I hope to hear from you if you succeeded (or not :-( )
Regards,
Michel Posseth "Derek Hart" <de********@yahoo.comschreef in bericht news:u$**************@TK2MSFTNGP03.phx.gbl...
>>If I could get more specific, I would appreciate your thoughts. Please let me know if my steps are wrong, or I am missing some, or if I don't need some. 1) This is all I have done to strong name the vb.net dll. In the project properties, under Signing, I have chosen Sign The Assembly and chosen New in the combo box to make a new file. I simply named the file and gave it a password. I did nothing in reference to the key value pair, as I do not need this level of security. Is it required to make a key value pair, or is simply naming this file enough? In my references, I see the name of my key file. Should I set the build action to Embedded Resource, or is none the right choice?
2) I don't want to install my DLL in the GAC. So please let me know if that should be okay. Remember, I simply want to call the dll late bound from vba, or other com programs.
3) I have made a public sub new in the main class I am calling with no constructors.
4) My application compiles fine, as I made every dll "strong named", using the rules stated above. No key value pairs were done. Just what I did above.
5) I have the following at the top of my class: <ComClass()Public Class MyClass
6) I did not do any other code inside the class, using the GUIDs as you showed in your explanation. I did not do ComVisible anywhere, just the ComClass code.
7) I chose Register for Com Interop in the project properties, which is probably why it works on my development machine.
8) I chose a similar option in Wise InstallBuilder when deploying, so it should be doing regasm in the install.
9) My CreateObject on the deployed machine still gets ActiveX cannot create object. It seems like I am going to have to go at this for a while. Your feedback would be appreciated. Thank You!
"Michel Posseth [MCP]" <MS**@posseth.comwrote in message news:u4**************@TK2MSFTNGP05.phx.gbl... Hello Derek ,
All the steps that you describe ( make the assembly com visisble , create a public sub new ) sounds how i create my .Net dll`s COM callable however i missed only one thing you did not mention
Did you register the COM capable assembly with regasm.exe ?
My dll`s are callable with CreateObject from VBA ,VBS and even PHP , with PHP however i discovered that the assembly needed to be deployed in the GAC or the APACHE assembly directory
here is some copy paste code i created a long time ago for this group
http://groups.google.com/group/micro...996d74d250974e
As you see i create my own interface id`s , as this gives me the benefit of compatibility through my rules
HTH
Michel Posseth http://www.vbdotnetcoder.com
"Derek Hart" <de********@yahoo.comschreef in bericht news:uy**************@TK2MSFTNGP06.phx.gbl... Also, I found this article: > http://msdn.microsoft.com/en-us/libr...sz(vs.71).aspx > In which it states: In addition, it is not necessary to install assemblies into the global assembly cache to make them accessible to COM interop or unmanaged code. > I sure wish I could figure out how to deploy a dotnet application, with has a dll with public functions, and have COM objects use that, and not have to use the GAC. But I need the code to be late bound in the COM programs because I will not be able to set references to the DLLs or even know where they are installed. Please point me in the right direction! > > > > "Derek Hart" <de********@yahoo.comwrote in message news:Oi**************@TK2MSFTNGP03.phx.gbl.. . >>I am unclear about what all the requirements are to call a simple >>vb.net application, installed in the GAC, from COM (such as writing >>vba in Word to call the dotnet dll). >> >I believe I have installed the dll in the GAC. It is in there and has >a public token. I did not create a key-value pair. I believe it is >strong named, as it shows up in the GAC. >> >How do I browse the objects of it? I would like to call it late >bound, but the errors I get show that the properties or methods are >not available. >> >I have put <ComClass()as an attribute at the beginning of the >public class. >> >In VS 2008, I have chosen Register to COM interop. >> >I have all the options in Wise Installbuilder showing that it >installs the assembly in the GAC. >> >I have made sure that the class has this code: >Public Sub New > MyBase.New >End Sub >> >Just how many guesses do we need to do to just call a dotnet object? >Is there an article that lists what is required, instead of just >parts and pieces. >> >Please help. >> > > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: j23 |
last post by:
I have library (static) testlib.cpp:
#include <stdarg.h>
void xxx(...)
{
char buf;
va_list args;
va_start(args, buf);
va_end(args);
}
|
by: Nick Flandry |
last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my
development environment (Win2K server running IIS 5) and a test environment (also Win2K server
running IIS...
|
by: Thomas Schoch |
last post by:
I have a file with binary data and a dll where I have to pass a
OLE_HANDLE which points to the data in the file.
How do I read the data (i presume as binaryreader) and then pass the
OLE_HANDLE...
|
by: Christian Wilhelm |
last post by:
Hi!
I'm trying to call a Java WebService out of a .net Client. There are two
Methods, one Method requires one Parameter of type Parameter, the other
Method requires one Parameter of type...
|
by: Henrik |
last post by:
Hi all,,,
I need to get a refferece to a XML-webservice, and get some data from it....
But I can't add it like an web-refference... What options does I else have??
I've been told that i've to...
|
by: Mike |
last post by:
Timeout Calling Web Service
I am calling a .NET 1.1 web service from an aspx page. The web service can
take several minutes to complete its tasks before returning a message to the
aspx page.
...
|
by: Jerome Cohen |
last post by:
AI am trying to call a third-party web service. this service expects an XML
fragment that contains the request plus other parameter. adding the web
reference created the syntax below(reference.vb)....
|
by: joeblast |
last post by:
I have a Web service that gets the financial periods and hold a reference to
a disconnected dataset built at initialization. Web methods work on the
dataset inside the web service. Everything is...
|
by: Jason |
last post by:
I have an ASP.NET application in which I would like to call my button click
event (imgSubmitSearch_Click) on the page load if certain criteria are met.
Is this possible?
What is the correct...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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...
| |