__LIB_RADIO_EXPORT BOOL Radio_Init() { HANDLE hCom=INVALID_HANDLE_VALUE; if(RilInitOK)return TRUE; //Active Driver g_hRil=ActivateDeviceEx(TEXT("Drivers\\TT\\RIL"), NULL, 0, NULL); //g_hVCom=ActivateDeviceEx(TEXT("Drivers\\TT\\VirtCOM"), NULL, 0, NULL); init_sms_table_base(); RilInitOK=TRUE; g_hEvent=CreateEvent(NULL,TRUE,FALSE,NULL); return RilInstance.InitRil(1); }
Boolean __fastcall ssh_interceptor_iodevice_create_device(SshInterceptorIoDevice io_dev) { SSH_DEBUG(SSH_D_HIGHSTART, ("Creating stream device...")); io_dev->handle = ActivateDeviceEx(TEXT("Drivers\\BuiltIn\\QuickSec"), NULL, 0, NULL); if (io_dev->handle == NULL) { ssh_log_event(SSH_LOGFACILITY_LOCAL0, SSH_LOG_CRITICAL, ("Failed to register QSI1 device")); return FALSE; } return TRUE; }
/**+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @function: _tmain() - test application main. @input: argc - number of command line arguments (including application name) @input: argv - command line argument strings @return: application exit code @notes: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ VOID _tmain(int argc, TCHAR * argv[]) { BOOL dump = FALSE; BOOL badArgs = TRUE; do { /* get argument string */ if (argc < 2) { break; } if (_tcscmp(argv[1], TEXT("-x")) == 0) { g_Load = FALSE; if (argc < 3) { break; } g_pKeyMatchString = argv[2]; } else if(_tcscmp(argv[1], TEXT("-l")) == 0) { g_Load = TRUE; if (argc < 3) { break; } g_pStartPath = argv[2]; } else if(_tcscmp(argv[1], TEXT("-d")) == 0) { dump = TRUE; } else { break; } badArgs = FALSE; if (dump) { if (argc > 2) { /* enumerate the key supplied by the user */ DoEnum(argv[2], NULL); } else { /* else enumerate some common ones */ PRINT_CONSOLE((TEXT("******* Dumping PCI Instances...********** \r\n"))); DoEnum(TEXT("Drivers\\BuiltIn\\PCI\\Instance"), NULL); PRINT_CONSOLE((TEXT("****************************************** \r\n"))); } PRINT_CONSOLE((TEXT("******* Dumping Active Devices...********** \r\n"))); /* enumerate the active path */ DoEnum(ACTIVE_BASE_PATH, NULL); PRINT_CONSOLE((TEXT("****************************************** \r\n"))); break; } if (!g_Load) { DoEnum(ACTIVE_BASE_PATH,g_pKeyMatchString); } else { PRINT_CONSOLE((TEXT("+++ Loading Driver: %s .... \r\n"),g_pStartPath)); ActivateDeviceEx(g_pStartPath,NULL,0,NULL); } } while (FALSE); if (badArgs) { PrintUsage(); exit(-1); } exit(0); }