Hello, I was wondering how to write a DLL that I can use from php_w32api.dll? I want to get the memory usage using this code: ########################################################### dl("php_w32api.dll"); $api = new win32; $api->definetype("MEMORYSTATUS { long dwLength; long dwMemoryLoad; long dwTotalPhys; long dwAvailPhys; long dwTotalPageFile; long dwAvailPageFile; long dwTotalVirtual; long dwAvailVirtual; }"); $api->registerfunction("long GlobalMemoryStatus (MEMORYSTATUS &a) From kernel32.dll"); $a=$api->InitType("MEMORYSTATUS"); $api->GlobalMemoryStatus($a); print_r( $a); // Prints like [0] => Resource id #6 class MEMORYSTATUS { var $dwLength =0; var $dwMemoryLoad=0; var $dwTotalPhys=0; var $dwAvailPhys=0; var $dwTotalPageFile=0; var $dwAvailPageFile=0; var $dwTotalVirtual=0; var $dwAvailVirtual=0; } $b=new MEMORYSTATUS; $api->GlobalMemoryStatus($b); print_r( $b);// Prints all of the names, but all values are 0
########################################################### So I need another function to which I can pass $a and then get an int back or something that PHP can hande... I got visual studio 6... I got cygwin as well... I use Windows ME... Any help is appreciated... Thanks in advance // DvDmanDT -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php