First publish.
authorsl
Thu, 07 Feb 2013 01:10:03 +0100
changeset 0a77691c40066
child 1 f9c5cad93786
First publish.
Write from C# named pipe server is working without using 100% CPU.
CSNamedPipe/CSNamedPipe.sln
CSNamedPipe/CSNamedPipe/CSNamedPipe.csproj
CSNamedPipe/CSNamedPipe/ClassDiagram1.cd
CSNamedPipe/CSNamedPipe/NamedPipeServer.cs
CSNamedPipe/CSNamedPipe/Program.cs
CSNamedPipe/CSNamedPipe/Properties/AssemblyInfo.cs
ReadMe.txt
Resource.h
SoundGraphAccess.cpp
SoundGraphAccess.h
SoundGraphAccess.ico
SoundGraphAccess.rc
SoundGraphAccess.sln
SoundGraphAccess.vcproj
iMONDisplay.dll
iMONDisplay.lib
iMONDisplayAPI.h
iMONDisplayDefines.h
small.ico
stdafx.cpp
stdafx.h
targetver.h
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/CSNamedPipe/CSNamedPipe.sln	Thu Feb 07 01:10:03 2013 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +
     1.5 +Microsoft Visual Studio Solution File, Format Version 11.00
     1.6 +# Visual Studio 2010
     1.7 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSNamedPipe", "CSNamedPipe\CSNamedPipe.csproj", "{4B3BFED0-82D8-4540-857B-D8A727348CC9}"
     1.8 +EndProject
     1.9 +Global
    1.10 +	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    1.11 +		Debug|Any CPU = Debug|Any CPU
    1.12 +		Release|Any CPU = Release|Any CPU
    1.13 +	EndGlobalSection
    1.14 +	GlobalSection(ProjectConfigurationPlatforms) = postSolution
    1.15 +		{4B3BFED0-82D8-4540-857B-D8A727348CC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    1.16 +		{4B3BFED0-82D8-4540-857B-D8A727348CC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
    1.17 +		{4B3BFED0-82D8-4540-857B-D8A727348CC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
    1.18 +		{4B3BFED0-82D8-4540-857B-D8A727348CC9}.Release|Any CPU.Build.0 = Release|Any CPU
    1.19 +	EndGlobalSection
    1.20 +	GlobalSection(SolutionProperties) = preSolution
    1.21 +		HideSolutionNode = FALSE
    1.22 +	EndGlobalSection
    1.23 +EndGlobal
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/CSNamedPipe/CSNamedPipe/CSNamedPipe.csproj	Thu Feb 07 01:10:03 2013 +0100
     2.3 @@ -0,0 +1,99 @@
     2.4 +<?xml version="1.0" encoding="utf-8"?>
     2.5 +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     2.6 +  <PropertyGroup>
     2.7 +    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     2.8 +    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
     2.9 +    <ProductVersion>9.0.21022</ProductVersion>
    2.10 +    <SchemaVersion>2.0</SchemaVersion>
    2.11 +    <ProjectGuid>{4B3BFED0-82D8-4540-857B-D8A727348CC9}</ProjectGuid>
    2.12 +    <OutputType>Exe</OutputType>
    2.13 +    <AppDesignerFolder>Properties</AppDesignerFolder>
    2.14 +    <RootNamespace>CSNamedPipe</RootNamespace>
    2.15 +    <AssemblyName>CSNamedPipe</AssemblyName>
    2.16 +    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    2.17 +    <FileAlignment>512</FileAlignment>
    2.18 +    <FileUpgradeFlags>
    2.19 +    </FileUpgradeFlags>
    2.20 +    <OldToolsVersion>3.5</OldToolsVersion>
    2.21 +    <UpgradeBackupLocation />
    2.22 +    <PublishUrl>publish\</PublishUrl>
    2.23 +    <Install>true</Install>
    2.24 +    <InstallFrom>Disk</InstallFrom>
    2.25 +    <UpdateEnabled>false</UpdateEnabled>
    2.26 +    <UpdateMode>Foreground</UpdateMode>
    2.27 +    <UpdateInterval>7</UpdateInterval>
    2.28 +    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
    2.29 +    <UpdatePeriodically>false</UpdatePeriodically>
    2.30 +    <UpdateRequired>false</UpdateRequired>
    2.31 +    <MapFileExtensions>true</MapFileExtensions>
    2.32 +    <ApplicationRevision>0</ApplicationRevision>
    2.33 +    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    2.34 +    <IsWebBootstrapper>false</IsWebBootstrapper>
    2.35 +    <UseApplicationTrust>false</UseApplicationTrust>
    2.36 +    <BootstrapperEnabled>true</BootstrapperEnabled>
    2.37 +  </PropertyGroup>
    2.38 +  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    2.39 +    <DebugSymbols>true</DebugSymbols>
    2.40 +    <DebugType>full</DebugType>
    2.41 +    <Optimize>false</Optimize>
    2.42 +    <OutputPath>bin\Debug\</OutputPath>
    2.43 +    <DefineConstants>DEBUG;TRACE</DefineConstants>
    2.44 +    <ErrorReport>prompt</ErrorReport>
    2.45 +    <WarningLevel>4</WarningLevel>
    2.46 +  </PropertyGroup>
    2.47 +  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    2.48 +    <DebugType>pdbonly</DebugType>
    2.49 +    <Optimize>true</Optimize>
    2.50 +    <OutputPath>bin\Release\</OutputPath>
    2.51 +    <DefineConstants>TRACE</DefineConstants>
    2.52 +    <ErrorReport>prompt</ErrorReport>
    2.53 +    <WarningLevel>4</WarningLevel>
    2.54 +  </PropertyGroup>
    2.55 +  <ItemGroup>
    2.56 +    <Reference Include="System" />
    2.57 +    <Reference Include="System.Core">
    2.58 +      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    2.59 +    </Reference>
    2.60 +    <Reference Include="System.Xml.Linq">
    2.61 +      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    2.62 +    </Reference>
    2.63 +    <Reference Include="System.Data.DataSetExtensions">
    2.64 +      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    2.65 +    </Reference>
    2.66 +    <Reference Include="System.Data" />
    2.67 +    <Reference Include="System.Xml" />
    2.68 +  </ItemGroup>
    2.69 +  <ItemGroup>
    2.70 +    <Compile Include="NamedPipeServer.cs" />
    2.71 +    <Compile Include="Program.cs" />
    2.72 +    <Compile Include="Properties\AssemblyInfo.cs" />
    2.73 +  </ItemGroup>
    2.74 +  <ItemGroup>
    2.75 +    <None Include="ClassDiagram1.cd" />
    2.76 +  </ItemGroup>
    2.77 +  <ItemGroup>
    2.78 +    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
    2.79 +      <Visible>False</Visible>
    2.80 +      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
    2.81 +      <Install>false</Install>
    2.82 +    </BootstrapperPackage>
    2.83 +    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
    2.84 +      <Visible>False</Visible>
    2.85 +      <ProductName>.NET Framework 3.5 SP1</ProductName>
    2.86 +      <Install>true</Install>
    2.87 +    </BootstrapperPackage>
    2.88 +    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
    2.89 +      <Visible>False</Visible>
    2.90 +      <ProductName>Windows Installer 3.1</ProductName>
    2.91 +      <Install>true</Install>
    2.92 +    </BootstrapperPackage>
    2.93 +  </ItemGroup>
    2.94 +  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    2.95 +  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
    2.96 +       Other similar extension points exist, see Microsoft.Common.targets.
    2.97 +  <Target Name="BeforeBuild">
    2.98 +  </Target>
    2.99 +  <Target Name="AfterBuild">
   2.100 +  </Target>
   2.101 +  -->
   2.102 +</Project>
   2.103 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/CSNamedPipe/CSNamedPipe/ClassDiagram1.cd	Thu Feb 07 01:10:03 2013 +0100
     3.3 @@ -0,0 +1,1 @@
     3.4 + 
     3.5 \ No newline at end of file
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/CSNamedPipe/CSNamedPipe/NamedPipeServer.cs	Thu Feb 07 01:10:03 2013 +0100
     4.3 @@ -0,0 +1,173 @@
     4.4 +using System;
     4.5 +using Microsoft.Win32.SafeHandles;
     4.6 +using System.Text;
     4.7 +using System.Runtime.InteropServices;
     4.8 +using System.Threading;
     4.9 +using System.IO;
    4.10 +
    4.11 +namespace CSNamedPipe
    4.12 +{
    4.13 +    public class NamedPipeServer
    4.14 +    {
    4.15 +        [DllImport("kernel32.dll", SetLastError = true)]
    4.16 +        public static extern SafeFileHandle CreateNamedPipe(
    4.17 +           String pipeName,
    4.18 +           uint dwOpenMode,
    4.19 +           uint dwPipeMode,
    4.20 +           uint nMaxInstances,
    4.21 +           uint nOutBufferSize,
    4.22 +           uint nInBufferSize,
    4.23 +           uint nDefaultTimeOut,
    4.24 +           IntPtr lpSecurityAttributes);
    4.25 +
    4.26 +        [DllImport("kernel32.dll", SetLastError = true)]
    4.27 +        public static extern int ConnectNamedPipe(
    4.28 +           SafeFileHandle hNamedPipe,
    4.29 +           IntPtr lpOverlapped);
    4.30 +
    4.31 +        [DllImport("kernel32.dll", SetLastError = true)]
    4.32 +        public static extern int DisconnectNamedPipe(
    4.33 +           SafeFileHandle hNamedPipe);
    4.34 +
    4.35 +        public const uint PIPE_ACCESS_DUPLEX = (0x00000003);
    4.36 +        public const uint FILE_FLAG_OVERLAPPED = (0x40000000);
    4.37 +        public const uint PIPE_ACCESS_OUTBOUND = (0x00000002);
    4.38 +        public const uint PIPE_ACCESS_INBOUND = (0x00000001);
    4.39 +
    4.40 +        public class Client
    4.41 +        {
    4.42 +            public SafeFileHandle handle;
    4.43 +            public FileStream stream;
    4.44 +        }
    4.45 +
    4.46 +        public const int BUFFER_SIZE = 256;
    4.47 +        public Client clientse =null;
    4.48 +
    4.49 +        public string pipeName;
    4.50 +        Thread listenThread;
    4.51 +        SafeFileHandle clientHandle;
    4.52 +        public int ClientType;
    4.53 +
    4.54 +        public NamedPipeServer(string PName,int Mode)
    4.55 +        {
    4.56 +            pipeName = PName;
    4.57 +            ClientType = Mode;//0 Reading Pipe, 1 Writing Pipe
    4.58 +
    4.59 +        }
    4.60 +       
    4.61 +        public void Start()
    4.62 +        {
    4.63 +            this.listenThread = new Thread(new ThreadStart(ListenForClients));
    4.64 +            this.listenThread.Start();
    4.65 +        }
    4.66 +        private void ListenForClients()
    4.67 +        {
    4.68 +            while (true)
    4.69 +            {
    4.70 +
    4.71 +                clientHandle = CreateNamedPipe(this.pipeName, PIPE_ACCESS_OUTBOUND /*| FILE_FLAG_OVERLAPPED*/, 0, 255, BUFFER_SIZE, BUFFER_SIZE, 0, IntPtr.Zero);
    4.72 +
    4.73 +                //could not create named pipe
    4.74 +                if (clientHandle.IsInvalid)
    4.75 +                    return;
    4.76 +
    4.77 +                int success = ConnectNamedPipe(clientHandle, IntPtr.Zero);
    4.78 +
    4.79 +                //could not connect client
    4.80 +                if (success == 0)
    4.81 +                    return;
    4.82 +
    4.83 +                clientse = new Client();
    4.84 +                clientse.handle = clientHandle;
    4.85 +                clientse.stream = new FileStream(clientse.handle, FileAccess.Write, BUFFER_SIZE, false);
    4.86 +
    4.87 +                if (ClientType == 0)
    4.88 +                {
    4.89 +                    Thread readThread = new Thread(new ThreadStart(Read));
    4.90 +                    readThread.Start();
    4.91 +                }
    4.92 +            }
    4.93 +        }
    4.94 +        private void Read()
    4.95 +        {
    4.96 +            //Client client = (Client)clientObj;
    4.97 +            //clientse.stream = new FileStream(clientse.handle, FileAccess.ReadWrite, BUFFER_SIZE, true);
    4.98 +            byte[] buffer = null;
    4.99 +            ASCIIEncoding encoder = new ASCIIEncoding();
   4.100 +
   4.101 +            while (true)
   4.102 +            {
   4.103 +                
   4.104 +                int bytesRead = 0;
   4.105 +
   4.106 +                try
   4.107 +                {
   4.108 +                    buffer = new byte[BUFFER_SIZE];
   4.109 +                    bytesRead = clientse.stream.Read(buffer, 0, BUFFER_SIZE);
   4.110 +                }
   4.111 +                catch
   4.112 +                {
   4.113 +                    //read error has occurred
   4.114 +                    break;
   4.115 +                }
   4.116 +
   4.117 +                //client has disconnected
   4.118 +                if (bytesRead == 0)
   4.119 +                    break;
   4.120 +
   4.121 +                //fire message received event
   4.122 +                //if (this.MessageReceived != null)
   4.123 +                //    this.MessageReceived(clientse, encoder.GetString(buffer, 0, bytesRead));
   4.124 +
   4.125 +                int ReadLength = 0;
   4.126 +                for (int i = 0; i < BUFFER_SIZE; i++)
   4.127 +                {
   4.128 +                    if (buffer[i].ToString("x2") != "cc")
   4.129 +                    {
   4.130 +                        ReadLength++;
   4.131 +                    }
   4.132 +                    else
   4.133 +                        break;
   4.134 +                }
   4.135 +                if (ReadLength > 0)
   4.136 +                {
   4.137 +                    byte[] Rc = new byte[ReadLength];
   4.138 +                    Buffer.BlockCopy(buffer, 0, Rc, 0, ReadLength);
   4.139 +
   4.140 +                    Console.WriteLine("C# App: Received " + ReadLength +" Bytes: "+ encoder.GetString(Rc, 0, ReadLength));
   4.141 +                    buffer.Initialize();
   4.142 +                }
   4.143 +               
   4.144 +            }
   4.145 +
   4.146 +            //clean up resources
   4.147 +            clientse.stream.Close();
   4.148 +            clientse.handle.Close();
   4.149 +            
   4.150 +        }
   4.151 +        public void SendMessage(string message, Client client)
   4.152 +        {
   4.153 +
   4.154 +                ASCIIEncoding encoder = new ASCIIEncoding();
   4.155 +                byte[] messageBuffer = encoder.GetBytes(message);
   4.156 +
   4.157 +                if (client.stream.CanWrite)
   4.158 +                {
   4.159 +                    client.stream.Write(messageBuffer, 0, messageBuffer.Length);
   4.160 +                    client.stream.Flush();
   4.161 +                }
   4.162 +
   4.163 +
   4.164 +        }
   4.165 +        public void StopServer()
   4.166 +        {
   4.167 +            //clean up resources
   4.168 +
   4.169 +            DisconnectNamedPipe(this.clientHandle);
   4.170 +            
   4.171 +
   4.172 +            this.listenThread.Abort();
   4.173 +        }
   4.174 +
   4.175 +    }
   4.176 +}
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/CSNamedPipe/CSNamedPipe/Program.cs	Thu Feb 07 01:10:03 2013 +0100
     5.3 @@ -0,0 +1,32 @@
     5.4 +using System;
     5.5 +using System.Text;
     5.6 +
     5.7 +
     5.8 +namespace CSNamedPipe
     5.9 +{
    5.10 +    class Program
    5.11 +    {
    5.12 +        static void Main(string[] args)
    5.13 +        {
    5.14 +            NamedPipeServer PServer1 = new NamedPipeServer(@"\\.\pipe\myNamedPipe1",0);
    5.15 +            //NamedPipeServer PServer2 = new NamedPipeServer(@"\\.\pipe\myNamedPipe2",1);
    5.16 +            NamedPipeServer PServer2 = new NamedPipeServer(@"\\.\pipe\sga-receiver", 1);
    5.17 +            
    5.18 +
    5.19 +            //PServer1.Start();
    5.20 +            PServer2.Start();
    5.21 +
    5.22 +            string Ms="Start";
    5.23 +            do
    5.24 +            {
    5.25 +                Console.WriteLine("Enter the message");
    5.26 +                Ms = Console.ReadLine();
    5.27 +                PServer2.SendMessage(Ms, PServer2.clientse);
    5.28 +            } while (Ms != "quit");
    5.29 +
    5.30 +            PServer1.StopServer();
    5.31 +            PServer2.StopServer();
    5.32 +        }
    5.33 +        
    5.34 +    }
    5.35 +}
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/CSNamedPipe/CSNamedPipe/Properties/AssemblyInfo.cs	Thu Feb 07 01:10:03 2013 +0100
     6.3 @@ -0,0 +1,36 @@
     6.4 +using System.Reflection;
     6.5 +using System.Runtime.CompilerServices;
     6.6 +using System.Runtime.InteropServices;
     6.7 +
     6.8 +// General Information about an assembly is controlled through the following 
     6.9 +// set of attributes. Change these attribute values to modify the information
    6.10 +// associated with an assembly.
    6.11 +[assembly: AssemblyTitle("CSNamedPipe")]
    6.12 +[assembly: AssemblyDescription("")]
    6.13 +[assembly: AssemblyConfiguration("")]
    6.14 +[assembly: AssemblyCompany("")]
    6.15 +[assembly: AssemblyProduct("CSNamedPipe")]
    6.16 +[assembly: AssemblyCopyright("Copyright ©  2009")]
    6.17 +[assembly: AssemblyTrademark("")]
    6.18 +[assembly: AssemblyCulture("")]
    6.19 +
    6.20 +// Setting ComVisible to false makes the types in this assembly not visible 
    6.21 +// to COM components.  If you need to access a type in this assembly from 
    6.22 +// COM, set the ComVisible attribute to true on that type.
    6.23 +[assembly: ComVisible(false)]
    6.24 +
    6.25 +// The following GUID is for the ID of the typelib if this project is exposed to COM
    6.26 +[assembly: Guid("9ca247ac-e153-4d77-b6ca-fbcfac32db9b")]
    6.27 +
    6.28 +// Version information for an assembly consists of the following four values:
    6.29 +//
    6.30 +//      Major Version
    6.31 +//      Minor Version 
    6.32 +//      Build Number
    6.33 +//      Revision
    6.34 +//
    6.35 +// You can specify all the values or you can default the Build and Revision Numbers 
    6.36 +// by using the '*' as shown below:
    6.37 +// [assembly: AssemblyVersion("1.0.*")]
    6.38 +[assembly: AssemblyVersion("1.0.0.0")]
    6.39 +[assembly: AssemblyFileVersion("1.0.0.0")]
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/ReadMe.txt	Thu Feb 07 01:10:03 2013 +0100
     7.3 @@ -0,0 +1,55 @@
     7.4 +========================================================================
     7.5 +    WIN32 APPLICATION : SoundGraphAccess Project Overview
     7.6 +========================================================================
     7.7 +
     7.8 +AppWizard has created this SoundGraphAccess application for you.
     7.9 +
    7.10 +This file contains a summary of what you will find in each of the files that
    7.11 +make up your SoundGraphAccess application.
    7.12 +
    7.13 +
    7.14 +SoundGraphAccess.vcproj
    7.15 +    This is the main project file for VC++ projects generated using an Application Wizard.
    7.16 +    It contains information about the version of Visual C++ that generated the file, and
    7.17 +    information about the platforms, configurations, and project features selected with the
    7.18 +    Application Wizard.
    7.19 +
    7.20 +SoundGraphAccess.cpp
    7.21 +    This is the main application source file.
    7.22 +
    7.23 +/////////////////////////////////////////////////////////////////////////////
    7.24 +AppWizard has created the following resources:
    7.25 +
    7.26 +SoundGraphAccess.rc
    7.27 +    This is a listing of all of the Microsoft Windows resources that the
    7.28 +    program uses.  It includes the icons, bitmaps, and cursors that are stored
    7.29 +    in the RES subdirectory.  This file can be directly edited in Microsoft
    7.30 +    Visual C++.
    7.31 +
    7.32 +Resource.h
    7.33 +    This is the standard header file, which defines new resource IDs.
    7.34 +    Microsoft Visual C++ reads and updates this file.
    7.35 +
    7.36 +SoundGraphAccess.ico
    7.37 +    This is an icon file, which is used as the application's icon (32x32).
    7.38 +    This icon is included by the main resource file SoundGraphAccess.rc.
    7.39 +
    7.40 +small.ico
    7.41 +    This is an icon file, which contains a smaller version (16x16)
    7.42 +    of the application's icon. This icon is included by the main resource
    7.43 +    file SoundGraphAccess.rc.
    7.44 +
    7.45 +/////////////////////////////////////////////////////////////////////////////
    7.46 +Other standard files:
    7.47 +
    7.48 +StdAfx.h, StdAfx.cpp
    7.49 +    These files are used to build a precompiled header (PCH) file
    7.50 +    named SoundGraphAccess.pch and a precompiled types file named StdAfx.obj.
    7.51 +
    7.52 +/////////////////////////////////////////////////////////////////////////////
    7.53 +Other notes:
    7.54 +
    7.55 +AppWizard uses "TODO:" comments to indicate parts of the source code you
    7.56 +should add to or customize.
    7.57 +
    7.58 +/////////////////////////////////////////////////////////////////////////////
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/Resource.h	Thu Feb 07 01:10:03 2013 +0100
     8.3 @@ -0,0 +1,31 @@
     8.4 +//{{NO_DEPENDENCIES}}
     8.5 +// Microsoft Visual C++ generated include file.
     8.6 +// Used by SoundGraphAccess.rc
     8.7 +//
     8.8 +
     8.9 +#define IDS_APP_TITLE			103
    8.10 +
    8.11 +#define IDR_MAINFRAME			128
    8.12 +#define IDD_SOUNDGRAPHACCESS_DIALOG	102
    8.13 +#define IDD_ABOUTBOX			103
    8.14 +#define IDM_ABOUT				104
    8.15 +#define IDM_EXIT				105
    8.16 +#define IDI_SOUNDGRAPHACCESS			107
    8.17 +#define IDI_SMALL				108
    8.18 +#define IDC_SOUNDGRAPHACCESS			109
    8.19 +#define IDC_MYICON				2
    8.20 +#ifndef IDC_STATIC
    8.21 +#define IDC_STATIC				-1
    8.22 +#endif
    8.23 +// Next default values for new objects
    8.24 +//
    8.25 +#ifdef APSTUDIO_INVOKED
    8.26 +#ifndef APSTUDIO_READONLY_SYMBOLS
    8.27 +
    8.28 +#define _APS_NO_MFC					130
    8.29 +#define _APS_NEXT_RESOURCE_VALUE	129
    8.30 +#define _APS_NEXT_COMMAND_VALUE		32771
    8.31 +#define _APS_NEXT_CONTROL_VALUE		1000
    8.32 +#define _APS_NEXT_SYMED_VALUE		110
    8.33 +#endif
    8.34 +#endif
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/SoundGraphAccess.cpp	Thu Feb 07 01:10:03 2013 +0100
     9.3 @@ -0,0 +1,364 @@
     9.4 +// SoundGraphAccess.cpp : Defines the entry point for the application.
     9.5 +//
     9.6 +
     9.7 +#include "stdafx.h"
     9.8 +#include "SoundGraphAccess.h"
     9.9 +#include "iMONDisplayAPI.h"
    9.10 +
    9.11 +#define WM_DSP_PLUGIN_NOTIFY	WM_APP + 1121
    9.12 +#define MAX_LOADSTRING 100
    9.13 +
    9.14 +
    9.15 +// Global Variables:
    9.16 +HINSTANCE hInst = 0;								// current instance
    9.17 +TCHAR szTitle[MAX_LOADSTRING];					// The title bar text
    9.18 +TCHAR szWindowClass[MAX_LOADSTRING];			// the main window class name
    9.19 +HANDLE gThreadReceiver = 0;
    9.20 +HANDLE gThreadSender = 0;
    9.21 +BOOL gQuit=FALSE;
    9.22 +
    9.23 +LPTSTR gPipeNameSender = TEXT("\\\\.\\pipe\\sga-sender"); 
    9.24 +LPTSTR gPipeNameReceiver = TEXT("\\\\.\\pipe\\sga-receiver"); 
    9.25 +HANDLE gPipeSender=0;
    9.26 +HANDLE gPipeReceiver=0;
    9.27 +
    9.28 +char gBufferReceiver[256];
    9.29 +char gBufferSender[256];
    9.30 +
    9.31 +
    9.32 +//
    9.33 +BOOL m_bVfdConnected;
    9.34 +BOOL m_bLcdConnected;
    9.35 +
    9.36 +// Forward declarations of functions included in this code module:
    9.37 +ATOM				MyRegisterClass(HINSTANCE hInstance);
    9.38 +BOOL				InitInstance(HINSTANCE, int);
    9.39 +LRESULT CALLBACK	WndProc(HWND, UINT, WPARAM, LPARAM);
    9.40 +INT_PTR CALLBACK	About(HWND, UINT, WPARAM, LPARAM);
    9.41 +
    9.42 +
    9.43 +
    9.44 +
    9.45 +/**
    9.46 +Read our pipe from this thread
    9.47 +*/
    9.48 +DWORD WINAPI ThreadReceiver( LPVOID lpParam )
    9.49 +	{
    9.50 +	//Create our pipe and listen
    9.51 +	gPipeReceiver=CreateFile(gPipeNameReceiver,	GENERIC_READ ,0,NULL,OPEN_EXISTING,FILE_FLAG_OVERLAPPED,NULL);
    9.52 +
    9.53 +	while(!gQuit)
    9.54 +		{
    9.55 +		DWORD cbRead;
    9.56 +		BOOL success=ReadFile(gPipeReceiver,gBufferReceiver,sizeof(gBufferReceiver),&cbRead, NULL); 
    9.57 +		if(success)
    9.58 +			{			
    9.59 +			gBufferReceiver[cbRead]='\0';
    9.60 +			OutputDebugStringA(gBufferReceiver);
    9.61 +			}
    9.62 +		if (!success && GetLastError() != ERROR_MORE_DATA) 
    9.63 +			{
    9.64 +			OutputDebugStringA("Can't Read\n");
    9.65 +			}
    9.66 +		//
    9.67 +		Sleep(500);
    9.68 +		}
    9.69 +
    9.70 +	if (gPipeReceiver!=0)
    9.71 +		{
    9.72 +		CloseHandle(gPipeReceiver);	
    9.73 +		gPipeReceiver=0;
    9.74 +		}
    9.75 +	
    9.76 +	return 0;
    9.77 +	}
    9.78 +
    9.79 +
    9.80 +/**
    9.81 +Write to our pipe from this thread
    9.82 +*/
    9.83 +DWORD WINAPI ThreadSender( LPVOID lpParam )
    9.84 +	{
    9.85 +	gPipeSender=CreateFile(gPipeNameSender,	GENERIC_WRITE ,0,NULL,OPEN_EXISTING,FILE_FLAG_OVERLAPPED,NULL);
    9.86 +	
    9.87 +
    9.88 +	if (gPipeSender!=0)
    9.89 +		{
    9.90 +		CloseHandle(gPipeSender);
    9.91 +		gPipeSender=0;
    9.92 +		}
    9.93 +
    9.94 +	return 0;
    9.95 +	}
    9.96 +
    9.97 +
    9.98 +/**
    9.99 +*/
   9.100 +int APIENTRY _tWinMain(HINSTANCE hInstance,
   9.101 +                     HINSTANCE hPrevInstance,
   9.102 +                     LPTSTR    lpCmdLine,
   9.103 +                     int       nCmdShow)
   9.104 +{
   9.105 +	UNREFERENCED_PARAMETER(hPrevInstance);
   9.106 +	UNREFERENCED_PARAMETER(lpCmdLine);
   9.107 +
   9.108 +	// TODO: Place code here.
   9.109 +	MSG msg;
   9.110 +	HACCEL hAccelTable;
   9.111 +
   9.112 +	// Initialize global strings
   9.113 +	LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
   9.114 +	LoadString(hInstance, IDC_SOUNDGRAPHACCESS, szWindowClass, MAX_LOADSTRING);
   9.115 +	MyRegisterClass(hInstance);
   9.116 +
   9.117 +	// Perform application initialization:
   9.118 +	if (!InitInstance (hInstance, /*SW_HIDE*/ nCmdShow))
   9.119 +		{
   9.120 +		return FALSE;
   9.121 +		}
   9.122 +
   9.123 +
   9.124 +
   9.125 +	hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_SOUNDGRAPHACCESS));
   9.126 +
   9.127 +	// Main message loop:
   9.128 +	while (GetMessage(&msg, NULL, 0, 0))
   9.129 +		{
   9.130 +		if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
   9.131 +			{
   9.132 +			TranslateMessage(&msg);
   9.133 +			DispatchMessage(&msg);
   9.134 +			}
   9.135 +		}
   9.136 +
   9.137 +	return (int) msg.wParam;
   9.138 +
   9.139 +	}
   9.140 +
   9.141 +
   9.142 +void DisplayPluginMessage(UINT uErrCode, BOOL bError)
   9.143 +	{
   9.144 +	LPCTSTR strErrMsg = _T("");
   9.145 +
   9.146 +	if(bError)
   9.147 +		{
   9.148 +		switch(uErrCode)
   9.149 +			{
   9.150 +			case DSPN_ERR_IN_USED:			strErrMsg = _T("Display Plug-in is Already Used by Other Application.");		break;
   9.151 +			case DSPN_ERR_HW_DISCONNECTED:	strErrMsg = _T("iMON HW is Not Connected.");									break;
   9.152 +			case DSPN_ERR_NOT_SUPPORTED_HW:	strErrMsg = _T("The Connected iMON HW doesn't Support Display Plug-in.");		break;
   9.153 +			case DSPN_ERR_PLUGIN_DISABLED:	strErrMsg = _T("Display Plug-in Mode Option is Disabled.");						break;
   9.154 +			case DSPN_ERR_IMON_NO_REPLY:	strErrMsg = _T("The Latest iMON is Not Installed or iMON Not Running.");		break;
   9.155 +			case DSPN_ERR_UNKNOWN:			strErrMsg = _T("Unknown Failure.");												break;
   9.156 +			}
   9.157 +		}
   9.158 +	else
   9.159 +		{
   9.160 +		switch(uErrCode)
   9.161 +			{
   9.162 +			case DSPNM_PLUGIN_SUCCEED:		strErrMsg = _T("Plug-in Mode Inited Successfully.");		break;
   9.163 +			case DSPNM_IMON_RESTARTED:		strErrMsg = _T("iMON Started and Plug-in Mode Inited.");		break;
   9.164 +			case DSPNM_HW_CONNECTED:		strErrMsg = _T("iMON HW Connected and Plug-in Mode Inited.");	break;
   9.165 +			}
   9.166 +		}
   9.167 +	//
   9.168 +	OutputDebugString((LPCTSTR)strErrMsg);
   9.169 +	}
   9.170 +
   9.171 +
   9.172 +
   9.173 +//
   9.174 +//  FUNCTION: MyRegisterClass()
   9.175 +//
   9.176 +//  PURPOSE: Registers the window class.
   9.177 +//
   9.178 +//  COMMENTS:
   9.179 +//
   9.180 +//    This function and its usage are only necessary if you want this code
   9.181 +//    to be compatible with Win32 systems prior to the 'RegisterClassEx'
   9.182 +//    function that was added to Windows 95. It is important to call this function
   9.183 +//    so that the application will get 'well formed' small icons associated
   9.184 +//    with it.
   9.185 +//
   9.186 +ATOM MyRegisterClass(HINSTANCE hInstance)
   9.187 +{
   9.188 +	WNDCLASSEX wcex;
   9.189 +
   9.190 +	wcex.cbSize = sizeof(WNDCLASSEX);
   9.191 +
   9.192 +	wcex.style			= CS_HREDRAW | CS_VREDRAW;
   9.193 +	wcex.lpfnWndProc	= WndProc;
   9.194 +	wcex.cbClsExtra		= 0;
   9.195 +	wcex.cbWndExtra		= 0;
   9.196 +	wcex.hInstance		= hInstance;
   9.197 +	wcex.hIcon			= LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SOUNDGRAPHACCESS));
   9.198 +	wcex.hCursor		= LoadCursor(NULL, IDC_ARROW);
   9.199 +	wcex.hbrBackground	= (HBRUSH)(COLOR_WINDOW+1);
   9.200 +	wcex.lpszMenuName	= MAKEINTRESOURCE(IDC_SOUNDGRAPHACCESS);
   9.201 +	wcex.lpszClassName	= szWindowClass;
   9.202 +	wcex.hIconSm		= LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
   9.203 +
   9.204 +	return RegisterClassEx(&wcex);
   9.205 +}
   9.206 +
   9.207 +//
   9.208 +//   FUNCTION: InitInstance(HINSTANCE, int)
   9.209 +//
   9.210 +//   PURPOSE: Saves instance handle and creates main window
   9.211 +//
   9.212 +//   COMMENTS:
   9.213 +//
   9.214 +//        In this function, we save the instance handle in a global variable and
   9.215 +//        create and display the main program window.
   9.216 +//
   9.217 +BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
   9.218 +{
   9.219 +   HWND hWnd;
   9.220 +
   9.221 +   hInst = hInstance; // Store instance handle in our global variable
   9.222 +
   9.223 +   hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
   9.224 +      CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
   9.225 +
   9.226 +   if (!hWnd)
   9.227 +   {
   9.228 +      return FALSE;
   9.229 +   }
   9.230 +
   9.231 +   ShowWindow(hWnd, nCmdShow);
   9.232 +   UpdateWindow(hWnd);
   9.233 +
   9.234 +   return TRUE;
   9.235 +}
   9.236 +
   9.237 +//
   9.238 +//  FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)
   9.239 +//
   9.240 +//  PURPOSE:  Processes messages for the main window.
   9.241 +//
   9.242 +//  WM_COMMAND	- process the application menu
   9.243 +//  WM_PAINT	- Paint the main window
   9.244 +//  WM_DESTROY	- post a quit message and return
   9.245 +//
   9.246 +//
   9.247 +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
   9.248 +{
   9.249 +	int wmId, wmEvent;
   9.250 +	PAINTSTRUCT ps;
   9.251 +	HDC hdc;
   9.252 +
   9.253 +	switch (message)
   9.254 +	{
   9.255 +	case WM_CREATE:
   9.256 +		//IMON_Display_Uninit();
   9.257 +		//IMON_Display_Init(hWnd, WM_DSP_PLUGIN_NOTIFY);
   9.258 +		gThreadReceiver = CreateThread( NULL, 0, ThreadReceiver, NULL/*data pointer*/, 0, NULL);
   9.259 +		gThreadSender = CreateThread( NULL, 0, ThreadSender, NULL/*data pointer*/, 0, NULL);
   9.260 +		break;
   9.261 +	case WM_COMMAND:
   9.262 +		wmId    = LOWORD(wParam);
   9.263 +		wmEvent = HIWORD(wParam);
   9.264 +		// Parse the menu selections:
   9.265 +		switch (wmId)
   9.266 +		{
   9.267 +		case IDM_ABOUT:
   9.268 +			DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
   9.269 +			break;
   9.270 +		case IDM_EXIT:
   9.271 +			DestroyWindow(hWnd);
   9.272 +			break;
   9.273 +		default:
   9.274 +			return DefWindowProc(hWnd, message, wParam, lParam);
   9.275 +		}
   9.276 +		break;
   9.277 +	case WM_PAINT:
   9.278 +		hdc = BeginPaint(hWnd, &ps);
   9.279 +		// TODO: Add any drawing code here...
   9.280 +		EndPaint(hWnd, &ps);
   9.281 +		break;
   9.282 +	case WM_DESTROY:
   9.283 +		gQuit=TRUE;
   9.284 +		//To complete write op
   9.285 +		if (gPipeSender!=0)
   9.286 +			{
   9.287 +			CloseHandle(gPipeSender);
   9.288 +			gPipeSender=0;
   9.289 +			}
   9.290 +		//To complete read op
   9.291 +		if (gPipeReceiver!=0)
   9.292 +			{
   9.293 +			CloseHandle(gPipeReceiver);
   9.294 +			gPipeReceiver=0;
   9.295 +			}
   9.296 +		WaitForSingleObject(gThreadSender,INFINITE);
   9.297 +		WaitForSingleObject(gThreadReceiver,INFINITE);
   9.298 +		CloseHandle(gThreadSender);
   9.299 +		CloseHandle(gThreadReceiver);
   9.300 +		//IMON_Display_Uninit();
   9.301 +		PostQuitMessage(0);
   9.302 +		break;
   9.303 +	case WM_DSP_PLUGIN_NOTIFY:
   9.304 +		switch(wParam)
   9.305 +			{
   9.306 +			case DSPNM_PLUGIN_SUCCEED:
   9.307 +			case DSPNM_IMON_RESTARTED:
   9.308 +			case DSPNM_HW_CONNECTED:
   9.309 +				{
   9.310 +				//GetDlgItem(IDC_BUTTON1)->EnableWindow(TRUE);
   9.311 +				m_bVfdConnected = FALSE;
   9.312 +				m_bLcdConnected = FALSE;
   9.313 +				if((lParam & DSPN_DSP_VFD) == DSPN_DSP_VFD)		m_bVfdConnected = TRUE;
   9.314 +				if((lParam & DSPN_DSP_LCD) == DSPN_DSP_LCD)		m_bLcdConnected = TRUE;
   9.315 +				//UpdateControlUI();
   9.316 +
   9.317 +				DisplayPluginMessage(wParam, FALSE);
   9.318 +				}
   9.319 +				break;
   9.320 +
   9.321 +			case DSPNM_PLUGIN_FAILED:
   9.322 +			case DSPNM_HW_DISCONNECTED:
   9.323 +			case DSPNM_IMON_CLOSED:
   9.324 +				{
   9.325 +				//GetDlgItem(IDC_BUTTON1)->EnableWindow(TRUE);
   9.326 +				m_bVfdConnected = FALSE;
   9.327 +				m_bLcdConnected = FALSE;
   9.328 +				//UpdateControlUI();
   9.329 +
   9.330 +				DisplayPluginMessage(lParam, TRUE);
   9.331 +				}
   9.332 +				break;
   9.333 +
   9.334 +			case DSPNM_LCD_TEXT_SCROLL_DONE:
   9.335 +				{
   9.336 +				//TRACE(_T("LCD Text Scroll Finished.\n"));
   9.337 +				}
   9.338 +				break;
   9.339 +			}
   9.340 +		return 0;
   9.341 +		break;
   9.342 +	default:
   9.343 +		return DefWindowProc(hWnd, message, wParam, lParam);
   9.344 +	}
   9.345 +	return 0;
   9.346 +}
   9.347 +
   9.348 +// Message handler for about box.
   9.349 +INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
   9.350 +{
   9.351 +	UNREFERENCED_PARAMETER(lParam);
   9.352 +	switch (message)
   9.353 +	{
   9.354 +	case WM_INITDIALOG:
   9.355 +		return (INT_PTR)TRUE;
   9.356 +
   9.357 +	case WM_COMMAND:
   9.358 +		if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
   9.359 +		{
   9.360 +			EndDialog(hDlg, LOWORD(wParam));
   9.361 +			return (INT_PTR)TRUE;
   9.362 +		}
   9.363 +		break;
   9.364 +	}
   9.365 +	return (INT_PTR)FALSE;
   9.366 +}
   9.367 +
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/SoundGraphAccess.h	Thu Feb 07 01:10:03 2013 +0100
    10.3 @@ -0,0 +1,3 @@
    10.4 +#pragma once
    10.5 +
    10.6 +#include "resource.h"
    11.1 Binary file SoundGraphAccess.ico has changed
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/SoundGraphAccess.rc	Thu Feb 07 01:10:03 2013 +0100
    12.3 @@ -0,0 +1,150 @@
    12.4 +//Microsoft Visual C++ generated resource script.
    12.5 +//
    12.6 +#include "resource.h"
    12.7 +
    12.8 +#define APSTUDIO_READONLY_SYMBOLS
    12.9 +/////////////////////////////////////////////////////////////////////////////
   12.10 +//
   12.11 +// Generated from the TEXTINCLUDE 2 resource.
   12.12 +//
   12.13 +#ifndef APSTUDIO_INVOKED
   12.14 +#include "targetver.h"
   12.15 +#endif
   12.16 +#define APSTUDIO_HIDDEN_SYMBOLS
   12.17 +#include "windows.h"
   12.18 +#undef APSTUDIO_HIDDEN_SYMBOLS
   12.19 +/////////////////////////////////////////////////////////////////////////////
   12.20 +#undef APSTUDIO_READONLY_SYMBOLS
   12.21 +
   12.22 +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
   12.23 +LANGUAGE 9, 1
   12.24 +#pragma code_page(1252)
   12.25 +
   12.26 +/////////////////////////////////////////////////////////////////////////////
   12.27 +//
   12.28 +// Icon
   12.29 +//
   12.30 +
   12.31 +// Icon with lowest ID value placed first to ensure application icon
   12.32 +// remains consistent on all systems.
   12.33 +
   12.34 +IDI_SOUNDGRAPHACCESS       ICON         "SoundGraphAccess.ico"
   12.35 +IDI_SMALL               ICON         "small.ico"
   12.36 +
   12.37 +/////////////////////////////////////////////////////////////////////////////
   12.38 +//
   12.39 +// Menu
   12.40 +//
   12.41 +
   12.42 +IDC_SOUNDGRAPHACCESS MENU
   12.43 +BEGIN
   12.44 +    POPUP "&File"
   12.45 +    BEGIN
   12.46 +        MENUITEM "E&xit",                IDM_EXIT
   12.47 +    END
   12.48 +    POPUP "&Help"
   12.49 +    BEGIN
   12.50 +        MENUITEM "&About ...",           IDM_ABOUT
   12.51 +    END
   12.52 +END
   12.53 +
   12.54 +
   12.55 +/////////////////////////////////////////////////////////////////////////////
   12.56 +//
   12.57 +// Accelerator
   12.58 +//
   12.59 +
   12.60 +IDC_SOUNDGRAPHACCESS ACCELERATORS
   12.61 +BEGIN
   12.62 +    "?",            IDM_ABOUT,              ASCII,  ALT
   12.63 +    "/",            IDM_ABOUT,              ASCII,  ALT
   12.64 +END
   12.65 +
   12.66 +
   12.67 +/////////////////////////////////////////////////////////////////////////////
   12.68 +//
   12.69 +// Dialog
   12.70 +//
   12.71 +
   12.72 +IDD_ABOUTBOX DIALOGEX 0, 0, 170, 62
   12.73 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
   12.74 +CAPTION "About SoundGraphAccess"
   12.75 +FONT 8, "MS Shell Dlg"
   12.76 +BEGIN
   12.77 +    ICON            IDR_MAINFRAME,IDC_STATIC,14,14,21,20
   12.78 +    LTEXT           "SoundGraphAccess, Version 1.0",IDC_STATIC,42,14,114,8,SS_NOPREFIX
   12.79 +    LTEXT           "Copyright (C) 2013",IDC_STATIC,42,26,114,8
   12.80 +    DEFPUSHBUTTON   "OK",IDOK,113,41,50,14,WS_GROUP
   12.81 +END
   12.82 +
   12.83 +/////////////////////////////////////////////////////////////////////////////
   12.84 +//
   12.85 +// DESIGNINFO
   12.86 +//
   12.87 +
   12.88 +#ifdef APSTUDIO_INVOKED
   12.89 +GUIDELINES DESIGNINFO
   12.90 +BEGIN
   12.91 +    IDD_ABOUTBOX, DIALOG
   12.92 +    BEGIN
   12.93 +        LEFTMARGIN, 7
   12.94 +        RIGHTMARGIN, 163
   12.95 +        TOPMARGIN, 7
   12.96 +        BOTTOMMARGIN, 55
   12.97 +    END
   12.98 +END
   12.99 +#endif    // APSTUDIO_INVOKED
  12.100 +
  12.101 +#ifdef APSTUDIO_INVOKED
  12.102 +/////////////////////////////////////////////////////////////////////////////
  12.103 +//
  12.104 +// TEXTINCLUDE
  12.105 +//
  12.106 +1 TEXTINCLUDE
  12.107 +BEGIN
  12.108 +    "resource.h\0"
  12.109 +END
  12.110 +
  12.111 +2 TEXTINCLUDE
  12.112 +BEGIN
  12.113 +	"#ifndef APSTUDIO_INVOKED\r\n"
  12.114 +    "#include ""targetver.h""\r\n"
  12.115 +    "#endif\r\n"
  12.116 +    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
  12.117 +    "#include ""windows.h""\r\n"
  12.118 +    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
  12.119 +    "\0"
  12.120 +END
  12.121 +
  12.122 +3 TEXTINCLUDE
  12.123 +BEGIN
  12.124 +    "\r\n"
  12.125 +    "\0"
  12.126 +END
  12.127 +
  12.128 +#endif    // APSTUDIO_INVOKED
  12.129 +
  12.130 +/////////////////////////////////////////////////////////////////////////////
  12.131 +//
  12.132 +// String Table
  12.133 +//
  12.134 +
  12.135 +STRINGTABLE
  12.136 +BEGIN
  12.137 +   IDC_SOUNDGRAPHACCESS   "SOUNDGRAPHACCESS"
  12.138 +   IDS_APP_TITLE       "SoundGraphAccess"
  12.139 +END
  12.140 +
  12.141 +#endif
  12.142 +/////////////////////////////////////////////////////////////////////////////
  12.143 +
  12.144 +
  12.145 +
  12.146 +#ifndef APSTUDIO_INVOKED
  12.147 +/////////////////////////////////////////////////////////////////////////////
  12.148 +//
  12.149 +// Generated from the TEXTINCLUDE 3 resource.
  12.150 +//
  12.151 +
  12.152 +/////////////////////////////////////////////////////////////////////////////
  12.153 +#endif    // not APSTUDIO_INVOKED
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/SoundGraphAccess.sln	Thu Feb 07 01:10:03 2013 +0100
    13.3 @@ -0,0 +1,20 @@
    13.4 +
    13.5 +Microsoft Visual Studio Solution File, Format Version 10.00
    13.6 +# Visual Studio 2008
    13.7 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundGraphAccess", "SoundGraphAccess.vcproj", "{A23C5543-181D-41F3-892C-E8A0C7FFFE30}"
    13.8 +EndProject
    13.9 +Global
   13.10 +	GlobalSection(SolutionConfigurationPlatforms) = preSolution
   13.11 +		Debug|Win32 = Debug|Win32
   13.12 +		Release|Win32 = Release|Win32
   13.13 +	EndGlobalSection
   13.14 +	GlobalSection(ProjectConfigurationPlatforms) = postSolution
   13.15 +		{A23C5543-181D-41F3-892C-E8A0C7FFFE30}.Debug|Win32.ActiveCfg = Debug|Win32
   13.16 +		{A23C5543-181D-41F3-892C-E8A0C7FFFE30}.Debug|Win32.Build.0 = Debug|Win32
   13.17 +		{A23C5543-181D-41F3-892C-E8A0C7FFFE30}.Release|Win32.ActiveCfg = Release|Win32
   13.18 +		{A23C5543-181D-41F3-892C-E8A0C7FFFE30}.Release|Win32.Build.0 = Release|Win32
   13.19 +	EndGlobalSection
   13.20 +	GlobalSection(SolutionProperties) = preSolution
   13.21 +		HideSolutionNode = FALSE
   13.22 +	EndGlobalSection
   13.23 +EndGlobal
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/SoundGraphAccess.vcproj	Thu Feb 07 01:10:03 2013 +0100
    14.3 @@ -0,0 +1,248 @@
    14.4 +<?xml version="1.0" encoding="Windows-1252"?>
    14.5 +<VisualStudioProject
    14.6 +	ProjectType="Visual C++"
    14.7 +	Version="9.00"
    14.8 +	Name="SoundGraphAccess"
    14.9 +	ProjectGUID="{A23C5543-181D-41F3-892C-E8A0C7FFFE30}"
   14.10 +	RootNamespace="SoundGraphAccess"
   14.11 +	Keyword="Win32Proj"
   14.12 +	TargetFrameworkVersion="196613"
   14.13 +	>
   14.14 +	<Platforms>
   14.15 +		<Platform
   14.16 +			Name="Win32"
   14.17 +		/>
   14.18 +	</Platforms>
   14.19 +	<ToolFiles>
   14.20 +	</ToolFiles>
   14.21 +	<Configurations>
   14.22 +		<Configuration
   14.23 +			Name="Debug|Win32"
   14.24 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
   14.25 +			IntermediateDirectory="$(ConfigurationName)"
   14.26 +			ConfigurationType="1"
   14.27 +			CharacterSet="1"
   14.28 +			>
   14.29 +			<Tool
   14.30 +				Name="VCPreBuildEventTool"
   14.31 +			/>
   14.32 +			<Tool
   14.33 +				Name="VCCustomBuildTool"
   14.34 +			/>
   14.35 +			<Tool
   14.36 +				Name="VCXMLDataGeneratorTool"
   14.37 +			/>
   14.38 +			<Tool
   14.39 +				Name="VCWebServiceProxyGeneratorTool"
   14.40 +			/>
   14.41 +			<Tool
   14.42 +				Name="VCMIDLTool"
   14.43 +			/>
   14.44 +			<Tool
   14.45 +				Name="VCCLCompilerTool"
   14.46 +				Optimization="0"
   14.47 +				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
   14.48 +				MinimalRebuild="true"
   14.49 +				BasicRuntimeChecks="3"
   14.50 +				RuntimeLibrary="3"
   14.51 +				UsePrecompiledHeader="2"
   14.52 +				WarningLevel="3"
   14.53 +				DebugInformationFormat="4"
   14.54 +			/>
   14.55 +			<Tool
   14.56 +				Name="VCManagedResourceCompilerTool"
   14.57 +			/>
   14.58 +			<Tool
   14.59 +				Name="VCResourceCompilerTool"
   14.60 +			/>
   14.61 +			<Tool
   14.62 +				Name="VCPreLinkEventTool"
   14.63 +			/>
   14.64 +			<Tool
   14.65 +				Name="VCLinkerTool"
   14.66 +				AdditionalDependencies="iMONDisplay.lib"
   14.67 +				LinkIncremental="2"
   14.68 +				ModuleDefinitionFile=""
   14.69 +				GenerateDebugInformation="true"
   14.70 +				SubSystem="2"
   14.71 +				TargetMachine="1"
   14.72 +			/>
   14.73 +			<Tool
   14.74 +				Name="VCALinkTool"
   14.75 +			/>
   14.76 +			<Tool
   14.77 +				Name="VCManifestTool"
   14.78 +			/>
   14.79 +			<Tool
   14.80 +				Name="VCXDCMakeTool"
   14.81 +			/>
   14.82 +			<Tool
   14.83 +				Name="VCBscMakeTool"
   14.84 +			/>
   14.85 +			<Tool
   14.86 +				Name="VCFxCopTool"
   14.87 +			/>
   14.88 +			<Tool
   14.89 +				Name="VCAppVerifierTool"
   14.90 +			/>
   14.91 +			<Tool
   14.92 +				Name="VCPostBuildEventTool"
   14.93 +			/>
   14.94 +		</Configuration>
   14.95 +		<Configuration
   14.96 +			Name="Release|Win32"
   14.97 +			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
   14.98 +			IntermediateDirectory="$(ConfigurationName)"
   14.99 +			ConfigurationType="1"
  14.100 +			CharacterSet="1"
  14.101 +			WholeProgramOptimization="1"
  14.102 +			>
  14.103 +			<Tool
  14.104 +				Name="VCPreBuildEventTool"
  14.105 +			/>
  14.106 +			<Tool
  14.107 +				Name="VCCustomBuildTool"
  14.108 +			/>
  14.109 +			<Tool
  14.110 +				Name="VCXMLDataGeneratorTool"
  14.111 +			/>
  14.112 +			<Tool
  14.113 +				Name="VCWebServiceProxyGeneratorTool"
  14.114 +			/>
  14.115 +			<Tool
  14.116 +				Name="VCMIDLTool"
  14.117 +			/>
  14.118 +			<Tool
  14.119 +				Name="VCCLCompilerTool"
  14.120 +				Optimization="2"
  14.121 +				EnableIntrinsicFunctions="true"
  14.122 +				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
  14.123 +				RuntimeLibrary="2"
  14.124 +				EnableFunctionLevelLinking="true"
  14.125 +				UsePrecompiledHeader="2"
  14.126 +				WarningLevel="3"
  14.127 +				DebugInformationFormat="3"
  14.128 +			/>
  14.129 +			<Tool
  14.130 +				Name="VCManagedResourceCompilerTool"
  14.131 +			/>
  14.132 +			<Tool
  14.133 +				Name="VCResourceCompilerTool"
  14.134 +			/>
  14.135 +			<Tool
  14.136 +				Name="VCPreLinkEventTool"
  14.137 +			/>
  14.138 +			<Tool
  14.139 +				Name="VCLinkerTool"
  14.140 +				AdditionalDependencies="iMONDisplay.lib"
  14.141 +				LinkIncremental="1"
  14.142 +				GenerateDebugInformation="true"
  14.143 +				SubSystem="2"
  14.144 +				OptimizeReferences="2"
  14.145 +				EnableCOMDATFolding="2"
  14.146 +				TargetMachine="1"
  14.147 +			/>
  14.148 +			<Tool
  14.149 +				Name="VCALinkTool"
  14.150 +			/>
  14.151 +			<Tool
  14.152 +				Name="VCManifestTool"
  14.153 +			/>
  14.154 +			<Tool
  14.155 +				Name="VCXDCMakeTool"
  14.156 +			/>
  14.157 +			<Tool
  14.158 +				Name="VCBscMakeTool"
  14.159 +			/>
  14.160 +			<Tool
  14.161 +				Name="VCFxCopTool"
  14.162 +			/>
  14.163 +			<Tool
  14.164 +				Name="VCAppVerifierTool"
  14.165 +			/>
  14.166 +			<Tool
  14.167 +				Name="VCPostBuildEventTool"
  14.168 +			/>
  14.169 +		</Configuration>
  14.170 +	</Configurations>
  14.171 +	<References>
  14.172 +	</References>
  14.173 +	<Files>
  14.174 +		<Filter
  14.175 +			Name="Source Files"
  14.176 +			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
  14.177 +			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
  14.178 +			>
  14.179 +			<File
  14.180 +				RelativePath=".\SoundGraphAccess.cpp"
  14.181 +				>
  14.182 +			</File>
  14.183 +			<File
  14.184 +				RelativePath=".\stdafx.cpp"
  14.185 +				>
  14.186 +				<FileConfiguration
  14.187 +					Name="Debug|Win32"
  14.188 +					>
  14.189 +					<Tool
  14.190 +						Name="VCCLCompilerTool"
  14.191 +						UsePrecompiledHeader="1"
  14.192 +					/>
  14.193 +				</FileConfiguration>
  14.194 +				<FileConfiguration
  14.195 +					Name="Release|Win32"
  14.196 +					>
  14.197 +					<Tool
  14.198 +						Name="VCCLCompilerTool"
  14.199 +						UsePrecompiledHeader="1"
  14.200 +					/>
  14.201 +				</FileConfiguration>
  14.202 +			</File>
  14.203 +		</Filter>
  14.204 +		<Filter
  14.205 +			Name="Header Files"
  14.206 +			Filter="h;hpp;hxx;hm;inl;inc;xsd"
  14.207 +			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
  14.208 +			>
  14.209 +			<File
  14.210 +				RelativePath=".\Resource.h"
  14.211 +				>
  14.212 +			</File>
  14.213 +			<File
  14.214 +				RelativePath=".\SoundGraphAccess.h"
  14.215 +				>
  14.216 +			</File>
  14.217 +			<File
  14.218 +				RelativePath=".\stdafx.h"
  14.219 +				>
  14.220 +			</File>
  14.221 +			<File
  14.222 +				RelativePath=".\targetver.h"
  14.223 +				>
  14.224 +			</File>
  14.225 +		</Filter>
  14.226 +		<Filter
  14.227 +			Name="Resource Files"
  14.228 +			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
  14.229 +			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
  14.230 +			>
  14.231 +			<File
  14.232 +				RelativePath=".\small.ico"
  14.233 +				>
  14.234 +			</File>
  14.235 +			<File
  14.236 +				RelativePath=".\SoundGraphAccess.ico"
  14.237 +				>
  14.238 +			</File>
  14.239 +			<File
  14.240 +				RelativePath=".\SoundGraphAccess.rc"
  14.241 +				>
  14.242 +			</File>
  14.243 +		</Filter>
  14.244 +		<File
  14.245 +			RelativePath=".\ReadMe.txt"
  14.246 +			>
  14.247 +		</File>
  14.248 +	</Files>
  14.249 +	<Globals>
  14.250 +	</Globals>
  14.251 +</VisualStudioProject>
    15.1 Binary file iMONDisplay.dll has changed
    16.1 Binary file iMONDisplay.lib has changed
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/iMONDisplayAPI.h	Thu Feb 07 01:10:03 2013 +0100
    17.3 @@ -0,0 +1,162 @@
    17.4 +#ifndef __IMON_DISPLAY_API_H__
    17.5 +#define __IMON_DISPLAY_API_H__
    17.6 +
    17.7 +////////////////////////////////////
    17.8 +//	includes
    17.9 +/** iMONDisplayDefines.h
   17.10 +This header file defines several enumerations. Open this file and check the definition and usage of enumerations and structures*/
   17.11 +#include "iMONDisplayDefines.h"
   17.12 +
   17.13 +#ifdef IMON_DISPLAY_API_EXPORT
   17.14 +#define IMONDSPAPI __declspec(dllexport)
   17.15 +#else
   17.16 +#define IMONDSPAPI __declspec(dllimport)
   17.17 +#endif
   17.18 +
   17.19 +#ifdef __cplusplus
   17.20 +extern "C" 
   17.21 +{
   17.22 +#endif	//__cplusplus
   17.23 +
   17.24 +	/////////////////////////////////////
   17.25 +	/////	Interfaces
   17.26 +	/**DSPResult IMON_Display_Init(HWND hwndNoti, UINT uMsgNotification)
   17.27 +	@brief	This function should be called to use other functions in iMON Display API.\n 
   17.28 +				When the caller application calls this function, API tries to request Display Plug-in Mode to iMON.
   17.29 +	@param	[in] hwndNoti	API will send/post message to this handle.
   17.30 +	@param	[in] uMsgNotification	API will send/post message to hwndNoti with this message identifier.
   17.31 +	@return	This function will return one of DSPResult enumeration value.\n
   17.32 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_INVALIDARG or DSP_E_OUTOFMEMORY can be returned when error occurs.*/
   17.33 +	IMONDSPAPI DSPResult IMON_Display_Init(HWND hwndNoti, UINT uMsgNotification);
   17.34 +
   17.35 +	/**DSPResult IMON_Display_Uninit()
   17.36 +	@brief	This function should be called when the caller application need not use this API any more.\n 
   17.37 +				If this function call is missed, iMON can't display other information.\n
   17.38 +	@return	This function will return one of DSPResult enumeration value.\n
   17.39 +				DSP_SUCCEEDED will be returned if succeeded.*/
   17.40 +	IMONDSPAPI DSPResult IMON_Display_Uninit();
   17.41 +
   17.42 +	/**DSPResult IMON_Display_IsInited()
   17.43 +	@brief	This function can be used when the caller application wants to know if API is initialized.\n 
   17.44 +	@return	This function will return one of DSPResult enumeration value.\n
   17.45 +				If API is initialized, this call will return DSP_S_INITED. Otherwise DSP_S_NOT_INITED will be returned.*/
   17.46 +	IMONDSPAPI DSPResult IMON_Display_IsInited();
   17.47 +
   17.48 +	/**DSPResult IMON_Display_IsPluginModeEnabled()
   17.49 +	@brief	This function can be used when the caller application wants to know if API can control iMON display.\n
   17.50 +	@return	This function will return one of DSPResult enumeration value.\n
   17.51 +				If API can control iMON display, this call will return DSP_S_IN_PLUGIN_MODE. Otherwise DSP_S_NOT_IN_PLUGIN_MODE will be returned.*/
   17.52 +	IMONDSPAPI DSPResult IMON_Display_IsPluginModeEnabled();
   17.53 +
   17.54 +
   17.55 +	/**DSPResult IMON_Display_SetVfdText(LPCTSTR lpsz1stLine, LPCTSTR lpsz2ndLine)
   17.56 +	@brief	This function can be used when the caller application wants to display text data on VFD module.\n
   17.57 +	@param	[in] lpsz1stLine	This string data will be displayed on the 1st line of VFD module.\n
   17.58 +									It doesn't support multi-byte character and if string data is longer than 16 characters, it displays 16 characters from the first.\n
   17.59 +	@param	[in] lpsz2ndLine	This string data will be displayed on the 2nd line of VFD module.\n
   17.60 +									It doesn't support multi-byte character and if string data is longer than 16 characters, it displays 16 characters from the first.\n
   17.61 +	@return	This function will return one of DSPResult enumeration value.\n
   17.62 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_POINTER, DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
   17.63 +	IMONDSPAPI DSPResult IMON_Display_SetVfdText(LPCTSTR lpsz1stLine, LPCTSTR lpsz2ndLine);
   17.64 +
   17.65 +	/**DSPResult IMON_Display_SetVfdEqData(PDSPEQDATA pEqData)
   17.66 +	@brief	This function can be used when the caller application wants to display equalizer data on VFD module.\n
   17.67 +	@param	[in] pEqData	Pointer of DSPEQDATA structure. The caller application should fill this structure with the equalizer data for 16 bands.\n
   17.68 +	@return	This function will return one of DSPResult enumeration value.\n
   17.69 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_POINTER, DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
   17.70 +	IMONDSPAPI DSPResult IMON_Display_SetVfdEqData(PDSPEQDATA pEqData);
   17.71 +
   17.72 +
   17.73 +	/**DSPResult IMON_Display_SetLcdText(LPCTSTR lpszText)
   17.74 +	@brief	This function can be used when the caller application wants to display text data on LCD module.\n
   17.75 +	@param	[in] lpszText	This string data will be displayed on the LCD module.\n
   17.76 +									It supports multi-byte character and if string data is longer than display area, it will start to scroll.\n
   17.77 +									When text scrolling is finished, API will notify it with DSPNotifyCode enumeration value, DSPNM_LCD_TEXT_SCROLL_DONE.\n
   17.78 +	@return	This function will return one of DSPResult enumeration value.\n
   17.79 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_POINTER, DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
   17.80 +	IMONDSPAPI DSPResult IMON_Display_SetLcdText(LPCTSTR lpszText);
   17.81 +
   17.82 +	/**DSPResult IMON_Display_SetLcdEqData(PDSPEQDATA pEqDataL, PDSPEQDATA pEqDataR)
   17.83 +	@brief	This function can be used when the caller application wants to display equalizer data on LCD module.\n
   17.84 +	@param	[in] pEqDataL    Pointer of DSPEQDATA structure. This parameter represents equalizer data of left channel.\n
   17.85 +								 The caller application should fill this structure with the equalizer data of left channel for 16 bands.\n
   17.86 +	@param	[in] pEqDataR    Pointer of DSPEQDATA structure. This parameter represents equalizer data of right channel.\n
   17.87 +								 The caller application should fill this structure with the equalizer data of right channel for 16 bands.\n
   17.88 +	@return	This function will return one of DSPResult enumeration value.\n
   17.89 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_POINTER, DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
   17.90 +	IMONDSPAPI DSPResult IMON_Display_SetLcdEqData(PDSPEQDATA pEqDataL, PDSPEQDATA pEqDataR);
   17.91 +
   17.92 +
   17.93 +	/**DSPResult IMON_Display_SetLcdAllIcons(BOOL bOn)
   17.94 +	@brief	This function can be used when the caller application wants to turn on/off all icons on LCD module.\n
   17.95 +	@param	[in] bOn    If this value is TRUE, iMON will turn on all icons. Otherwise, iMON will turn off all icons.\n
   17.96 +	@return	This function will return one of DSPResult enumeration value.\n
   17.97 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
   17.98 +	IMONDSPAPI DSPResult IMON_Display_SetLcdAllIcons(BOOL bOn);
   17.99 +
  17.100 +	/**DSPResult IMON_Display_SetLcdOrangeIcon(BYTE btIconData1, BYTE btIconData2)
  17.101 +	@brief	This function can be used when the caller application wants to turn on/off orange shaped disk icons on the upper left part of LCD module.\n
  17.102 +				Disk icons consist of 8 pieces of orange and orange peel.\n
  17.103 +	@param	[in] btIconData1    Each bit represents one of icons shaped the piece of orange.\n
  17.104 +									MSB is used for the piece placed on top and the remaining bits are for the piece placed in CCW from top.\n
  17.105 +	@param	[in] btIconData2    MSB represents the orange peel shaped icon. Other bits are not used.\n
  17.106 +	@return	This function will return one of DSPResult enumeration value.\n
  17.107 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
  17.108 +	IMONDSPAPI DSPResult IMON_Display_SetLcdOrangeIcon(BYTE btIconData1, BYTE btIconData2);
  17.109 +
  17.110 +	/**DSPResult IMON_Display_SetLcdMediaTypeIcon(BYTE btIconData)
  17.111 +	@brief	This function can be used when the caller application wants to turn on/off media type icons on the upper part of LCD module.\n
  17.112 +	@param	[in] btIconData    Each bit represents one of media type icons. From MSB each bit represents MUSIC, MOVIE, PHOTO, CD/DVD, TV, WEBCASTING and NEWS/WEATHER icon.\n
  17.113 +	@return	This function will return one of DSPResult enumeration value.\n
  17.114 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
  17.115 +	IMONDSPAPI DSPResult IMON_Display_SetLcdMediaTypeIcon(BYTE btIconData);
  17.116 +
  17.117 +	/**DSPResult IMON_Display_SetLcdSpeakerIcon(BYTE btIconData1, BYTE btIconData2)
  17.118 +	@brief	This function can be used when the caller application wants to turn on/off speaker icons on the upper right part of LCD module.\n
  17.119 +	@param	[in] btIconData1    Each bit represents one of speaker icons.\nFrom MSB each bit represents L, C, R, SL, LFE, SR, RL and SPDIF icon.
  17.120 +	@param	[in] btIconData2    MSB represents RR icon. Other bits are not used.\n
  17.121 +	@return	This function will return one of DSPResult enumeration value.\n
  17.122 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
  17.123 +	IMONDSPAPI DSPResult IMON_Display_SetLcdSpeakerIcon(BYTE btIconData1, BYTE btIconData2);
  17.124 +
  17.125 +	/**DSPResult IMON_Display_SetLcdVideoCodecIcon(BYTE btIconData)
  17.126 +	@brief	This function can be used when the caller application wants to turn on/off codec icons for video file on the lower part of LCD module.\n
  17.127 +	@param	[in] btIconData    Each bit represents one of video codec icons. From MSB each bit represents MPG, DIVX, XVID, WMV, MPG, AC3, DTS and WMA icon.\n
  17.128 +	@return	This function will return one of DSPResult enumeration value.\n
  17.129 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
  17.130 +	IMONDSPAPI DSPResult IMON_Display_SetLcdVideoCodecIcon(BYTE btIconData);
  17.131 +
  17.132 +	/**DSPResult IMON_Display_SetLcdAudioCodecIcon(BYTE btIconData)
  17.133 +	@brief	This function can be used when the caller application wants to turn on/off codec icons for audio file on the lower part of LCD module.\n
  17.134 +	@param	[in] btIconData    Each bit represents one of audio codec icons. From MSB each bit represents MP3, OGG, WMA and WAV icon.\n
  17.135 +	@return	This function will return one of DSPResult enumeration value.\n
  17.136 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
  17.137 +	IMONDSPAPI DSPResult IMON_Display_SetLcdAudioCodecIcon(BYTE btIconData);
  17.138 +
  17.139 +	/**DSPResult IMON_Display_SetLcdAspectRatioIcon(BYTE btIconData)
  17.140 +	@brief	This function can be used when the caller application wants to turn on/off aspect ratio icons on the lower right part of LCD module.\n
  17.141 +	@param	[in] btIconData    Each bit represents one of aspect ratio icons. From MSB each bit represents SRC, FIT, TV, HDTV, SCR1 and SCR2 icon.\n
  17.142 +	@return	This function will return one of DSPResult enumeration value.\n
  17.143 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
  17.144 +	IMONDSPAPI DSPResult IMON_Display_SetLcdAspectRatioIcon(BYTE btIconData);
  17.145 +
  17.146 +	/**DSPResult IMON_Display_SetLcdEtcIcon(BYTE btIconData)
  17.147 +	@brief	This function can be used when the caller application wants to turn on/off icons on the lower left part of LCD module.\n
  17.148 +	@param	[in] btIconData    Each bit represents icon. From MSB each bit represents REPEAT, SHUFFLE, ALARM, REC, VOL and TIME icon.\n
  17.149 +	@return	This function will return one of DSPResult enumeration value.\n
  17.150 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
  17.151 +	IMONDSPAPI DSPResult IMON_Display_SetLcdEtcIcon(BYTE btIconData);
  17.152 +
  17.153 +	/**DSPResult IMON_Display_SetLcdProgress(int nCurPos, int nTotal)
  17.154 +	@brief	This function can be used when the caller application wants to display progress bar on the upper and lower left part of text area of LCD module.\n
  17.155 +	@param	[in] nCurPos   It represents the current position of progress bar.\n
  17.156 +	@param	[in] nTotal    It represents the total length of progress bar.\n
  17.157 +	@return	This function will return one of DSPResult enumeration value.\n
  17.158 +				DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
  17.159 +	IMONDSPAPI DSPResult IMON_Display_SetLcdProgress(int nCurPos, int nTotal);
  17.160 +
  17.161 +#ifdef __cplusplus
  17.162 +}
  17.163 +#endif	//__cplusplus
  17.164 +
  17.165 +#endif	//__IMON_DISPLAY_API_H__
  17.166 \ No newline at end of file
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/iMONDisplayDefines.h	Thu Feb 07 01:10:03 2013 +0100
    18.3 @@ -0,0 +1,114 @@
    18.4 +#ifndef __IMON_DISPLAY_API_DEFINES_H__
    18.5 +#define __IMON_DISPLAY_API_DEFINES_H__
    18.6 +
    18.7 +//////////////////////////////////////////////////
    18.8 +//////////////////////////////////////////////////
    18.9 +//	Enumerations
   18.10 +
   18.11 +/**DSPResult
   18.12 +@brief	These enumeration values represent the returned result for iMON Display API function calls.\n
   18.13 +			All iMON Display API function calls return one of this result values.\n
   18.14 +			For meaning of each result, refer the comment of each line below*/
   18.15 +enum DSPResult
   18.16 +{
   18.17 +	DSP_SUCCEEDED = 0,				//// Function Call Succeeded Without Error
   18.18 +	DSP_E_FAIL,						//// Unspecified Failure
   18.19 +	DSP_E_OUTOFMEMORY,				//// Failed to Allocate Necessary Memory
   18.20 +	DSP_E_INVALIDARG,				//// One or More Arguments Are Not Valid
   18.21 +	DSP_E_NOT_INITED,				//// API is Not Initialized
   18.22 +	DSP_E_POINTER,					//// Pointer is Not Valid
   18.23 +
   18.24 +	DSP_S_INITED = 0x1000,			//// API is Initialized
   18.25 +	DSP_S_NOT_INITED,				//// API is Not Initialized
   18.26 +	DSP_S_IN_PLUGIN_MODE,			//// API Can Control iMON Display (Display Plug-in Mode)
   18.27 +	DSP_S_NOT_IN_PLUGIN_MODE,		//// API Can't Control iMON Display
   18.28 +};
   18.29 +
   18.30 +
   18.31 +/**DSPNInitResult
   18.32 +@brief	These enumeration values represent the result status for requesting Display Plug-in Mode to iMON.\n
   18.33 +			iMON Display API notifies one of this result values to the caller application after requesting Display Plug-in Mode to iMON.\n
   18.34 +			For more information, refer the comment of each line below*/
   18.35 +enum DSPNInitResult
   18.36 +{
   18.37 +	DSPN_SUCCEEDED = 0,				//// Display Plug-in Mode is Initialized Successfully
   18.38 +	DSPN_ERR_IN_USED = 0x0100,		//// Display Plug-in is Already Used by Other Application
   18.39 +	DSPN_ERR_HW_DISCONNECTED,		//// iMON HW is Not Connected
   18.40 +	DSPN_ERR_NOT_SUPPORTED_HW,		//// The Connected iMON HW doesn't Support Display Plug-in
   18.41 +	DSPN_ERR_PLUGIN_DISABLED,		//// Display Plug-in Mode Option is Disabled
   18.42 +	DSPN_ERR_IMON_NO_REPLY,			//// The Latest iMON is Not Installed or iMON Not Running
   18.43 +	DSPN_ERR_UNKNOWN = 0x0200,		//// Unknown Failure
   18.44 +};
   18.45 +
   18.46 +
   18.47 +/**DSPType
   18.48 +@brief	These enumeration values represent display type.\n
   18.49 +			Currently iMON Display API supports VFD and LCD products.*/
   18.50 +enum DSPType
   18.51 +{
   18.52 +	DSPN_DSP_NONE	= 0,
   18.53 +	DSPN_DSP_VFD	= 0x01,			//// VFD products
   18.54 +	DSPN_DSP_LCD	= 0x02,			//// LCD products
   18.55 +};
   18.56 +
   18.57 +
   18.58 +/**DSPNotifyCode
   18.59 +@brief	These enumeration values represent the notification codes.\n
   18.60 +			iMON Display API will send or post message to the caller application.\n
   18.61 +			The caller application should assign the message and the winodw handle to receivce message with IMON_Display_Init fucntion.\n
   18.62 +			These enumeration values are used with WPARAM parameter of the message.\n 
   18.63 +			For more information, see the explanation of each notification code below*/
   18.64 +enum DSPNotifyCode
   18.65 +{
   18.66 +	/**DSPNM_PLUGIN_SUCCEED
   18.67 +	@brief	When API succeeds to get the control for the display, API will post caller-specified message with DSPNM_PLUGIN_SUCCEED as WPARAM parameter.\n
   18.68 +				LPARAM represents DSPType. This value can be 0x01 (VFD), 0x02 (LCD) or 0x03 (VFD+LCD).*/
   18.69 +	DSPNM_PLUGIN_SUCCEED = 0,
   18.70 +
   18.71 +	/**DSPNM_PLUGIN_FAILED
   18.72 +	@brief	When API fails to get the control for the display, API will post caller-specified message with DSPNM_PLUGIN_FAILED as WPARAM parameter.\n
   18.73 +				LPARAM represents error code with DSPNResult.*/
   18.74 +	DSPNM_PLUGIN_FAILED,
   18.75 +
   18.76 +	/**DSPNM_IMON_RESTARTED
   18.77 +	@brief	When iMON starts, API will post caller-specified message with DSPNM_IMON_RESTARTED as WPARAM parameter.\n
   18.78 +				LPARAM represents DSPType. This value can be 0 (No Display), 0x01 (VFD), 0x02 (LCD) or 0x03 (VFD+LCD).*/
   18.79 +	DSPNM_IMON_RESTARTED,
   18.80 +
   18.81 +	/**DSPNM_IMON_CLOSED
   18.82 +	@brief	When iMON closed, API will post caller-specified message with DSPNM_IMON_CLOSED as WPARAM parameter.\n
   18.83 +				LPARAM is not used.*/
   18.84 +	DSPNM_IMON_CLOSED,
   18.85 +
   18.86 +	/**DSPNM_HW_CONNECTED
   18.87 +	@brief	When iMON HW newly connected, API will post caller-specified message with DSPNM_HW_CONNECTED as WPARAM parameter.\n
   18.88 +				LPARAM represents DSPType. This value can be 0 (No Display), 0x01 (VFD), 0x02 (LCD) or 0x03 (VFD+LCD).*/
   18.89 +	DSPNM_HW_CONNECTED,
   18.90 +
   18.91 +	/**DSPNM_HW_DISCONNECTED
   18.92 +	@brief	When iMON HW disconnected, API will post caller-specified message with DSPNM_HW_DISCONNECTED as WPARAM parameter.\n
   18.93 +				LPARAM is DSPNResult value, DSPN_ERR_HW_DISCONNECTED.*/
   18.94 +	DSPNM_HW_DISCONNECTED,
   18.95 +
   18.96 +
   18.97 +	/**DSPNM_LCD_TEXT_SCROLL_DONE
   18.98 +	@brief	When iMON LCD finishes scrolling Text, API will post caller-specified message with DSPNM_LCD_TEXT_SCROLL_DONE as WPARAM parameter.\n
   18.99 +				The caller application may need to know when text scroll is finished, for sending next text.\n
  18.100 +				LPARAM is not used.*/
  18.101 +	DSPNM_LCD_TEXT_SCROLL_DONE = 0x1000,
  18.102 +};
  18.103 +
  18.104 +//////////////////////////////////////////////////
  18.105 +//////////////////////////////////////////////////
  18.106 +//	Structure
  18.107 +
  18.108 +/**DspEqData
  18.109 +@brief	This structure contains Equalizer data for 16 bands. 
  18.110 +@param	BandData    It represents Equalizer data for 16 bands. Its range is from 0 to 100.*/
  18.111 +typedef struct DspEqData
  18.112 +{
  18.113 +	int BandData[16];
  18.114 +
  18.115 +} DSPEQDATA, *PDSPEQDATA;
  18.116 +
  18.117 +#endif	//__IMON_DISPLAY_API_DEFINES_H__
  18.118 \ No newline at end of file
    19.1 Binary file small.ico has changed
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/stdafx.cpp	Thu Feb 07 01:10:03 2013 +0100
    20.3 @@ -0,0 +1,8 @@
    20.4 +// stdafx.cpp : source file that includes just the standard includes
    20.5 +// SoundGraphAccess.pch will be the pre-compiled header
    20.6 +// stdafx.obj will contain the pre-compiled type information
    20.7 +
    20.8 +#include "stdafx.h"
    20.9 +
   20.10 +// TODO: reference any additional headers you need in STDAFX.H
   20.11 +// and not in this file
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/stdafx.h	Thu Feb 07 01:10:03 2013 +0100
    21.3 @@ -0,0 +1,21 @@
    21.4 +// stdafx.h : include file for standard system include files,
    21.5 +// or project specific include files that are used frequently, but
    21.6 +// are changed infrequently
    21.7 +//
    21.8 +
    21.9 +#pragma once
   21.10 +
   21.11 +#include "targetver.h"
   21.12 +
   21.13 +#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
   21.14 +// Windows Header Files:
   21.15 +#include <windows.h>
   21.16 +
   21.17 +// C RunTime Header Files
   21.18 +#include <stdlib.h>
   21.19 +#include <malloc.h>
   21.20 +#include <memory.h>
   21.21 +#include <tchar.h>
   21.22 +
   21.23 +
   21.24 +// TODO: reference additional headers your program requires here
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/targetver.h	Thu Feb 07 01:10:03 2013 +0100
    22.3 @@ -0,0 +1,24 @@
    22.4 +#pragma once
    22.5 +
    22.6 +// The following macros define the minimum required platform.  The minimum required platform
    22.7 +// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 
    22.8 +// your application.  The macros work by enabling all features available on platform versions up to and 
    22.9 +// including the version specified.
   22.10 +
   22.11 +// Modify the following defines if you have to target a platform prior to the ones specified below.
   22.12 +// Refer to MSDN for the latest info on corresponding values for different platforms.
   22.13 +#ifndef WINVER                          // Specifies that the minimum required platform is Windows Vista.
   22.14 +#define WINVER 0x0600           // Change this to the appropriate value to target other versions of Windows.
   22.15 +#endif
   22.16 +
   22.17 +#ifndef _WIN32_WINNT            // Specifies that the minimum required platform is Windows Vista.
   22.18 +#define _WIN32_WINNT 0x0600     // Change this to the appropriate value to target other versions of Windows.
   22.19 +#endif
   22.20 +
   22.21 +#ifndef _WIN32_WINDOWS          // Specifies that the minimum required platform is Windows 98.
   22.22 +#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
   22.23 +#endif
   22.24 +
   22.25 +#ifndef _WIN32_IE                       // Specifies that the minimum required platform is Internet Explorer 7.0.
   22.26 +#define _WIN32_IE 0x0700        // Change this to the appropriate value to target other versions of IE.
   22.27 +#endif