|
-
October 18th, 2005, 06:23 AM
#1
Retrieving Version of IE
Hi there,
i'm looking for a way to retrieve the current version of the Internet Explorer
from a CHtmlView ( or from other sources ).
Backround is:
I want to use direct printing (without user request ) from a CHtmlView via
Code:
MyHtmlView->ExecWB( OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER , NULL, NULL );
Curiously this worked until IE-Version 4.0,
didn't work in IE-Version 5.0 ( Here OLECMDID_DONTPROMPTUSER is ignored and the user is prompted ever ),
and now works again since IE-Version 5.5.
Any ideas ?
Thanks in advance,
Matze
-
October 18th, 2005, 06:53 AM
#2
Re: Retrieving Version of IE
-
October 18th, 2005, 07:17 AM
#3
Re: Retrieving Version of IE
yes as VictorN told you you can follow that method.or you can directly read from registry just check in the registry.for each software OS makes entry in registry.so either read from registry or follow that method
or just follow this link it will help you
http://www.codeguru.com/forum/showth...oto=nextoldest
-
October 18th, 2005, 07:33 AM
#4
Re: Retrieving Version of IE
Hi Victor, hi humtpydumpty,
thank you very much for your fast replies.
GetFileVersionInfo is difficult to use, as first i have to find out where IE is installed ( also take into account which language is my win etc. ).
So i used the registry thing. Quite easy in my opinion.
Code:
HKEY hKey;
char szVersion[ 80 ];
DWORD dwBufLen = 80;
LONG lRet;
if ( RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Internet Explorer",
0, KEY_QUERY_VALUE, &hKey ) != ERROR_SUCCESS )
{
return FALSE;
}
if ( RegQueryValueEx( hKey, "Version", NULL, NULL,
(LPBYTE) szVersion, &dwBufLen) != ERROR_SUCCESS )
{
return FALSE;
}
RegCloseKey( hKey );
// Now szVersion should contain the version
Thanks again,
Matze
-
October 18th, 2005, 08:00 AM
#5
Re: Retrieving Version of IE
u welcome
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|