Re: extended stored proc programming

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bonj (Bonj_at_discussions.microsoft.com)
Date: 10/13/04


Date: Wed, 13 Oct 2004 06:37:04 -0700

Sigh.
This is getting frustrating.
Do I *really* have to put a blank _asm{} block at the top of a function just
so I can be sure it will go unmanaged?

No - seriously though, what I don't get is....if you've got code that
compiles as unmanaged, why would you want it to compile as managed? IOW, as
far as I can see the only reason to use managed code is to access the wide
range of framework classes. If you can manage without them, then why would
you want to have managed?
(I'm only considering unmanaged to be better in terms of security and speed
of execution... even though it may not be much better in terms of speed) ...
but still, do you not get what I mean?

> The /clr switch is how the Quake II port to .NET was
> accomplished. The Vertigo software team spent a day porting the original C
> code for the game to code that successfully compiled as C++ and then threw
> the /clr switch. In no time they were up and running on the .NET Framework.

So? You're talking as if it's better to have MSIL than native machine code,
rather than the other way round.
Maybe if you're a person that considers that it is, then I'm effectively
banging my head against a brick wall.

> > So how does it know that's not what I want to do, and
> > what if I *did* want to do that, how would I do it?
>
> I'm not sure what "it" is here. Where interoperability is concerned, the
> details make all the difference so if there is something that you need to do
> you might want to ask a detailed question. To be fair, I should point out
> that there are "issues" as the article above calls them. That is there are
> cases where you might not want to rely on the compiler but rather take
> charge yourself.

"it" is basically taking charge myself. I want to force a specific function
in my .cpp file that is compiled with /clr to compile to native, non-MSIL
machine code, or failing that just to *know* whether it is doing so or not!
I *haven't* got any unmanaged source files written before .NET was invented
that I now want to compile to MSIL. That's the last thing I want. I don't
know many more ways in which I can say that. Please remember my main aim is
speed, and that means having as much unmanaged, native machine code as
possible in my exe, and managed code only where necessary to use the
framework objects. Is that a reasonable want?



Relevant Pages

  • Re: extended stored proc programming
    ... far as I can see the only reason to use managed code is to access the wide ... You're talking as if it's better to have MSIL than native machine code, ... in my .cpp file that is compiled with /clr to compile to native, ...
    (microsoft.public.dotnet.languages.vc)
  • Re: hide python code !
    ... in compiled languages when we compile a code to an executable file it ... There are disassemblers for machine code. ... Hiding source code is incompatible with Open Source software. ... Use another language. ...
    (comp.lang.python)
  • Re: hide python code !
    ... in compiled languages when we compile a code to an executable file it ... There are disassemblers for machine code. ... can not be decompiled (python code).... ... Use another language. ...
    (comp.lang.python)
  • Re: Java to C++
    ... >> But machine code can be converted to assembly code and vice versa. ... >> Are you saying that you can compile your Java program directly to ... That was also the 'spirit' of UCSD Pascal. ...
    (comp.lang.cpp)
  • Re: Compiling from native to managed VC++ /clr option dramatically enlarge static lib size.
    ... I guess that you compile all your souce files with /clr. ... need to compile to managed code. ... in addition to that there is a P/Invoke function ... If the lib contains many functions that wrap another functions 1:1, ...
    (microsoft.public.dotnet.languages.vc)