473,414 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

can unmanaged code be verifiable?

I have got some C++ code that uses STL containers.
I need to use that code from a C# application, so compiled it as a .NET
assembly.
As I wish to run the project on a web environment, the DLL must be
verifiable.
As far as I understand, unless it's managed, it cant be verifiable.
One idea I had was to use System.Collections containers instead of the STL
containers. As I dont want to make changes to the original code, I thought I
could just create wrappers for the STL containers.
That approach didnt quite work, as I cannot provide the STL interface for my
new containers, for reasons such as being unable to override the * and ->
operators. (It's not allowed in managed code.)
Has anyone got a better (working) idea, or knows of an already existing
solution to this problem?

Cheers,
g.

p.s.
Alternatively, is there a way of making unmanaged code verifiable?
Nov 16 '05 #1
1 1251
Hi Gideon,

Unmanaged code cannot be verifiable using the CAS mechanism since it
requires provable type safety.

And you definitely won't be able to create a verifiable replacement for STL
that can keep the client side code intact since the STL interface by itself
clearly isn't type safe in the CLR sense.

Of course nothing prevents you from using unverifiable code in an ASP.Net
application. The only reason that I could see is when using a low end
hosting plan that doesn't allow you to use non verifiable code.

Ronald Laeremans
Visual C++ team

"Gideon" <gi************@dwl.co.uk.invalid> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
I have got some C++ code that uses STL containers.
I need to use that code from a C# application, so compiled it as a .NET
assembly.
As I wish to run the project on a web environment, the DLL must be
verifiable.
As far as I understand, unless it's managed, it cant be verifiable.
One idea I had was to use System.Collections containers instead of the STL
containers. As I dont want to make changes to the original code, I thought I could just create wrappers for the STL containers.
That approach didnt quite work, as I cannot provide the STL interface for my new containers, for reasons such as being unable to override the * and ->
operators. (It's not allowed in managed code.)
Has anyone got a better (working) idea, or knows of an already existing
solution to this problem?

Cheers,
g.

p.s.
Alternatively, is there a way of making unmanaged code verifiable?

Nov 16 '05 #2

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

Similar topics

7
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
40
by: Neo The One | last post by:
I think C# is forcing us to write more code by enforcing a rule that can be summarized as 'A local variable must be assgined *explicitly* before reading its value.' If you are interested in what...
4
by: Rachel Suddeth | last post by:
What is the difference between a managed/unmanaged resource, and how do you tell which is which? I'm trying to understand how to write some Dispose() methods, and we are supposed to put code that...
1
by: Sparhawk | last post by:
Hi, my company is going to migrate a large VC++ application to .NET to make use of Windows Forms (the old class library is not updated any more). We are not planning to migrate the rest of the...
1
by: Ioannis Vranos | last post by:
This compiles: value class SomeClass {}; int main() {
88
by: Peter Olcott | last post by:
Cab you write code directly in the Common Intermediate language? I need to optimize a critical real-time function.
5
by: R. MacDonald | last post by:
Hello, all, I am currently working on a .Net (VB) application that invokes routines in unmanaged (Fortran) DLLs. The unmanaged routines then communicate with the .Net application by means of a...
13
by: =?Utf-8?B?d3BjbWFtZQ==?= | last post by:
I have a small C++/CLI application which calls an unmanaged lib. It seems like I can't use /clr:pure and link with the unmanaged lib (LNK1313 error). The problem I have is that compiling with...
6
by: =?Utf-8?B?QWxleGFuZGVyZmU=?= | last post by:
Hi, I have a C# program that uses an unmanaged dll that has a function similar to the signature below : void f(out MyStruct arr, out int num); // num = actual array length returned The array...
0
BarryA
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...
0
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...
0
marktang
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,...
0
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...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...
0
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...

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.