473,657 Members | 2,423 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Signed assembly not recognised by VB6

Hello group,

I'm facing a problem in calling a signed .Net class library (c#) from
VB6 exe.

I have a VB6 exe calling .net assembly. The call to .Net dll works fine
when i deploy the .Net assembly as Private assembly. But here the only
issue is i need to place .Net dll and VB6 exe in same location.

To avoid this location dependency issue i tried registering the .Net
dll in GAC (signed with key pair). Now, when i call the .Net assembly
from VB6 it doesn't seem to be recognised by VB6. The code in VB6
doesn't throw any error, but the function in assembly is not getting
called.

Please suggest.

-Cheers

Jul 10 '06 #1
3 1817
Pranesh,

I would go with a greenfield approach. Basically, remove the assembly
from the GAC, and unregister the assembly (regasm). Also, remove the
reference from your VB project and shut VB6 down.

Then, put the assembly in the GAC, register it with REGASM, and then
open up VB and find the reference to make to your project.

Are you setting the GUID in your code for your interfaces and for your
classes that are being used in VB (you should be exposing interfaces that
are visible to COM and not the class itself).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

<pr***********@ gmail.comwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Hello group,

I'm facing a problem in calling a signed .Net class library (c#) from
VB6 exe.

I have a VB6 exe calling .net assembly. The call to .Net dll works fine
when i deploy the .Net assembly as Private assembly. But here the only
issue is i need to place .Net dll and VB6 exe in same location.

To avoid this location dependency issue i tried registering the .Net
dll in GAC (signed with key pair). Now, when i call the .Net assembly
from VB6 it doesn't seem to be recognised by VB6. The code in VB6
doesn't throw any error, but the function in assembly is not getting
called.

Please suggest.

-Cheers

Jul 10 '06 #2
Thanks for your reply Nicholas !!!

I have already tried the greenfield approach without any success.

Below is my interface defn. Is setting GUID compulsary?. If yes thn how
can i genarate those GUID's?

[InterfaceType(C omInterfaceType .InterfaceIsIDi spatch)]
public interface myInterface
{
Boolean myMethod(String ..., Int32 ...);
}

[ComSourceInterf aces("myCOM.MyI nterface")]
[ClassInterface( ClassInterfaceT ype.None)]
[ProgId("myCOM.m yClass")]
public class myClass : myInterface{}

