#native_company# #native_desc#
#native_cta#

Using .NET Assembly (Interoperability with COM) Page 5

By Jayesh Jain
on November 5, 2002

Adding Assembly to Global Assembly Cache

In order to share the assembly with all the applications it needs to be installed in the GAC (Global Assembly Cache)
gacutil /i c:tgolphpclassbinphpclass.dll
This utility could be found in C:Program FilesMicrosoft Visual Studio .NETFrameworkSDKBin (on my computer)
utility window example
[Note] To view all the assembly installed in the GAC on your computer, open your windows explorer and look in assembly folder under windows folder C:WINNTassembly ( on my computer) [End Note]

Coding the PHP File

Create a text file with the following content and save the file as phpnet.php in c:inetpubwwwroot folder (or your webserver http root folder)

<?php

    $MyObj 
= new COM ("phpclass.HealthRecord.patient");

    
$MyObj->lmp "05/08/2002";

    echo 
"LMP : $MyObj->lmp";

     echo 
"<br />EDD : $MyObj->edd";

?>



1
|
2
|
3
|
4
|
5
|
6
|
7
|
8