Hi Jacek
In the past, I had the same problem on 64bit OS.
As farest I found out, it is not possible yet
to run COM components on 64bit machines.
If you find some way to do this,
would be happy to know how ...
Regards
Frank
"Jacek Jurkowski" wrote:
In the past, I had the same problem on 64bit OS.
As farest I found out, it is not possible yet
to run COM components on 64bit machines.
If you find some way to do this,
would be happy to know how ...
Regards
Frank
"Jacek Jurkowski" wrote:
Machine Win Vista 64bit + VSNet2008 SP1
Scenario:
- Create a simple ClassLibrary project in VSNet.
- Set "Make assembly COM-Visible" to true in project properties.
- Set project Build platform to x64
- Set "Register for COM interop" to true in project properties.
- Add below code to the project.
- Rebuild sollution.
>
DOES ANYBODY KNOW WHY THAT PROJECT DOES
NOT BUILD WITH "NOT A VALID ASSEMBLY" EXCEPTION?
>
using System;
using System.Runtime. InteropServices ;
>
namespace Test01
{
public class Class1
{
[Guid("a5a2aa7b-ebc6-44fe-9ab8-5c3d2cc0cd97")]
public interface KomaxInterface
{
String Weryfikuj(Strin g pPlikDefinicji, String pSerwer, String
pBazaDanych, Boolean pZintegrowaneLo gowanie,
String pUzytkownik, String pHaslo, String pListaTabel,
Boolean pCichyTryb, Boolean pBrakMozliwosci Przerwania);
}
>
[Guid("a1a21642-2ec5-48d3-8f49-51dd700d13cd"),
InterfaceType(C omInterfaceType .InterfaceIsIDi spatch)]
public interface KomaxEvents
{
}
>
[Guid("aed66299-3912-40cb-94f1-512280ed16f4"),
ClassInterface( ClassInterfaceT ype.None),
ComSourceInterf aces(typeof(Kom axEvents))]
public class Komax : KomaxInterface
{
public String Weryfikuj(Strin g pPlikDefinicji, String pSerwer,
String pBazaDanych, Boolean pZintegrowaneLo gowanie,
String pUzytkownik, String pHaslo, String pListaTabel,
Boolean pCichyTryb, Boolean pBrakMozliwosci Przerwania)
{
return String.Empty;
}
}
}
}
>
Scenario:
- Create a simple ClassLibrary project in VSNet.
- Set "Make assembly COM-Visible" to true in project properties.
- Set project Build platform to x64
- Set "Register for COM interop" to true in project properties.
- Add below code to the project.
- Rebuild sollution.
>
DOES ANYBODY KNOW WHY THAT PROJECT DOES
NOT BUILD WITH "NOT A VALID ASSEMBLY" EXCEPTION?
>
using System;
using System.Runtime. InteropServices ;
>
namespace Test01
{
public class Class1
{
[Guid("a5a2aa7b-ebc6-44fe-9ab8-5c3d2cc0cd97")]
public interface KomaxInterface
{
String Weryfikuj(Strin g pPlikDefinicji, String pSerwer, String
pBazaDanych, Boolean pZintegrowaneLo gowanie,
String pUzytkownik, String pHaslo, String pListaTabel,
Boolean pCichyTryb, Boolean pBrakMozliwosci Przerwania);
}
>
[Guid("a1a21642-2ec5-48d3-8f49-51dd700d13cd"),
InterfaceType(C omInterfaceType .InterfaceIsIDi spatch)]
public interface KomaxEvents
{
}
>
[Guid("aed66299-3912-40cb-94f1-512280ed16f4"),
ClassInterface( ClassInterfaceT ype.None),
ComSourceInterf aces(typeof(Kom axEvents))]
public class Komax : KomaxInterface
{
public String Weryfikuj(Strin g pPlikDefinicji, String pSerwer,
String pBazaDanych, Boolean pZintegrowaneLo gowanie,
String pUzytkownik, String pHaslo, String pListaTabel,
Boolean pCichyTryb, Boolean pBrakMozliwosci Przerwania)
{
return String.Empty;
}
}
}
}
>