CryptoSys API Library Manual

Detecting Win32 or X64 platform

This test returns 1 if the core DLL is Win64 (X64) or 0 if Win32:

[C#]
int n = General.IsWin64();	
[VB.NET]
n = General.IsWin64()	
[C/C++]
long nRet;
nRet = API_LicenceType(API_GEN_PLATFORM);

To get the platform as a string, either "Win32" or "X64", do this:

string s = General.Platform();	
s = General.Platform()
char buf[6];
nRet = API_ModuleName(buf, sizeof(buf), API_GEN_PLATFORM);

Remember, the "platform" these tests show is the platform of the core DLL that the system is using. WoW64 (Windows-on-Windows 64-bit) manages 64-bit and 32-bit applications transparently on a Windows 64-bit operating system.

[Contents] [Index]

[HOME]   [NEXT: Visual Basic or Visual Basic: VB6 vs VB.NET...]

Copyright © 2001-9 D.I. Management Services Pty Ltd. All rights reserved.