⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 riltestpoint.cpp

📁 RIL 测试驱动程序模块源程序
💻 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 + -