Because SetNatTx is such a simple program, I am also posting the source code. The program is written in C++. If you want to compile the program yourself, you will need both the C++ file and the DEF file which tells Windows which functions to export.
|
| (You do not need this source code to use SetNatTx or to understand how it works.) |
|
| ---------------------------------------------setnattx.cpp--------------------------------------------- |
|
| int APIENTRY DllMain( HINSTANCE, DWORD, LPVOID ) |
|
| int WINAPI SetNaturalText( LPSTR pszState ) |
|
| bSet = ( *pszState == '1' || *pszState == 't' || |
|
| 0 == stricmp( pszState, "on" ) ); |
|
| "Software\\Dragon Systems\\NaturalText", |
|
| if( rc == ERROR_SUCCESS ) |
|
| hKey, "Enable Global Dictation", 0, REG_SZ, |
|
| (const BYTE *)( bSet ? "1" : "0" ), |
|
| if( rc != ERROR_SUCCESS ) |
|
| "Unable to access the Dragon NaturallySpeaking registry" |
|
| " (code = 0x%x)\r\n\r\nThis utility will only work with" |
|
| " Dragon NaturalText Version 2.", |
|
| 0, szBuffer, "SetNaturalText Error", |
|
| MB_ICONWARNING | MB_OK ); |
|
| ---------------------------------------------setnattx.def--------------------------------------------- |
LIBRARY SetNatTx
DESCRIPTION 'Change the state of NatutalText'
SECTIONS
EXPORTS
SetNaturalText @1
------------------------------------------------------------------------------------------------------ |