This function enables or disables the log-to-file debug mode
void DebugMode(
bool state
);
Parameters
state
Boolean that specifies whether to enable or disable the debug mode. If this parameter is 1, the debug mode is enabled. If the parameter is 0, the debug mode is disabled
Return values
None.
Remarks
If debug mode is enabled, a file named \\dynrildll.txt will be created in the root of the mobile device file structure, and several pieces of information will be logged there.
Sample
// Application entry point
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
// Load the RIL Library
if (LoadDynRILDll(TEXT("\\DynRILDll.dll")) != ERROR_SUCCESS) {
MessageBox(0, TEXT("Cannot load DynRILDll.dll . Try to reinstall this sample."), TEXT(""), MB_ICONERROR);
return 0;
}
DebugMode(1);
// Init the Library network component
if (NetworkInit() != ERROR_SUCCESS) {
UnloadDynRILDll();
MessageBox(0, TEXT("Error using the network, does this device have a phone module?"), TEXT(""), MB_ICONERROR);
return 0;
}
// Set callback for events
SetNetworkEventCallback((tpfnCallback)PhoneCallback);
...
NetworkDeinit();
UnloadDynRILDll();
...
Requirements
OS Versions: Windows CE 1.0 and later.
Header: dynril.h.
Dll Library: dynrildll.dll.