I need to decrypt an encrypted key on WIN32.

The following two lines are the command lines to decrypt the key:
openssl enc -a -d | openssl rsautl -inkey [PUBLIC Key] -verify -certin
openssl enc -des3 -k [Secret Key] -a

However, I don't know how to create the above command lines using functions in C language.
Please let me know how to decrypt the key on WIN32.
I would like to have an advice in either one of the following:
  1.	How to create the functions in C
  2.	How to execute the command lines to receive the result in the standard output.
In addition please let me know things to be noted when creating an OpenSSL environment on WIN32.

Execution environment is:
Windows NT 4.0
VC++
OpenSSL 0.9.6

Thanks and regards,
Kazuhiro Yoshiyama