views:

97

answers:

2

What is AGL on .NET Compact Framework??

Any information about it would be very appreciated!

For Example(Code from .NET Compact Framework):

DllImport("AGL", EntryPoint="@106")] 
public static extern PAL_ERROR Blt(IntPtr howThis, IntPtr howSrc, ref RC rcSrc, ref RC rcDst, int cvKey, AGL_BLT md); 

public void Save(Stream stream, ImageFormat format) 
{ 
    if (stream == null) 
    { 
        throw new ArgumentNullException("stream"); 
    } 
    if (!stream.CanSeek || !stream.CanWrite) 
    { 
        throw new ArgumentException(); 
    } 
    MISC.HandleAr(GL.SaveImage(this.m_how, format.m_imgfmt, StreamWrapper.CreateStreamCallback(stream))); 
} 
+1  A: 

From Do you know what is "AGL" on earth?

AGL is a native graphic layer used by CF as a plumbing between CF Controls (Form, Label etc) and graphic objects (Graphics, Brush, Font etc) and OS primitives such as User (Windows, Menus, Controls) and GDI (Display Contexts, Fonts, Bitmaps) objects. You are not supposed to use it directly. In VB.NET projects it is visible in the browser but has no immediate use

astander
What relation is it between AGL and Win32?Do you know the Program running on the Desktop OS is used by .NET Framework ,not .NET Compact Framework?
Smart_Joe
+1  A: 

It is a support DLL in the Compact Framework. It contains unmanaged code to help make Windows Forms run on Windows CE and Windows Mobile. The term "PAL" you see used means Platform Abstraction Layer.

The @106 syntax in the [DllImport] attribute means "106th exported function". Exports are normally named instead of numbered, but AGL isn't meant for general use. The Blt() function maps to BitBlt() in the Windows API.

Hans Passant
Thank you very much!AGL is Abstraction Graphic Layer?
Smart_Joe
Automatic Grenade Launcher. That's a guess.
Hans Passant
Why?The real intention is for fun?!
Smart_Joe
Yes, that was a joke. Sorry, I forgot the :)
Hans Passant
Once again, thank!
Smart_Joe