|
Posted by hector on 05/12/05 18:43
We have a RPC based client/server hosting system (Wildcat!). Various RPC
clients include FTP, TELNET, DIALUP as well as WEB server. Each use a
RPC SDK/API to communicate with the central RPC server to establish context
and user sessions.
A few years back (before PHP 4.0) a former employee very familiar with PHP
began to add PHP server side support and wrote a "PHP Module?" to support
PHP 3.0 to expose the SDK API to PHP scripts.
It was never finished (not all the functions were exposed) and although it
was unofficially release to some PHP developers, for some reason or another
it no longer worked with PHP 4.0. We have been asked to update the DLL for
PHP 4.0/5.0.
Unfortunately, the C/C++ source code for the 3.0 version of the DLL was lost
or misplaced.
I believe I got all the information from the PHP support sites, but it
wasn't too obvious to me how to re-engineer the work.
I would like to get the basic skinny on writing a support DLL module to
expose our library of server functions.
Here are some example C/C++ functions and most primitive requirements for a
server-side applet to establish thread context:
BOOL WINAPI wcConnect(const char *szServerName="");
BOOL WINAPI wcCreateContext();
BOOL WINAPI wcCreateContextByChallenge(const char *szChalllege);
BOOL WINAPI wcDeleteContext();
I'm not a PHP script programming expert, but I see a script like so:
<?PHP
// establish context
$challenge = getenv("WILDCATCONTEXT");
if (!wcCreateContextByChallenge($challenge)) {
echo "Error creating context";
end??
}
... use other API functions ....
wcDeleteContext();
?>
I appreciate any guidance you may provide to assist in getting this PHP
4.0/5.0 wildcat DLL module written.
Thanks in advance
-- Hector
Navigation:
[Reply to this message]
|