Click here to Skip to main content
15,892,746 members
Articles / Mobile Apps

Windows Mobile Password Safe

Rate me:
Please Sign up or sign in to vote.
4.87/5 (58 votes)
12 Jan 2009CPOL16 min read 160.9K   3.1K   139  
A password safe with a touch screen UI introducing Fluid Controls.
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Text;

namespace Fluid.Drawing.GdiPlus
{
    internal delegate int NotificationHookProc(out IntPtr token);
    internal delegate void NotificationUnhookProc(IntPtr token);


    [StructLayout(LayoutKind.Sequential)]
    internal class GdiplusStartupInput
    {
        public uint GdiplusVersion;             // Must be 1  (or 2 for the Ex version)
        int DebugEventCallback; // Ignored on free builds
        public bool SuppressBackgroundThread;     // FALSE unless you're prepared to call 
        // the hook/unhook functions properly
        public bool SuppressExternalCodecs;       // FALSE unless you want GDI+ only to use
        // its internal image codecs.

        public GdiplusStartupInput(
            int debugEventCallback,
            bool suppressBackgroundThread,
            bool suppressExternalCodecs)
        {
            GdiplusVersion = 1;
            DebugEventCallback = debugEventCallback;
            SuppressBackgroundThread = suppressBackgroundThread;
            SuppressExternalCodecs = suppressExternalCodecs;
        }
        public GdiplusStartupInput()
            : this(0, false, false)
        {
        }

    }

    internal enum GdiplusStartupParams : uint
    {
        GdiplusStartupDefault = 0,
        GdiplusStartupNoSetRound = 1,
        GdiplusStartupSetPSValue = 2,
        GdiplusStartupTransparencyMask = 0xFF000000
    }

    // Output structure for GdiplusStartup()

    [StructLayout(LayoutKind.Sequential)]
    internal struct GdiplusStartupOutput
    {
        // The following 2 fields are NULL if SuppressBackgroundThread is FALSE.
        // Otherwise, they are functions which must be called appropriately to
        // replace the background thread.
        //
        // These should be called on the application's main message loop - i.e.
        // a message loop which is active for the lifetime of GDI+.
        // "NotificationHook" should be called before starting the loop,
        // and "NotificationUnhook" should be called after the loop ends.

        IntPtr /*NotificationHookProc*/ NotificationHook;
        IntPtr /*NotificationUnhookProc*/ NotificationUnhook;
    };

    //---------------------------------------------------------------------------
    // Encoder Parameter structure
    //---------------------------------------------------------------------------
    [StructLayout(LayoutKind.Sequential)]
    internal struct EncoderParameter
    {
        public Guid Guid;               // GUID of the parameter
        public uint NumberOfValues;     // Number of the parameter values
        public uint Type;               // Value type, like ValueTypeLONG  etc.
        IntPtr Value;              // A pointer to the parameter values
    }

    //---------------------------------------------------------------------------
    // Encoder Parameters structure
    //---------------------------------------------------------------------------
    [StructLayout(LayoutKind.Sequential)]
    internal class EncoderParameters
    {
        public uint Count;                      // Number of parameters in this structure
        [MarshalAs(UnmanagedType.ByValArray)]
        public EncoderParameter[] Parameters;          // Parameter values
    };
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Germany Germany
MCPD
Enterprise Application Developer 3.5
Windows Developer 3.5
.ASP.NET Developer 3.5
.NET 2.0 Windows Developer
.NET 2.0 Web Developer
.NET 2.0 Enterprise Application Developer


MCTS
.NET 3.5 Windows Forms Applications
.NET 3.5 ASP.NET Applications
.NET 3.5, ADO.NET Application Development
.NET 3.5 WCF
.NET 3.5 WPF
.NET 3.5 WF
Microsoft SQL Server 2008, Database Development
.NET 2.0 Windows Applications
.NET 2.0 Web Applications
.NET 2.0 Distributed Applications
SQL Server 2005
Sharepoint Services 3.0 Application Development
Windows Vista Client Configuration

Comments and Discussions