﻿<?xml version="1.0" encoding="utf-8"?><Type Name="EntryPointNotFoundException" FullName="System.EntryPointNotFoundException" FullNameSP="System_EntryPointNotFoundException" Maintainer="ecma"><TypeSignature Language="ILASM" Value=".class public serializable EntryPointNotFoundException extends System.TypeLoadException" /><TypeSignature Language="C#" Value="public class EntryPointNotFoundException : TypeLoadException" /><TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit EntryPointNotFoundException extends System.TypeLoadException" /><MemberOfLibrary>RuntimeInfrastructure</MemberOfLibrary><AssemblyInfo><AssemblyName>mscorlib</AssemblyName><AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement><Base><BaseTypeName>System.TypeLoadException</BaseTypeName></Base><Interfaces /><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName></Attribute></Attributes><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>An <see cref="T:System.EntryPointNotFoundException" /> exception is thrown when the common language runtime is unable to load an assembly because it cannot identify the assembly's entry point.  This exception can be thrown under the following conditions: </para><list type="bullet"><item><para>The common language runtime is unable to locate an application entry point (typically a Main method) in an executable assembly. The application entry point must be a global or static method that has either no parameters or a string array as its only parameter. The entry point can return void, or it can return an <see cref="T:System.Int32" /> or <see cref="T:System.UInt32" /> exit code. An application assembly cannot define more than one entry point. </para></item><item><para>The call to a function in a Windows DLL cannot be resolved because the function cannot be found. In the following example, an <see cref="T:System.EntryPointNotFoundException" /> exception is thrown because User32.dll does not include a function named GetMyNumber. </para><para>code reference: System.EntryPointNotFoundException.Class#1</para></item></list><list type="bullet"><item><para>The call to a function in a Windows DLL cannot be resolved because the name used in the method call does not match a name found in the assembly. Frequently, this occurs because the <see cref="F:System.Runtime.InteropServices.DllImportAttribute.ExactSpelling" /> field is either implicitly or explicitly set to true, the called method includes one or more string parameters and has both an ANSI and a Unicode version, and the name used in the method call does not correspond to the name of this ANSI or Unicode version. The following example provides an illustration by attempting to call the Windows MessageBox function in User32.dll. Because the first method definition specifies <see cref="F:System.Runtime.InteropServices.CharSet.Unicode" /> for string marshaling, the common language looks for the wide-character version of the function, MessageBoxW, instead of the name used in the method call, MessageBox.  The second method definition corrects this problem by calling the MessageBoxW instead of the MessageBox function. </para><para>code reference: System.EntryPointNotFoundException.Class#2</para></item><item><para> You are trying to call a function in a dynamic link library by its simple name rather than its decorated name. Typically, the C++ compiler generates a decorated name for DLL functions. For example, the following C++ code defines a function named Double in a library named TestDll.dll. </para><para>code reference: System.EntryPointNotFoundException.Class#6</para><para>When the code in the following example tries to call the function, an <see cref="T:System.EntryPointNotFoundException" /> exception is thrown because the Double function cannot be found. </para><para>code reference: System.EntryPointNotFoundException.Class#7</para><para>However, if the function is called by using its decorated name (in this case, ?Double@@YAHH@Z), the function call succeeds, as the following example shows. </para><para>code reference: System.EntryPointNotFoundException.Class#8</para><para>You can find the decorated names of functions exported by a DLL by using a utility such as Dumpbin.exe. </para></item><item><para>You are attempting to call a method in a managed assembly as if it were an unmanaged dynamic link library. To see this in action, compile the following example to an assembly named StringUtilities.dll. </para><para>code reference: System.EntryPointNotFoundException.Class#3</para><para>Then compile and execute the following example, which attempts to call the StringUtilities.SayGoodMorning method in the StringUtilities.dll dynamic link library as if it were unmanaged code. The result is an <see cref="T:System.EntryPointNotFoundException" /> exception. </para><para>code reference: System.EntryPointNotFoundException.Class#4</para><para>To eliminate the exception, add a reference to the managed assembly and access the StringUtilities.SayGoodMorning method just as you would access any other method in managed code, as the following example does.</para><para>code reference: System.EntryPointNotFoundException.Class#5</para></item><item><para>You are trying to call a method in a COM DLL as if it were a Windows DLL. To access a COM DLL, select the <ui>Add Reference</ui> option in Visual Studio to add a reference to the project, and then select the type library from the <ui>COM</ui> tab. </para></item></list><para>For a list of initial property values for an instance of <see cref="T:System.EntryPointNotFoundException" />, see the <see cref="M:System.EntryPointNotFoundException.#ctor" /> constructors.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>The exception that is thrown when an attempt to load a class fails due to the absence of an entry method.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor()" /><MemberSignature Language="C#" Value="public EntryPointNotFoundException ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor initializes the <see cref="P:System.Exception.Message" /> property of the new instance to a system-supplied message that describes the error, such as "Entry point was not found." This message takes into account the current system culture.</para><para>The following table shows the initial property values for an instance of <see cref="T:System.EntryPointNotFoundException" />.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Value </para></description></item></listheader><item><term><para><see cref="P:System.Exception.InnerException" /></para></term><description><para>A null reference (Nothing in Visual Basic). </para></description></item><item><term><para><see cref="P:System.TypeLoadException.Message" /></para></term><description><para>The localized error message string. </para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.EntryPointNotFoundException" /> class.</para></summary></Docs><Excluded>0</Excluded></Member><Member MemberName=".ctor"><MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(string message)" /><MemberSignature Language="C#" Value="public EntryPointNotFoundException (string message);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="message" Type="System.String" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The content of <paramref name="message" /> is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.</para><para>The following table shows the initial property values for an instance of <see cref="T:System.EntryPointNotFoundException" />.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Value </para></description></item></listheader><item><term><para><see cref="P:System.Exception.InnerException" /></para></term><description><para>A null reference (Nothing in Visual Basic). </para></description></item><item><term><para><see cref="P:System.TypeLoadException.Message" /></para></term><description><para>The error message string. </para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.EntryPointNotFoundException" /> class with a specified error message.</para></summary><param name="message"><attribution license="cc4" from="Microsoft" modified="false" />The error message that explains the reason for the exception. </param></Docs><Excluded>0</Excluded></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="protected EntryPointNotFoundException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" /><Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.EntryPointNotFoundException" /> class with serialized data.</para></summary><param name="info"><attribution license="cc4" from="Microsoft" modified="false" />The object that holds the serialized object data. </param><param name="context"><attribution license="cc4" from="Microsoft" modified="false" />The contextual information about the source or destination. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(string message, class System.Exception inner)" /><MemberSignature Language="C#" Value="public EntryPointNotFoundException (string message, Exception inner);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message, class System.Exception inner) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="message" Type="System.String" /><Parameter Name="inner" Type="System.Exception" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the <see cref="P:System.Exception.InnerException" /> property. The <see cref="P:System.Exception.InnerException" /> property returns the same value that is passed into the constructor, or a null reference (Nothing in Visual Basic) if the <see cref="P:System.Exception.InnerException" /> property does not supply the inner exception value to the constructor.</para><para>The following table shows the initial property values for an instance of <see cref="T:System.EntryPointNotFoundException" />.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Value </para></description></item></listheader><item><term><para><see cref="P:System.Exception.InnerException" /></para></term><description><para>The inner exception reference. </para></description></item><item><term><para><see cref="P:System.TypeLoadException.Message" /></para></term><description><para>The error message string. </para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.EntryPointNotFoundException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.</para></summary><param name="message"><attribution license="cc4" from="Microsoft" modified="false" />The error message that explains the reason for the exception. </param><param name="inner"><attribution license="cc4" from="Microsoft" modified="false" />The exception that is the cause of the current exception. If the <paramref name="inner" /> parameter is not a null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception. </param></Docs><Excluded>0</Excluded></Member></Members><TypeExcluded>0</TypeExcluded></Type>