Problems in paradise. I’ve searched for hours on how to start the restoration to the factory defaults, since ctrl+f11 is not working on a vista laptop. finally, found this post
http://www.notebookforums.com/thread196615.html
where the guy says that you shoul dgo into advanced boot menu (F8) and choose repair. you’ll have to log on as a local user (admin) and then choose the last option with factory image restore.
Dell PC Restore on a vista laptop
October 15th, 2007Changing icon resource with madshis madres
October 12th, 2007provide proper language and everything should work just fine.
[code:1:91ed9b735b]
function UpdateExeIcon(exeFile, iconGroup, icoFile: string; language: word) : boolean;
var resUpdateHandle : dword;
c:TPIconGroup;
begin
resUpdateHandle := BeginUpdateResourceW(PWideChar(wideString(exeFile)), false);
if resUpdateHandle <> 0 then
begin
if (icongroup=’MAINICON’) or GetIconGroupResourceW(resUpdateHandle, PWideChar(wideString(iconGroup)), language, c) then
result := LoadIconGroupResourceW(resUpdateHandle, PWideChar(wideString(iconGroup)), language, PWideChar(wideString(icoFile)))
else
if StrToIntDef(iconGroup, -1)>-1 then
result := LoadIconGroupResourceW(resUpdateHandle, PWideChar(pointer(strtoint(iconGroup))), language, PWideChar(wideString(icoFile)))
else
result := false;
result := EndUpdateResourceW(resUpdateHandle, false) and result;
end else
result := false;
end;
[/code:1:91ed9b735b]
Related posts
Delphi IDE: the mistery of the blue dots unveiled
October 9th, 2007Evry once in a while, you see those blue dots in wrong position. Usually, a few lines up/down then they should be. Executing in debug mode will also put the current executing line wrong. You will see that you enter a procedure and you are executing some lines from the var declaration.
This pisses you off, doesn’t it? You just can’t figure out why that happens.
Well, let me tell you: your source file has some unix-style line endings. That is, it does not have a CRLF (#13#10) but only a LF (#10).
How to fix it? Depends on what you like really. From a hex editor to windows notepad, anything is ok. Open it and replace the single LFs with CRLFs and you’re done.
Not your specific case? Then maybe you are actually compiling in a unit file from another place and have loaded in the debugger the wrong file. Happens if you keep multiple versions of the same file on the search path.
There are of course other cases too, maybe when I recall, I’ll post./
Happy debugging 🙂
Related posts
Achieving the impossible with delphi: ISAPI
October 1st, 2007well, I am working on some ISAPI filter stuff and jsut bumped into the following MSDN article:
http://msdn2.microsoft.com/en-us/library/ms524610.aspx
[quote:0b1900ad51]
Both ISAPI filters and ISAPI extensions can only be developed using C/C++.
[/quote:0b1900ad51]
I can only say one thing: [img:0b1900ad51]http://forum.softpedia.com/style_emoticons/default/roll2.gif[/img:0b1900ad51]
Related posts
MySQL: Client does not support authentication protocol…
September 27th, 2007well, I am working on the dynamic part of the site(s). Each site has it’s own user/db and today I started on a new site so I obviously fired up mysql administrator adn created the db, table and all that and then created the user. Tested the site and got this in the logs:
[code:1:3f12d32fe1]
shmysql: Error opening mysql: Client does not support authentication protocol requested by server; consider upgrading MySQL client
[/code:1:3f12d32fe1]
so I fired up a console and tested from command line: smae thing. I chaged the user/pass/db for the otehr site: works.
well, after almost an hour of trying out stuff, I found this:
http://www.megalinux.net/archives/463.html
[quote:3f12d32fe1]
The Fix
This is because, the mysqlclient installed on the box does not use the same authentication protocol that the mysqlserver is using. You can either upgrade the client, or reset the root password using this
SET PASSWORD FOR user@localhost = OLD_PASSWORD(‘password’);
[/quote:3f12d32fe1]
it worked 🙂
Related posts
Atom/RSS(0.9,1.0,2.0/RDF in delphi
September 21st, 2007It took me a few days until I finally found a component to do the job right.
The following article might be of help as well to new kids: http://dn.codegear.com/article/31981
I used SimpleRSS from sourceforge, also mentioned in the above article.
I wrote myself a mini-parser for RSS 2.0. Maybe I’ll publish it sometime 🙂
Related posts
Malware zapper – trojan/worm/virus/etc
September 16th, 2007I’ve been dealing lately with some pretty werid malware that none of the online scan engines or some of the offilne AV softwares (free versions) or antispyware software (including adaware and spy bot search and destroy) were able to pick up. Yet, there they were and nomatter how you deleted teh file, it came back again. I made a small check with sysinternals process monitor and came up that the actual process doing the recreation was winlogon.exe (which was not altered in any way).
So, I booted up in safe mode, sorted the files from windows\system32 after size and started with the smaller ones workign my way up to the 4 kb limit. whatever exe/dll/sys/etc I found there that looked suspicios, I renamed. Rebooted the system and voila: everything is fine 🙂
so I made a small script to take care of the problems
[code:1:8f3c3b125d]
mz.bat
@echo off
rename C:\WINDOWS\system32\Dcache.bin !!_Dcache.bin
rename C:\WINDOWS\system32\dpnaddr.dll !!_dpnaddr.dll
rename C:\WINDOWS\system32\dpnlobby.dll !!_dpnlobby.dll
rename C:\WINDOWS\system32\fastopen.exe !!_fastopen.exe
rename C:\WINDOWS\system32\fixmapi.exe !!_fixmapi.exe
rename C:\WINDOWS\system32\igxpxa32.vp !!_igxpxa32.vp
rename C:\WINDOWS\system32\keyboard.drv !!_keyboard.drv
rename C:\WINDOWS\system32\l_except.nls !!_l_except.nls
rename C:\WINDOWS\system32\loadfix.com !!_loadfix.com
rename C:\WINDOWS\system32\LTWND_n.lib !!_LTWND_n.lib
rename C:\WINDOWS\system32\mmtask.tsk !!_mmtask.tsk
rename C:\WINDOWS\system32\mouse.drv !!_mouse.drv
rename C:\WINDOWS\system32\mscdexnt.exe !!_mscdexnt.exe
rename C:\WINDOWS\system32\netware.drv !!_netware.drv
rename C:\WINDOWS\system32\nw16.exe !!_nw16.exe
rename C:\WINDOWS\system32\redir.exe !!_redir.exe
rename C:\WINDOWS\system32\rnr20.dll !!_rnr20.dll
rename C:\WINDOWS\system32\share.exe !!_share.exe
rename C:\WINDOWS\system32\sound.drv !!_sound.drv
rename C:\WINDOWS\system32\sysprint.sep !!_sysprint.sep
rename C:\WINDOWS\system32\sysprtj.sep !!_sysprtj.sep
rename C:\WINDOWS\system32\system.drv !!_system.drv
rename C:\WINDOWS\system32\systray.exe !!_systray.exe
rename C:\WINDOWS\system32\termcap !!_termcap
rename C:\WINDOWS\system32\vga.drv !!_vga.drv
rename C:\WINDOWS\system32\vwipxspx.exe !!_vwipxspx.exe
rename C:\WINDOWS\system32\winoldap.mod !!_winoldap.mod
rename C:\WINDOWS\system32\winsock.dll !!_winsock.dll
rename C:\WINDOWS\system32\winspool.exe !!_winspool.exe
rename C:\WINDOWS\system32\wowdeb.exe !!_wowdeb.exe
rename C:\WINDOWS\system32\wowfax.dll !!_wowfax.dll
[/code:1:8f3c3b125d]
some of the fiels might be genuine windows files. I never checked. But for the last 2/3 months since I am using this method, nobody complained of problems.
however, my preferred way is not to rename the files, but to replace their content with ome readable text (like this file was inoculated) and remove eberybodys access rights. Why is this the best way? Well, pretty simple: I am dealing with people not able to take care of them selfves so the chances of re-infections are very high; but with this method, next time the same worm/trojan/etc wants to infect, it will not be able to since the desired filename will not be writable 🙂
it is an ugly way to get rid of the pests but it works.
Related posts
Mysql upgrade from 4.0 to 4.1
September 15th, 2007I was working on the new site engine (hehe, now you know it’s comming) and just stumbled into the problem of 4.0 not supporting subqueries in joins. not funny. so I made an upgrade. Had to upgrade perl and recompile php for this. bleah.
well, back to work.
Related posts
top.seo-links.org officially out of my system
September 14th, 2007there has been only problems lately with this service and I sent them an enail a few days ago but they did not answer. Ok I say, then you’re out!!! 😈
Related posts
An attempt was made to reference a token that does not exist
September 13th, 2007So I was working on this delphi project using TEmbeddedWB (and then switched to TWebBrowser) and at one point I made some modifications to the way the control was behaving and I started getting this idiotic dialog box with “about:blank An attempt was made to reference a token that does not exist” and seldom, an empty IE window appeared with about:blank in it.
Now, I tried disableing all dialogs, disable sounds, etc. For no avail. I even deleted ALL instances of the web control to make sure that is the faulty guy. I even set a custom dialog title to try and find the one with problems, BUT, I was erronuosly getting anotehr control as beeing the faulty one.
Finally, it hit me. I had made the following modification: I added an OnBeforeNavigate2 event in which I opened all pages in a separate window like this:
[code:1:fdfc080e35]
procedure TClientForm.mainChatWindowBeforeNavigate2(ASender: TObject;
const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
Headers: OleVariant; var Cancel: WordBool);
begin
cancel:=true;
BrowseTo(url, handle);
end;
[/code:1:fdfc080e35]
obviously, if you use it like this, when loading the default empty document you will … open it in a new window 🙂
the correct way to deal with this is:
[code:1:fdfc080e35]
procedure TClientForm.mainChatWindowBeforeNavigate2(ASender: TObject;
const pDisp: IDispatch; var URL, Flags, TargetFrameName, PostData,
Headers: OleVariant; var Cancel: WordBool);
begin
if sametext(url, ‘about:blank’) then
exit;
cancel:=true;
BrowseTo(url, handle);
end;
[/code:1:fdfc080e35]
what a waste.