title: Calling a C# (.NET) Method from PowerBuilder
body: <p>I am looking for direction in regards to calling a C# module 
  (written in the .NET (2.1) framework) from PowerBuilder.  Here is the C#.NET 
  information: The function is used to connect to COM PORT device and get the device status.</p>
  
  <pre><code>NameSpace:  NETS
  Class:    NETS
  Method:    REQUESTCARDSTATUS()
  DLL:    NETS.dll
  </code></pre>
  
  <p>Using my dll as OLE Object in Powerbuilder.<strong>I am using PowerBuilder version 11.5. I have a simple window with a command button on it.  Within this window, my code looks like this:</strong></p>
  
  <p><code>OLEObject ole_3</code>
  <code>ole_3 = CREATE OLEObject</code></p>
  
  <p>// connect to C# class<br>
  <code>MessageBox("Value = ", +String(li_rc))</code>
  <code>IF li_rc &lt;&gt; 0 THEN</code> 
      <code>DESTROY ole_3</code>
  <code>END IF</code></p>
  
  <pre><code> li_sum = ole_3.RequestCardStatus(); 
  </code></pre>
  
  <p><strong>Getting error while calling this function Error R0035: Error Calling External Function.</strong></p>
  
  <p>The function is working fine when try to call the function using c# application. I don't know what is causing the issue in powerbuilder. Trying from past three day, but no luck.</p>