?? riltestpoint.cpp
字號:
//--------------------------------------------------------------------------------------------
// Revision History
//
// Date Author Activity ID Activity Headline
// 2006-04-04 qianyili CEDB00012591 在查看通話記錄界面時,沒有任何內容顯示
//--------------------------------------------------------------------------------------------
#include <windows.h>
#include <ril.h>
#include "tf_rildrv.h"
//declare
typedef struct detailedrildevspecific_tag {
DWORD cbSize; // @field structure size in bytes
DWORD dwDevSpecificCommand; // one of the RIL_DEVSPECIFICPARAM_ that require data
PVOID lpData; // pointer to data specific to dwDevSpecificCommand
} DETAILEDRILDEVSPECIFIC, *LPDETAILEDRILDEVSPECIFIC;
void run(void);
/// Cit main entry function
/// taking four arguments without return value
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPWSTR lpszCmdLine, int nCmdShow)
{
Sleep(500);
run();
return 0;
}
//------------------------------------------------------------------------------
//
// Function: pfnResult
//
// This function is a parameter for RIL_Initialize
//
void CALLBACK pfnResult ( DWORD dwCode, HRESULT hrCmdID, const void* lpData, DWORD cbData, DWORD dwParam)
{
}
//------------------------------------------------------------------------------
//
// Function: pfnNotify
//
// This function is a parameter for RIL_Initialize
//
void CALLBACK pfnNotify(DWORD dwCode, const void* lpData, DWORD cbData, DWORD dwParam)
{
}
///------------------------------------------------------------------------------
//
// Function: SwichOffGsmS
//
// This function do actions for switching off gsm subsystem
//
void run(void)
{
HRIL hRil = NULL;
HRESULT hr = E_FAIL;
DETAILEDRILDEVSPECIFIC devspec;
DWORD dwNotificationClasses = RIL_NCLASS_DEVSPECIFIC;
hr = RIL_Initialize(1, (RILRESULTCALLBACK )pfnResult, (RILNOTIFYCALLBACK)pfnNotify, dwNotificationClasses, 0, &hRil);
if(FAILED(hr)) goto Error;
//Invoke RIL_DevSpecific with param cmd:RIL_DEVSPECIFICPARAM_ENTER_HOME;
devspec.cbSize = sizeof(DETAILEDRILDEVSPECIFIC);
devspec.dwDevSpecificCommand = RIL_DEVSPECIFICPARAM_ENTER_HOME;
devspec.lpData = NULL;
RIL_DevSpecific(hRil, (BYTE *)&devspec, sizeof(DETAILEDRILDEVSPECIFIC));
Error:
if ( hRil ) RIL_Deinitialize(hRil);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -