|
Wine can be detected using (quote from mailing list):
FWIW, it's kernel32.wine_get_unix_file_name(). So it's available to any
Win32 application that knows about it. Just LoadLibrary()+GetProcAddress().
One of projects using it is http://www.jtagtest.com/[^]
|
|
|
|
|
Is it possible to detect Windows XP Proffessional and Windows XP Home Edition and all versions of Vista? if so, How?
|
|
|
|
|
Bro,
I'm unable to open the .exe file,
error pop-up "This application has failed to start because MFC42D.dll was not found. Re-installing the application may fix this problem."
Im using XP home edition and student in Malaysia. Pls help.
|
|
|
|
|
How do you go in determining if the OS is a 64bit or 32bit? Example: Windows XP 64 and Windows XP
|
|
|
|
|
this samples can't detect Winodws 2k3 and if in the future there have a lastest version? How can i get it?
|
|
|
|
|
What if I don't have mfc42d.dll (debug version) ? On a XP SP2 computer (for example) you only have mfc42.dll.
|
|
|
|
|
the project was compiled in debug mode, recompile it in release and you're done.
|
|
|
|
|
Also note that you can distinguish between Pro and Server flavors of Windows 2000 by checking the following registry key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ProductOptions
under this key, ProductType will have the value "WinNT" for Win2K Pro and "ServerNT" for Win2K Server.
|
|
|
|
|
Hi all,
My app is replace gina.dll and using smart-card for logging on. I tested my app under Windows 2000 and it 's OK but since I run it under Windows Xp, my app cannot catch events of smart-card (insertion,removal). Does anyone have exprience in gina and smart-card ?
i will thank any advise.
Regards.
THIEU Anh-Van
Programmer - VNTeam Company
Room No 408,123 Truong Dinh st,Dist. 3,HCM City,Viet Nam
Tel: +84 (8) 932 1045
E-Mail vthieuanh@yahoo.com
|
|
|
|
|
Hi!
I have to modify the Gina.dll of Windows XP for smart card logon. I have a Windows XP with a smart card reader and I'm connected to a Windows Server 2003 configured with certificate server. All these works well and when I got the logon procedure on my Windows XP, I have two possibilities :
- Normal logon (Ctrl - ALt - Del) with user name and password.
- Smart Card logon (Insert a smart card in the reader) with a PIN code.
Smart card logon doesn't work because I have a bad certificate on my smart card. So I have to modify the Gina.dll to get a good certificate on the Windows XP computer(It's already installed) in place to get the bad certificate on the smart card.
Many people modify the gina.dll but nobody says where to start. Do I have to do everything, I mean a complete new gina.dll by myself or can I find somewhere some source codes or samples to help me ?
If someone can help me... Thanks
Lord Neo
|
|
|
|
|
Good day!
How can this be done remotely?
I need something like this, but I need to get the information from as remote machine.
a total newbie
newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie newbie
|
|
|
|
|
Code-snipplet from my code: ShowEntry is not defined here: it stores the information into a file...
static const char *szTitleOperatingSystem = "OperatingSystem";
static const char *szEntryOperatingSystem = "OperatingSystem";
static const char *szEntryWinVersionWin32s = "Microsoft Win32s";
static const char *szEntryWinVersionWin95 = "Windows 95";
static const char *szEntryWinVersionBuild = "Build";
static const char *szEntryWinVersionOSR2 = "OSR2";
static const char *szEntryWinVersionWin98 = "Windows 98";
static const char *szEntryWinVersionSE = "Second Edition";
static const char *szEntryWinVersionWinME = "Windows ME";
static const char *szEntryWinVersionWinMEPlus = "> Windows ME";
static const char *szEntryWinVersionNT4Templ = "Windows NT %d.%d";
static const char *szEntryWinVersionWin2000 = "Windows 2000";
static const char *szEntryWinVersionXP = "Windows XP";
static const char *szEntryWinVersionXPPlus = "Windows (%s) %d.%d";
static const char *szEntryWinVersionServicePack = "ServicePack";
static const char *szEntryWinVersionWorkstation = "Workstation";
static const char *szEntryWinVersionServer = "Server";
static const char *szEntryWinVersionDomainController = "Domain Controller";
static const char *szEntryWinEdition = "Edition";
static const char *szEntryWinEditionSmallBusiness = "SmallBusiness";
static const char *szEntryWinEditionEnterprise = "Enterprise";
static const char *szEntryWinEditionBackOffice = "BackOffice";
static const char *szEntryWinEditionCommunication = "Communication";
static const char *szEntryWinEditionTerminalServices = "TerminalServices";
static const char *szEntryWinEditionSmallBusinessR = "restricted SmallBusiness";
static const char *szEntryWinEditionembeddedNT = "embedded NT";
static const char *szEntryWinEditionDataCenter = "DataCenter";
static const char *szEntryWinEditionTerminalServices1User = "TerminalServices (SingleUser)";
// ...
// Major Minor Build Platform CSDVersion
// NT 3.51 3 51 1057 VER_PLATFORM_WIN32_NT "Service Pack 5"
// NT 4.0 4 0 1381 VER_PLATFORM_WIN32_NT "Service Pack 3"
// Win95 4 0 950 VER_PLATFORM_WIN32_WINDOWS ""
// Win98 4 >0 ?? VER_PLATFORM_WIN32_WINDOWS ""
// Win31+Win32s ? ? ? VER_PLATFORM_WIN32s ?
OSVERSIONINFO osv;
OSVERSIONINFOEX2 osv2;
BOOL bOsVersionInfoEx;
char szTemp[2*_MAX_PATH];
char path[2*_MAX_PATH];
int erg;
osv.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
::GetVersionEx(&osv);
// Plattform
switch(osv.dwPlatformId)
{
case VER_PLATFORM_WIN32s:
// OperatingSystem
ShowEntry(pFile, szDelim, szEntryOperatingSystem, szEntryWinVersionWin32s);
break;
case VER_PLATFORM_WIN32_WINDOWS:
// OperatingSystem
// Build
if( osv.dwMinorVersion < 10 )
{
ShowEntry(pFile, szDelim, szEntryOperatingSystem, szEntryWinVersionWin95);
ShowEntry(pFile, szDelim, szEntryWinVersionBuild,
((osv.szCSDVersion[1]=='C') ? szEntryWinVersionOSR2 : szNo));
}
else if ( osv.dwMinorVersion < 90 )
{
ShowEntry(pFile, szDelim, szEntryOperatingSystem, szEntryWinVersionWin98);
ShowEntry(pFile, szDelim, szEntryWinVersionBuild,
((osv.szCSDVersion[1]=='A') ? szEntryWinVersionSE : szNo));
}
else if ( osv.dwMinorVersion == 90 )
{
ShowEntry(pFile, szDelim, szEntryOperatingSystem, szEntryWinVersionWinME);
ShowEntry(pFile, szDelim, szEntryWinVersionBuild, szUnknown);
}
else
{
ShowEntry(pFile, szDelim, szEntryOperatingSystem, szEntryWinVersionWinMEPlus);
ShowEntry(pFile, szDelim, szEntryWinVersionBuild, szUnknown);
}
break;
case VER_PLATFORM_WIN32_NT:
// OperatingSystem
// Build
// ServicePack
// Edition
ZeroMemory(&osv2, sizeof(OSVERSIONINFOEX2));
osv2.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX2);
bOsVersionInfoEx = GetVersionEx( (LPOSVERSIONINFO) &osv2);
if( osv.dwMajorVersion <= 4 )
{
sprintf(szTemp, szEntryWinVersionNT4Templ, osv.dwMajorVersion, osv.dwMinorVersion);
ShowEntry(pFile, szDelim, szEntryOperatingSystem, szTemp);
}
else if( osv.dwMajorVersion == 5 && osv.dwMinorVersion <= 1 )
{
if( osv.dwMinorVersion == 0 )
ShowEntry(pFile, szDelim, szEntryOperatingSystem, szEntryWinVersionWin2000);
else ShowEntry(pFile, szDelim, szEntryOperatingSystem, szEntryWinVersionXP);
}
else
{
sprintf(szTemp, szEntryWinVersionXPPlus, szUnknown, osv.dwMajorVersion, osv.dwMinorVersion);
ShowEntry(pFile, szDelim, szEntryOperatingSystem, szTemp);
}
sprintf(szTemp, "%d", osv.dwBuildNumber & 0xFFFF);
ShowEntry(pFile, szDelim, szEntryWinVersionBuild, szTemp);
ShowEntry(pFile, szDelim, szEntryWinVersionServicePack, osv.szCSDVersion);
if( bOsVersionInfoEx )
{
switch( osv2.wProductType )
{
case VER_NT_WORKSTATION: strcpy(szTemp, szEntryWinVersionWorkstation); break;
case VER_NT_SERVER: strcpy(szTemp, szEntryWinVersionServer); break;
case VER_NT_DOMAIN_CONTROLLER: strcpy(szTemp, szEntryWinVersionDomainController);break;
default: *szTemp = '\0'; break;
}
if( osv2.wSuiteMask & VER_SUITE_SMALLBUSINESS )
{
if( *szTemp ) strcat(szTemp, ", ");
strcat(szTemp, szEntryWinEditionSmallBusiness);
}
if( osv2.wSuiteMask & VER_SUITE_ENTERPRISE )
{
if( *szTemp ) strcat(szTemp, ", ");
strcat(szTemp, szEntryWinEditionEnterprise);
}
if( osv2.wSuiteMask & VER_SUITE_BACKOFFICE )
{
if( *szTemp ) strcat(szTemp, ", ");
strcat(szTemp, szEntryWinEditionBackOffice);
}
if( osv2.wSuiteMask & VER_SUITE_COMMUNICATIONS )
{
if( *szTemp ) strcat(szTemp, ", ");
strcat(szTemp, szEntryWinEditionCommunication);
}
if( osv2.wSuiteMask & VER_SUITE_TERMINAL )
{
if( *szTemp ) strcat(szTemp, ", ");
strcat(szTemp, szEntryWinEditionTerminalServices);
}
if( osv2.wSuiteMask & VER_SUITE_SMALLBUSINESS_RESTRICTED )
{
if( *szTemp ) strcat(szTemp, ", ");
strcat(szTemp, szEntryWinEditionSmallBusinessR);
}
if( osv2.wSuiteMask & VER_SUITE_EMBEDDEDNT )
{
if( *szTemp ) strcat(szTemp, ", ");
strcat(szTemp, szEntryWinEditionembeddedNT);
}
if( osv2.wSuiteMask & VER_SUITE_DATACENTER )
{
if( *szTemp ) strcat(szTemp, ", ");
strcat(szTemp, szEntryWinEditionDataCenter);
}
if( osv2.wSuiteMask & VER_SUITE_SINGLEUSERTS )
{
if( *szTemp ) strcat(szTemp, ", ");
strcat(szTemp, szEntryWinEditionTerminalServices1User);
}
if( osv2.wSuiteMask & VER_SUITE_PERSONAL )
{
if( *szTemp ) strcat(szTemp, ", ");
strcat(szTemp, szEntryWinEditionPersonal);
}
if( osv2.wSuiteMask & VER_SUITE_SERVERAPPLIANCE )
{
if( *szTemp ) strcat(szTemp, ", ");
strcat(szTemp, szEntryWinEditionServerAppliance);
}
if( ! *szTemp )
strcpy(szTemp, szNo);
ShowEntry(pFile, szDelim, szEntryWinEdition, szTemp);
}
else
{
HKEY hKey;
char szProductType[80];
DWORD dwBufLen;
RegOpenKeyEx( HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\ProductOptions", 0, KEY_QUERY_VALUE, &hKey );
RegQueryValueEx( hKey, "ProductType", NULL, NULL, (LPBYTE) szProductType, &dwBufLen);
RegCloseKey( hKey );
if ( lstrcmpi( "SERVERNT", szProductType) == 0 )
strcpy(szTemp, szEntryWinVersionServer);
else if ( lstrcmpi( "WINNT", szProductType) == 0 )
strcpy(szTemp, szEntryWinVersionWorkstation);
else strcpy(szTemp, szProductType);
if( ValidateProductSuite("Terminal Server") )
{
strcat(szTemp, ", ");
strcat(szTemp, szEntryWinEditionTerminalServices);
}
ShowEntry(pFile, szDelim, szEntryWinEdition, szTemp);
}
break;
default: ShowEntry(pFile, szDelim, szEntryOperatingSystem, szUnknown);
break;
}
// ...
|
|
|
|
|
Thanks for your information
|
|
|
|
|
I don't care what the other posts say, I found this code to be very helpful and was able to immediately incorporate it into a couple of applications.
Thanks.
- Phil
MCSE+I, MCSD, MCDBA
|
|
|
|
|
Thanks for your comment
|
|
|
|
|
I find that typing "ver" from the cmd prompt works well for my purposes.
|
|
|
|
|
I knew it...
but sometimes, we need to know version OS using program application
in order to our program can run properly.
I think you know it.....
|
|
|
|
|
"ver" won't give you the NT service pack. Agus's code does.
|
|
|
|
|
Two things - Windows ME is missing and if the code is ever run on a successor to XP it will show it as Windows NT. Windows NT should only be shown if the major version is less than 5. This is the kind of approach that will break an application with every new OS released.
|
|
|
|
|
I just changed code for Windows Me and NT.
for newest Windows version, I couldn't predict the naming of that OS , but we can get version from values of The OSVERSIONINFO data structure ie. dwMajorVersion and dwMinorVersion.
|
|
|
|
|
Yep, the future naming is a problem but I think we can be sure it is not going to be called Windows NT again
|
|
|
|
|
Consider the source, Agus. Here you show generally how to do it by giving the code. And all Jerry III knows is how to be a critic. If you had distributed binary code which was fallible, then Jerry might have a point, but if you distribute your code, and Jerry can't manipulate it to suit his needs, then Jerry is stupid.
Good work anyway - ignore Jerry who thinks he can do no wrong.
|
|
|
|
|
|
Thanks for your information.
I'll modify my article.
Agus Kurniawan;)
|
|
|
|
|