35 lines
1.0 KiB
C#
35 lines
1.0 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2011 All Rights Reserved.
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Windows.Forms;
|
|
|
|
namespace UserConsentSample1
|
|
{
|
|
static class Program
|
|
{
|
|
/// <summary>
|
|
/// The main entry point for the application.
|
|
/// </summary>
|
|
[STAThread]
|
|
|
|
[DllImport("kernel32.dll", CallingConvention = CallingConvention.StdCall)]
|
|
[return: MarshalAs(UnmanagedType.Bool)]
|
|
public static extern bool SetDefaultDllDirectories(int directoryFlags);
|
|
|
|
static void Main()
|
|
{
|
|
// set default dll lookup directory to system
|
|
SetDefaultDllDirectories(0x00000800); //LOAD_LIBRARY_SEARCH_SYSTEM32
|
|
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
Application.Run(new UserConsentForm());
|
|
}
|
|
}
|
|
}
|