Tuesday, October 30, 2007

MIX..

This is a website hosted by Microsoft that contains demos & videos.. It's a very good one, just thought about sharing it here..

Friday, October 19, 2007

On Channel 8 !!

Channel 8 is the place to be for Students who want to code, connect and create technology ( msh el kanah el tamna beta3etna :D )... Channel 8 is sth like Channel 9, but for students..

The interviews we (me & Marwan -AAST MSP-) made during the Expression Around the Clock event are now in the 'recent news' on Channel 8.. Check it out..
Expression Around the Clock, Cairo

Feedbacks are welcomed..

Wednesday, October 17, 2007

Programming Languages History

I remember, when I was @ ITWorx, I liked that huge portrait with the programming languages history.. & its nice to find it online after all..

Sunday, October 07, 2007

Mixed Assembly

C++ supports interoperability features that allow managed and unmanaged code to coexist and interoperate within the same assembly or in the same file. C++ assembly which has both native and managed code is called as mixed assembly. They contain machine instructions as well as MSIL instruction. An existing application consisting entirely of unmanaged functions can be brought to the .NET platform by re-compiling just one module with the /clr compiler switch. This module is then able to use .NET features, but remains compatible with the remainder of the application. In this way, an application can be converted to the .NET platform in a gradual, piece-by-piece fashion. It is even possible to decide between managed and unmanaged compilation on a function-by-function basis within the same file. Assemblies compiled with /clr can call managed and unmanaged functions at will, including CRT functions such as printf, and are free to use .NET Framework Platform Invoke features to call unmanaged functions inside DLLs.

C++ supports the use of ATL, MFC, SCL, and the CRT libraries as mixed assemblies compiled with /clr. These mixed libraries allow you to use all of their existing functions when your code contains a mixture of native code and MSIL code.

Performance Consideration while using Interoperability: Regardless of the interop technique used, special transition sequences, called "thunks", are required each time a managed function calls an unmanaged function, and vise-versa. These thunks are inserted automatically by the C++ compiler, but it's important to keep in mind that cumulatively, these transitions can be expensive in terms of performance.

For .NET languages such as Visual Basic and C#, the prescribed method for interoperating with native components is P/Invoke. Since P/Invoke is supported by the .NET Framework, C++ supports it as well, but C++ also provides its own interoperability support, which is referred to as C++ Interop. C++ Interop is preferred over P/Invoke because P/Invoke is not type-safe, so errors are primarily reported at run-time, but C++ Interop also has performance advantages over P/Invoke.

Both techniques require two things to happen whenever a managed function calls an unmanaged function:
  • The function call arguments are marshaled from CLR to native types
  • A managed-to-unmanaged thunk is executed
  • The unmanaged function is called (using the native versions of the arguments)
  • An Unmanaged-to-managed thunk is executed
  • The return type and any "out" or "in,out" arguments are marshaled from native to CLR types

Try it.. (In order to enable compilation for both native & managed, change the project properties (Project properties >> General >> Common Language Runtime Support >> Choose Common Language Runtime Support (/clr)))

For Extra info check the MSDN

Thursday, October 04, 2007

Photosynth..

Yesterday, I attended the Expression around the clock event.. It was a nice day.. & from the very things I liked in those sessions was the Photosynth (A live lab project) , It was really so much amazing & innovative idea..




I just like to end with a sentence said by Blaise Aguera when we made an interview with him.. he said ::
"Knowledge of Math & Physics is unbeatable"