ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Got Registry access working, really stupid reason it wasn't working =P (Sdk)
Got Registry access working, really stupid reason it wasn't working =P // Sdkandon m. colemanAug 4, 1999, 5:31pm
Primer on "_T" written at the bottom . . .
It wasn't working because I had these lines under the InitInstance OLE FAILURE CHECK . . . EXAMPLE OF HOW DO DO THIS : // Use this line under InitInstance() SetRegistryKey (_T ("Company Name Here")); // These lines wherever you need them . . . CWinApp::WriteProfileInt (_T ("Sub Key Name Here"),_T ("Sample Data"), INT GOES HERE); CWinApp::WriteProfileString (_T ("Sub Key Name Here"),_T ("Sample Data)",_T ("Sample VALUE")); That works great, and it's EASIBLY convertable between Win98 and NT . . .. That's why the _T is there, to make the string neutral, so that it can be made into Unicode if you decide to port the program to NT or Win2K Reason this may come in handy : Windows NT, and any versions of Windows newer than 98 use an international standard character set called Unicode (16 Bit), whereas Windows 98 and previous version use ANSI (8 Bit) . . . Anyway, Windows NT and Windows 2000+ are backward compatible with ANSI (They would HAVE TO BE!!!), but it causes a performance hit while converting from ANSI to Unicode. Anyway, I'm told that sometimes you run into problems when writing to the System Registry in NT using ANSI . . . -Thanks, Andon Coleman |