- cheers
Nicholas Paldino [.NET/C# MVP] wrote:
Pranesh,

I would go with a greenfield approach. Basically, remove the assembly
from the GAC, and unregister the assembly (regasm). Also, remove the
reference from your VB project and shut VB6 down.

Then, put the assembly in the GAC, register it with REGASM, and then
open up VB and find the reference to make to your project.

Are you setting the GUID in your code for your interfaces and for your
classes that are being used in VB (you should be exposing interfaces that
are visible to COM and not the class itself).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

<pr***********@ gmail.comwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Hello group,

I'm facing a problem in calling a signed .Net class library (c#) from
VB6 exe.

I have a VB6 exe calling .net assembly. The call to .Net dll works fine
when i deploy the .Net assembly as Private assembly. But here the only
issue is i need to place .Net dll and VB6 exe in same location.

To avoid this location dependency issue i tried registering the .Net
dll in GAC (signed with key pair). Now, when i call the .Net assembly
from VB6 it doesn't seem to be recognised by VB6. The code in VB6
doesn't throw any error, but the function in assembly is not getting
called.

Please suggest.

-Cheers
Jul 11 '06 #3
FYI:
i foundout how to create GUID, Please let me know whether it is
compulsary to set GUID to make my code work?.

pr***********@g mail.com wrote:
Thanks for your reply Nicholas !!!

I have already tried the greenfield approach without any success.

Below is my interface defn. Is setting GUID compulsary?. If yes thn how
can i genarate those GUID's?

[InterfaceType(C omInterfaceType .InterfaceIsIDi spatch)]
public interface myInterface
{
Boolean myMethod(String ..., Int32 ...);
}

[ComSourceInterf aces("myCOM.MyI nterface")]
[ClassInterface( ClassInterfaceT ype.None)]
[ProgId("myCOM.m yClass")]
public class myClass : myInterface{}

- cheers
Nicholas Paldino [.NET/C# MVP] wrote:
Pranesh,

I would go with a greenfield approach. Basically, remove the assembly
from the GAC, and unregister the assembly (regasm). Also, remove the
reference from your VB project and shut VB6 down.

Then, put the assembly in the GAC, register it with REGASM, and then
open up VB and find the reference to make to your project.

Are you setting the GUID in your code for your interfaces and for your
classes that are being used in VB (you should be exposing interfaces that
are visible to COM and not the class itself).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

<pr***********@ gmail.comwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.com.. .
Hello group,
>
I'm facing a problem in calling a signed .Net class library (c#) from
VB6 exe.
>
I have a VB6 exe calling .net assembly. The call to .Net dll works fine
when i deploy the .Net assembly as Private assembly. But here the only
issue is i need to place .Net dll and VB6 exe in same location.
>
To avoid this location dependency issue i tried registering the .Net
dll in GAC (signed with key pair). Now, when i call the .Net assembly
from VB6 it doesn't seem to be recognised by VB6. The code in VB6
doesn't throw any error, but the function in assembly is not getting
called.
>
Please suggest.
>
-Cheers
>
Jul 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3135
by: John | last post by:
Hi, I am building an application that uses Steema's TeeChart. When I run my app through the dotfuscator it breaks the executable (saying something about not finding the strongly named TeeChart dll). Any advice? Thanks, John
2
1461
by: Bob Rock | last post by:
Hello, is it possible to programmatically read (and how) the public key that is embedded into an assembly that has been strongly signed??? What code would be needed??? Bob Rock
3
1462
by: wschaub | last post by:
We need to inject information (i.e. server details from where a signed file was downloaded) into a signed file, without breaking the signature or integrity of a signed file. Apparently there are areas and ways to inject custom information into signed files, however, we cannot find the "how to". It is needed to inject server source when customer downloads signed files from a site, allowing the downloaded file to query the information and...
3
2160
by: candy_init | last post by:
hi I recently came across a C program, a snippet of which is as follows: unsigned long get_sp(void) { __asm__("movl %esp,%eax"); } int main(int argc,char **argv) {
1
1411
by: R. Ian Lee | last post by:
I'm building a "plugin" architecture into my application where it will automatically detect (through Reflection) assemblies that are dropped into a folder as plugins and execute them when necessary. However, I do not want just anyone to be able to create an assembly and drop it in and have it execute. So, I'd like to sign the assemblies with a private key and then have the application verify that the assembly is signed properly before it will...
2
3550
by: cs | last post by:
is there a way to check trhough c# code if an assembly is signed and if it has the same signature as another assembly? I have some code that uses reflection on some types that belong to some assemblies that are loaded on runtime however I want to make sure the assemblies are signed with our key!
0
1073
by: Nikhil Patel | last post by:
Hi all, I have written a C# Class Library project which generates a signed assembly. When I build this project, it basically creates a dll and a tlb file. Now I am creating a Setup and Deployment project to deploy the assembly. When I add the Primary Output of the Class Library project, it only add tlb file and not the dll. I set the COMAutoRegister property of the tlb. When I run the setup file, it gives me an error regarding registering...
0
993
by: Andy | last post by:
Hi all, I have a few questions about restricting who may call an assembly i'm building. First, I have a business assembly on a web server, with Serializable objects that use remoting to move themselves to a data server (which also has a copy of the business layer, and a data layer assembly as well). Assuming this assembly is strongly named, do i need to worry about someone comprimising the web server, decompling my business
0
1519
by: savajx1 | last post by:
I am loading signed assemblies from a network share. The assemblies are NOT INSTALLED in the GAC as they are part of an enterprise distributed application implemented as a windows service that loads its code (*.dlls/assemblies) from a network share. The assemblies are signed to allow loading given code access security. I am debugging the windows service but I cannot get it to release/replace a copy of an old version of the *.dll. I...
0
8306
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
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...
0
8605
tracyyun
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...
0
7327
agi2029
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...
1
6164
isladogs
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...
0
4152
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...
1
2726
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
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.