Download the source code
The TAPI function lineSetEquipmentState can be used to programmatically control the radio state. To change the radio state first initialize the TAPI and find the cellular line (line name is CELLTSP_LINENAME_STRING), then use the lineSetEquipmentState with appropriate flag. The syntax of the lineSetEquipmentState API is:
LONG WINAPI lineSetEquipmentState(HLINE hLine,DWORD dwState);
The hLine parameter is the cellular line handle. Second parameter dwState is the state of the radio and can be one of the following values.
LINEEQUIPSTATE_MINIMUM LINEEQUIPSTATE_RXONLY LINEEQUIPSTATE_TXONLY LINEEQUIPSTATE_NOTXRX LINEEQUIPSTATE_FULL
Most of the devices accepts only LINEEQUIPSTATE_MINIMUM and LINEEQUIPSTATE_FULL. The LINEEQUIPSTATE_MINIMUM will turn the radio off and LINEEQUIPSTATE_FULL will turn the radio on.
The sample application provided here displays the radio state and a button. Clicking the button will toggle the radio state.