What does 'Cor' stand for? - clr

I've seen in it in the primary CLR dll, mscorlib.dll, and I've seen in it in this CLR Profiling API interface, ICorProfilerCallback2.
Just curious: what does the word 'Cor' stand for?

"Common Object Runtime"
For more, see:
http://www.danielmoth.com/Blog/2005/05/mscorlibdll.html
cor: Before .NET was chosen as the name, this new platform was a successor to COM so it was codenamed COM 3.0 and then the name chosen was… Common Object Runtime (cor) and that is where mscorlib derives its name from (and that stuck regardless of the fact that .NET was the final name)!
EDIT: Here's an interesting addendum from Jeffrey Richter's book
quoted from http://weblogs.asp.net/mreynolds/archive/2004/01/31/65551.aspx
When Microsoft first started working on the .NET Framework, MSCorLib.dll was
an acronym for Microsoft Common Object Runtime Library. Once ECMA started to
standardize the CLR and parts of the FCL, MSCorLib.dll officially became the
acronym for Multilanguage Standard Common Object Runtime Library.

From the book: C# 6.0 in a Nutshell - The Definitive Reference (page 199)
Some of the .NET types are used directly by the CLR and are essential
for the managed hosting environment. These types reside in an assembly
called mscorlib.dll and include C#’s built-in types, as well as the
basic collection classes, types for stream processing, serialization,
reflection, threading, and native interoperability (“mscorlib” is an
abbreviation for Multi-language Standard Common Object Runtime
Library).
So it is supposed to be Multi-language Standard Common Object Runtime Library

Related

Working with .NET classes in Delphi by using mscorlib

I would like to use .NET classes in Delphi. I included mscorlib unit (which is a TLB) and want to create an instance of e.g. Assembly class. So I have:
uses mscorlib;
var myAssembly: _Assembly;
begin
myAssembly:=CoAssembly.Create;
...
end.
The application is compiled successfully, but when starting it I get an error message saying that the class is not registered.
Any idea how this can be solved?
By using mscorlib for delphi to call c#.
You can take a look at JEDI or DDNRuntime.
TJclClrHost in JEDI.
DDNRuntime is wrapper for delphi to call c#.
Features
No need for COM support.
It is very simple to use, just declare the type and method of .NET in Delphi.
Dedicated translation tool, input one or more .NET assembly DLL, output one or two Delphi import units.
Support interface types.
Support dynamic array (one-dimensional array).
Support Delegate type.
Support Event.
Generic type (Limited support. Only XE8 and above are supported and nested generics are not supported yet, such as: DNICollection<DNKeyValuePair<TKey, TValue>> such multi-level nesting).
https://github.com/ying32/DDNRuntime-examples

Registration-free COM/DLL with multiple versions of the same typelib (SxS)

In the question below, has a very nice instruction on how to make a Delphi use ActiveX controls in a registration free manner.
Registration-free COM/DLL?
But I have an additional question - can this also be used to support multiple versions of the same COM-object as independent objects? I think .NET can, but we need it in our Win32 application.
The reason is that we use a third party component, which has only one interface (GUID) but has different behavior (calculations) based on the version of the dll.
It is possible to use multiple versions of a COM/SxS library in the same process by using a separate Activation Context for each version.

Assembly.LoadFile equivalent in Delphi 2010

I'm trying to load a program (.exe) written in Delphi 2010, so I can perform reflection in it. I've got the code to perform the reflection in Delphi, however, I can't seem to find examples or documentation on how to load a compiled binary, so I can do the reflection. All the examples and documentation show reflection being done to classes in the same project.
I know in C#, I'd just use
Assembly assembly = Assembly.LoadFile('path')
and then reflect on the assembly. Does Delphi have an equivalent Assembly class?
UPDATE:
I ended up not going the reflection or manifest route, I wrote a Delphi dll that gets all the data I need and DllImported the necessary functions. It's far less painful and my go-to method when UI Automation or Win32 can't detect or correctly detect certain UI components.

Why has the statement "printfn" in F# different name in VS2010 object browser?

I had know the difference between F# library and .NET library when I called their functions.
But when I saw the statement "printfn" in VS 2010 object browser, I saw only the "public static T PrintFormatLine(... format)" instead of "printfn".
Why has the statement "printfn" in F# library different name in VS2010 object browser?
How can I call functions in F# library, if there aren’t documents for the F# library, because the names in VS 2010 object browser are totally different?
The printfn function in the F# core library is annotated with a special attribute CompiledName that specifies the name of the function in a compiled form:
[<CompiledName("PrintFormatLine")>]
let printfn fp = ...
What is this good for? I think the motivation is that the FSharp.Core.dll library should follow the usual .NET naming guidelines. However, F# naming guidelines are a bit different (lowercase names are allowed, etc.), so the attribute is used to make the library look more like ordinary .NET library.
I don't think this is something that users of F# would use themselves. If you're writing code that will be used from C#, write it in a C# friendly style and if you're writing code that will be used from F#, follow the F# naming guidelines.

FIX protocol engine for Delphi?

Can anyone recommend a FIX Engine (commercial or open source) for use with Delphi?
Is it possible to use QuickFIX with Delphi?
Take a look at B2BITS FIX Antenna. There are two possible options:
FIX Antenna C++ has ANSI C interface that can be used in Delphi (there is a sample in the package)
http://www.b2bits.com/trading_solutions/fix_engines/fix_engine_cpp.html
FIX Antenna .NET can be used in Delphi .NET (there is again a sample in the package; also programmer's guide contains Delphi.NET samples)
http://www.b2bits.com/trading_solutions/fix_engines/fix_enginenet.html
Feel free to contact me directly if you need more details.
QuickFix is a C++ project.
Both Python and Ruby use SWIG to expose the C++ classes as native Python and Ruby classes.
The .NET wrapper sounds like a mix of C++ and C# code.
It's not possible to import C++ classes within Delphi directly. You'll have to use a "flat API" conversion, exposing all C++ methods as plain C declarations, in order to import external structures and functions in a Delphi unit.
To my knowledge, there is no such "flat API" of QuickFIX available, and no SWIG version able to generate Delphi code. You'll have to write your own wrapper in C++, or perhaps write your own FIX implementation in Delphi.
The only FIX library I know for Delphi is the one from http://www.b2bits.com - it did exist some years ago, but I'm not sure it's still sold/maintained - they seems to maintain only a DotNet version. Worth asking them for pricing and availability, in all cases.
One way to integrate the protocol with Delphi would be building a .Net or Java bridge, for example:
use the .Net C# implementation to build a small application to communicate with the FIX side
then expose methods (and maybe even the objects) of this .Net app over SOAP web services
use Delphi's web service client code generator to import the SOAP WSDL
access the web service from the Delphi side
This is probably more of a hack than anything else, but you could use the Python QuickFIX bindings in Delphi, via python4delphi. That's a lot of layers though (Delphi to Python to C++).
Python is an easy language to use, and learn, and it's easy to invoke and create python objects (or native C wrappers that pretend to be python objects) and invoke them directly from the Python4Delphi API.
Barring that, it might be very little work for you to build a procedural (flat) API as ABouchez said. Instead of writing a million functions I would write only the ones I needed, and then implement these simple functions inside a VC++ DLL:
QuickFixInit;
QuickFixCleanup;
handle := QuickFixLoadFile(filename)
QuickFixSaveFile(handle)
handle2 := QuickFixGetObjectHandle(handle,index,...);
QuickFixModifyObjectProperty(handle2, propertyname, propertyvalue );
QuickFixExecuteSomeAction( handle2, actionname, param1,param2,param3 );
The above are just to give you the flavor. I know nothing about the internal API, but what I'm showing you above is that you don't need to conform 100% to the API to write a wrapper. You could probably (if you know C/C++) write a functional wrapper that does what you need, and export it, link it into a DLL, and then import QuickFix.dll into Python with very little (2-4 hours of an expert's time) work, if you know Visual C++ well enough to write a few simple C-style (non OOP) functions that instantiate C++ classes, and invoke C++ methods.
It might be possible to expose the C++ APIs to Delphi via a C++Builder package (BPL) containing QuickFIx, but (a) some source modifications would be required, and (b) the C++ code in QuickFix, or its dependencies, might not build in C++Builder without significant modifications.

Resources