tags:

views:

19

answers:

1

Hi, 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.

Am i missing anything?

Thanks

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. Is this possible?

A: 

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?

Nubsis
I am trying to read dll from my localhost. Here is the code of my dll written in .NETnamespace 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 read setValue and GetValue methods using Php. Am i doing it the right way? Can i run this system on localhost?Thanks for your reply
noobcode