Jump to content

Mijzelf

Member
  • Posts

    464
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    country-ZZ

Everything posted by Mijzelf

  1. When it's browser sniffing, maybe you can use the 'F12->Edit site preferences->Network->Browser identification->Mask as Internet Explorer' trick. After a refresh (F5) the site should 'think' you're using IE.
  2. You should compile your software using the '-v' option. Then you should have a sourcelevel debugger. About the execeptions, maybe you should change something in the 'Options->Exceptions' settings. The debugger should ignore the exceptions, and if it can't/won't, you should be able to push 'F9' in order to let the program continue to the breakpoint.
  3. I think so. It runs on W95A, but I had to install 'Windows Installer 2.0' due to a lacking msi.dll. (Beats me where Opera needs it for). Further I had to download the 'Classic installer' version of Opera, which is a bit harder to find, because the default installer wanted me to install IE 3.1 first. (!). And of course Opera is complaining about a missing or too old Msimg32.dll, just like v9.5 did. But it runs fine. So far the only problem I have seen is a font problem in the Transfers window. All numbers (download size, -speed) are just greek. (Take that, Mozilla, OpenOffice.org and AbiWord!)
  4. What shall I say? You must be mistaken. One of the if-statements have to evaluate differently. A debugger should be handy. You can add some tracing lines: #include <stdarg.h> void DoTrace( const char *format, ... ) { static char Buffer[ 512 ]; va_list ap; va_start( ap, Format ); _vsnprintf( Buffer, sizeof( Buffer ), Format, ap ); OutputDebugString( Buffer ); va_end( ap ); } #ifdef _DEBUG # define TRACE DoTrace #else # define TRACE // #endif int replaceText(char *findWhat, char *replaceWith, BOOL bWholeWord, BOOL bMatchCase, BOOL bSearchDown) { CHARRANGE cr; int foundText = 0; SendMessage(g_hRichEdit, EM_EXGETSEL, 0, (LPARAM) &cr); TRACE( "(%u): cr.cpMin == cr.cpMax => %u\n", __LINE__, cr.cpMin == cr.cpMax ); if (cr.cpMin == cr.cpMax) foundText = searchText(findWhat, bWholeWord, bMatchCase, bSearchDown); else { CHARRANGE crText; FINDTEXTEX ftex; ftex.chrg = cr; ftex.chrgText = crText; ftex.lpstrText = findWhat; SendMessage(g_hRichEdit, EM_FINDTEXTEX, 0, (LPARAM) &ftex); TRACE( "(%u): ftex.chrgText.cpMin == cr.cpMin && ftex.chrgText.cpMax == cr.cpMax => %u\n", __LINE__, ftex.chrgText.cpMin == cr.cpMin && ftex.chrgText.cpMax == cr.cpMax ); if (ftex.chrgText.cpMin == cr.cpMin && ftex.chrgText.cpMax == cr.cpMax) { MessageBox(NULL, "About to replace!", "Kladblok", MB_OK); SendMessage(g_hRichEdit, EM_REPLACESEL, TRUE, (LPARAM) replaceWith); } foundText = searchText(findWhat, bWholeWord, bMatchCase, bSearchDown); } return foundText; }You can catch the output of OutputDebugString with DebugView, which is a tool from SysInternals. Alas Mark Russinovich is dumping all W9x support from his tools, but happily the old versions are still available at archive.org: http://web.archive.org/web/20050105011752/...debugview.shtml. (BTW, _vsnprintf is an MS function. You'll have to find the Borland equivalent.)
  5. This is an ansi richedit? Does it reach the messagebox? Long shot: sometimes it helps to put a double 0 at the end of a string, when observing weird behaviour.
  6. According to RegMon the RunOnce keys aren't parsed by msconfig. So you could place your program in HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce or HKCU\... Of course you'll have to reput it there after each boot. This is not recommended by MS, and I wouldn't be surprised if a virus- or malware scanner would alarm on this behaviour.
  7. According to Steve Gibson a typical Windows user never needs DCOM, so probably you won't even notice it's switched off
  8. I forgot the 3rth possibility. It's not yet filled. You read g_szFileName in WM_CREATE, which is called inside CreateWindowEx() in WinMain(). g_szFileName is filled after this.FYI, I didn't see this directly, so I did some debugging-without-debugger magic. I exchanged char *g_szFileName[MAX_PATH] = ""; by #define _DEBUG #ifdef _DEBUG char *fun_szFileName(int line) { static char _szFileName[MAX_PATH] = ""; char buf[ 16 ]; MessageBox( 0, itoa( line, buf, 10 ), "szFileName", MB_OK ); return szFileName; } #define g_szFileName fun_szFileName(__LINE__) #else char *g_szFileName[MAX_PATH] = ""; #endifNow it's easy to see when and from where g_szFileName is accessed. For more complex problems you'd better use a logfile instead of a messagebox.
  9. There is a difference between v1 and v2: http://msdn.microsoft.com/en-us/library/bb788009(VS.85).aspx. Did that bite you? Then it's overwritten or hidden by another variable. Did you declare some array directly before or after g_szFileName? Check if you don't exceed their bounds. You don't have a debugger, I suppose?
  10. Have a look here:http://en.wikipedia.org/wiki/UTF-8#Description UTF-8 uses 1,2,3 or 4 bytes a character depending on the numerical value of the (unicode) character. When saving a file in UTF-8, notepad will add a header 0xEF 0xBB 0xBF. A file starting with this sequence you can consider UTF-8 encoded. Another file *might* be UTF-8 encoded too, but there's no way to be be sure. Read this. Ansi is a 'strange' standard (actually it isn't a standard), so the best way to convert Ansi to UTF-8 is converting it to unicode with MultibyteToWideChar, and then convert this to UTF-8.
  11. SICA, the most used weapon by the Thracian gladiators in ancient Rome. SIKA, an ethnic group in Indonesia. SAKA, a town in Japan
  12. I *think* you should use SendMessageW and PostMessageW for all messages containing or retreiving stringdata, and use the widestring variant of the structs. SendMessageW( hwnd, WM_SETTEXT, 0, (LPARAM) L"Text" ); wchar_t buffer[ 32 ]; SendMessageW( hwnd, WM_GETTEXT, 32, (LPARAM)buffer ); FINDTEXTW ft = { ... }; SendMessageW( hwnd, EM_FINDTEXT, FR_DOWN, (LPARAM) &ft );
  13. echo %password% | md5sum -c password.md5if errorlevel goto penalty
  14. Maybe you can use ANSI escape sequences to set the foreground and background color the same.
  15. AFAIK that is only for SD cards, and the problem is the cardreader, not the OS. For the OS the same driver (USB mass storage) is used for both flash memory and external harddisks. So a 2GB limit would be very inconvenient.
  16. W95 OSR2 supports FAT32. So theoretically the first limit is 2 TiB. (At 2TiB you've got 2^32 sectors on the Mass Storage Device)
  17. Is it possible that you're just facing the spinup delay of the disk?
  18. Is the stick visible in the devicemanager? If it is visible, but has an exclamation mark, then you can try to load the driver by hand. Select properties, choose update driver, select 'No, select from a list', select 'Show all hardware', and point to the driver. I suppose it's called 'USB mass storage driver', or something like that.
  19. PILY, like pile or wool. PILA, a town in Poland. SILA, a city in the United Arab Emirates. ŠAĽA, a city in Slovakia. SABA, an island of the Netherlands Antilles, containing the highest point (877 m) of the Kingdom of the Netherlands
  20. Well, maybe. There is an option for W2000, but I don't know if it will work for XP. Have a look here, and read '3.10.2.4 Windows 2000 shutdown'
  21. There are two ways to enter a wep key. Typing a hexadecimal code, or typing an alphanumeric passphrase. This passphrase is converted internally to a hexadecimal code. It's not a good idea to use the passphrase option, since the algorithm which does the conversion is not standardized. So different brand NIC can use different algorithms, generating a different key. 64 bits wep uses a 40 bit (10 hexadecimal characters) key. The remaining 24 bits are created internally. The same is true for wep 128 and 104 bit (26 hex characters).If you have the choice, you should not use wep, but wpa, or even better wpa2. Wep can be cracked in minutes, these days.
×
×
  • Create New...