I am getting error “System.DllNotFoundException:
Unable to load DLL 'swedll32.dll': Invalid access to memory location. (Exception from HRESULT: 0x800703E6)'
while Form1
loads. That dll is a 32 bit native or unmanaged dll written in C. I am using 64 bit Windows 10 and visual studio 2019. I tried many ways but no result.
I tried in this ways: Disable DEP and UAC, Run VS 2019 as Administrator, Compile – Target CPU – any CPU to X86
Please help. Thanks
Public Class Form1
Public Declare Sub swe_set_ephe_path Lib "swedll32.dll" Alias "_swe_set_ephe_path@4" (ByVal path As String)
End Class
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
swe_set_ephe_path(System.IO.Path.GetDirectoryName(Application.ExecutablePath) & "\SwEph")
End Sub