0
votes

i have a dll file with me. I know the source code of it and also know what methods it has. What i want is to call that dll file through php. I should be able to pass parameters to that dll file and return values from that file both in PHp. After a google search what i find is, we have COM and DOTNET class available in php for reading dll files. Their documentation are not of much help.

For DOTNET class, for eg

$stack = new DOTNET("mscorlib", "System.Collections.Stack");

What is "mscorlib" Is it the dll file name? When i try to create a object, it gives fatal error.

EDIT

Here is my dll file code.

namespace datacubetest
{
   public class datacubetest
   {
       private string myvalue;
       public bool SetMyValue(string psMyValue)
       {
           myvalue = psMyValue;
           return true;
       }
       public string GetMyValue()
       {
           return myvalue;
       }
   }
}

I am trying to run it on my localhost. So with php i want call methods to setValue and getValue.

1

1 Answers

1
votes

First, try looking for some documentation. That might answer some questions

http://php.net/manual/en/class.dotnet.php

http://www.phpbuilder.com/manual/class.dotnet.php

1) Do you have .Net runtime on your web server?

2) Could you post the code that fails?