Manually creating transactions Due to complete lack of documentation on the subject, how would the pseucode for creating a transaction look using the following functions: createrawtransaction signrawtransaction and sendrawtransaction.

I receive the user transaction for incoming coins on IncomingTxID, when I create a raw transction I want to include at least some of those coins so if they won't confirm, neither will his payout.
I am assuming you want to accomplish something akin to what SatoshiDice does. Here is how it can be done, using API calls with the Bitcoin-Qt/bitcoind client:


listunspent - you get the list of all unspent transactions
You determine which ones you want to spend
You use createrawtransaction to create your inputs / outputs, taking txid and vout from the list of transactions that you have that are playing, as well as a list of transactions that constitute a "money supply" for you.
Use signrawtransaction to sign the created transaction
Use sendrawtransaction to send the signed transaction


That should be pretty much it. I have implemented some of that code myself and it is pretty easy once you get a hang of it all.