當前位置: 首頁>>代碼示例>>VB.NET>>正文


VB.NET EntryPointNotFoundException類代碼示例

本文整理匯總了VB.NET中System.EntryPointNotFoundException的典型用法代碼示例。如果您正苦於以下問題:VB.NET EntryPointNotFoundException類的具體用法?VB.NET EntryPointNotFoundException怎麽用?VB.NET EntryPointNotFoundException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了EntryPointNotFoundException類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。

示例1: Example

Module Example
    Declare Auto Function GetMyNumber Lib "User32.dll" () As Integer

   Public Sub Main()
      Try
         Dim number As Integer = GetMyNumber()
      Catch e As EntryPointNotFoundException
         Console.WriteLine("{0}:{2}   {1}", e.GetType().Name,  
                           e.Message, vbCrLf)
      End Try   
   End Sub
End Module
開發者ID:VB.NET開發者,項目名稱:System,代碼行數:12,代碼來源:EntryPointNotFoundException

輸出:

EntryPointNotFoundException:
Unable to find an entry point named 'GetMyNumber' in DLL 'User32.dll'.

示例2: Example

Module Example
   Declare Unicode Function MessageBox Lib "User32.dll" Alias "MessageBox" (
      ByVal hWnd As IntPtr, ByVal txt As String, ByVal caption As String, 
      ByVal typ As UInteger) As Integer  

   Declare Unicode Function MessageBox2 Lib "User32.dll" Alias "MessageBoxW" (  
      ByVal hWnd As IntPtr, ByVal txt As String, ByVal caption As String, 
      ByVal typ As UInteger) As Integer  
      
   Public Sub Main()
      Try
         MessageBox(IntPtr.Zero, "Calling the MessageBox Function", "Example", 0 )
      Catch e As EntryPointNotFoundException
         Console.WriteLine("{0}:{2}   {1}", e.GetType().Name,  
                           e.Message, vbCrLf)
      End Try

      Try
         MessageBox2(IntPtr.Zero, "Calling the MessageBox Function", "Example", 0 )
      Catch e As EntryPointNotFoundException
         Console.WriteLine("{0}:{2}   {1}", e.GetType().Name,  
                           e.Message, vbCrLf)
      End Try

   End Sub
End Module
開發者ID:VB.NET開發者,項目名稱:System,代碼行數:26,代碼來源:EntryPointNotFoundException

示例3: Main

Module Example
   Public Declare Function DoubleNum Lib ".\TestDll.dll" Alias "Double" _
                  (ByVal number As Integer) As Integer
   
   Public Sub Main()
      Console.WriteLine(DoubleNum(10))
   End Sub
End Module
開發者ID:VB.NET開發者,項目名稱:System,代碼行數:8,代碼來源:EntryPointNotFoundException

輸出:

Unhandled Exception: System.EntryPointNotFoundException: Unable to find an 
entry point named 'Double' in DLL '.\TestDll.dll'.
at Example.Double(Int32 number)
at Example.Main()

示例4: Main

Module Example
   Public Declare Function DoubleNum Lib ".\TestDll.dll" Alias "?Double@@YAHH@Z" _
                  (ByVal number As Integer) As Integer
   
   Public Sub Main()
      Console.WriteLine(DoubleNum(10))
   End Sub
End Module
開發者ID:VB.NET開發者,項目名稱:System,代碼行數:8,代碼來源:EntryPointNotFoundException

輸出:

20

示例5: SayGoodMorning

Module StringUtilities
   Public Function SayGoodMorning(name As String) As String
      Return String.Format("A top of the morning to you, {0}!", name)
   End Function
End Module
開發者ID:VB.NET開發者,項目名稱:System,代碼行數:5,代碼來源:EntryPointNotFoundException

示例6: Main

Module Example
   Declare Unicode Function GoodMorning Lib "StringUtilities.dll" (
      ByVal name As String) As String  

   Public Sub Main()
      Console.WriteLine(SayGoodMorning("Dakota"))
   End Sub
End Module
開發者ID:VB.NET開發者,項目名稱:System,代碼行數:8,代碼來源:EntryPointNotFoundException

輸出:

Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry point 
named 'GoodMorning' in DLL 'StringUtilities.dll'.
at Example.GoodMorning(String& name)
at Example.Main()

示例7: Main

Module Example
   Public Sub Main()
      Console.WriteLine(StringUtilities.SayGoodMorning("Dakota"))
   End Sub
End Module
開發者ID:VB.NET開發者,項目名稱:System,代碼行數:5,代碼來源:EntryPointNotFoundException

輸出:

A top of the morning to you, Dakota!


注:本文中的System.EntryPointNotFoundException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。