P
Peter
1) We create an assembly with Managed Extensions for C++ named
some_name.dll. This assembly has source code like the following
Byte * some_method() // a method returning a pointer, defined within some
class
{
....
}
This assembly is created with VS2003, i.e. it is a .NET 1.1 assembly.
2) We then create an application in C# using the assembly of step 1. In this
application we try to use some_method from the assembly. When we compile
this application with C# in VS2003 everything is fine: the C# compiler
issues no error message and the function works as expected when executed.
3) When we compile the same C# code with C# in VS2005, the compiler issues
the error message: "language does not support this construct". Using other
methods which do not use pointers from the same assembly still works
properly.
Clearly something must have changed between C#/VS2003 and C#/VS2005 with
regards to using pointers. It would be instructive to know what has been
changed. Furthermore, how can the issue be dealt with and worked around?
Peter
some_name.dll. This assembly has source code like the following
Byte * some_method() // a method returning a pointer, defined within some
class
{
....
}
This assembly is created with VS2003, i.e. it is a .NET 1.1 assembly.
2) We then create an application in C# using the assembly of step 1. In this
application we try to use some_method from the assembly. When we compile
this application with C# in VS2003 everything is fine: the C# compiler
issues no error message and the function works as expected when executed.
3) When we compile the same C# code with C# in VS2005, the compiler issues
the error message: "language does not support this construct". Using other
methods which do not use pointers from the same assembly still works
properly.
Clearly something must have changed between C#/VS2003 and C#/VS2005 with
regards to using pointers. It would be instructive to know what has been
changed. Furthermore, how can the issue be dealt with and worked around?
Peter