<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>cnsbusaaras さんの グループ アクティビティ</title><link>https://www.aras.com/community/members/cnsbusaaras</link><description>cnsbusaaras さんの グループ ユーザーの最近のアクティビティ</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>How to load aras 2023 dll with cpp host cli without native net core?</title><link>https://www.aras.com/community/f/development/38097/how-to-load-aras-2023-dll-with-cpp-host-cli-without-native-net-core</link><pubDate>Tue, 10 Oct 2023 07:13:18 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:3924fd45-9191-4bf1-8d96-36f909f23bb4</guid><dc:creator>cnsbusaaras</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#using &amp;quot;C:/temp/aras2023dlls/bin/IOM.dll&amp;quot;
#using &amp;quot;C:/temp/aras2023dlls/bin/System.Configuration.ConfigurationManager.dll&amp;quot;
#using &amp;quot;C:/temp/aras2023dlls/bin/Aras.Net.dll&amp;quot;

using namespace System;
using namespace System::IO;
using namespace System::Reflection;
using namespace System::Configuration;  


void arasDo()
{
  // sample aras code
  System::String ^ url = &amp;quot;http://devaras2023/InnovatorServer/Server/InnovatorServer.aspx&amp;quot;;
  System::String ^ database = &amp;quot;InnovatorSolutions&amp;quot;;
  System::String ^ user = &amp;quot;admin&amp;quot;;
  System::String ^ password = &amp;quot;innovator&amp;quot;;

 
  auto conn = Aras::IOM::IomFactory::CreateHttpServerConnection(url, database, user, password);
  auto result = conn-&amp;gt;Login();
  auto s = result-&amp;gt;ToString();
}

static Assembly ^
  LoadFromSameFolder(Object ^ sender, ResolveEventArgs ^ args) {
    String ^ folderPath = &amp;quot;C:\\temp\\aras2023dlls\\bin&amp;quot;;
    String ^ assemblyPath = Path::Combine(folderPath, (gcnew AssemblyName(args-&amp;gt;Name))-&amp;gt;Name + &amp;quot;.dll&amp;quot;);
    if (File::Exists(assemblyPath) == false)
      return nullptr;
    Assembly ^ assembly = Assembly::LoadFrom(assemblyPath);
    return assembly;
  }

void aras()
{
  // put this somewhere you know it will run (early, when the DLL gets loaded)
  System::AppDomain ^ currentDomain = AppDomain::CurrentDomain;
  currentDomain-&amp;gt;AssemblyResolve += gcnew ResolveEventHandler(LoadFromSameFolder);
  arasDo();
}&lt;/pre&gt;&lt;img style="max-height:240px;max-width:320px;" src="/community/resized-image/__size/640x480/__key/communityserver-discussions-components-files/3/Screenshot_2D00_getassembly.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;The exePath does not exist&lt;br /&gt;Assembly.GetEntryAssembly() returns a NULL&lt;br /&gt;Can someone explain me how to execute the added cpp sample code so I can load the aras 2023 dlls?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Ask A Question I</title><link>https://www.aras.com/community/achievements/460ac7df-7ccc-4c42-a204-9e05eef3be09</link><pubDate>Tue, 10 Oct 2023 07:13:18 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:c0559080-4966-4175-8975-62ccf707128c</guid><dc:creator /><description>Ask a question in a forum.</description></item></channel></rss>