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()	
[VB6/VBA]
Dim nRet As Long
nRet = API_LicenceType(API_GEN_PLATFORM)
[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()
[VB6/VBA]
Dim nLen As Long
Dim strPlatform As String
nLen = API_ModuleName("", 0, API_GEN_PLATFORM)
strPlatform = String(nLen, " ")
nLen = API_ModuleName(strPlatform, Len(strPlatform), API_GEN_PLATFORM)
char buf[6];
nRet = API_ModuleName(buf, sizeof(buf)-1, 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]

[PREV: Win64 (X64) Platform...]   [Contents]   [Index]   
   [NEXT: Visual Basic or Visual Basic: VB6 vs VB.NET...]

Copyright © 2001-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-01-07T07:42:00Z.