Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to test a windows dll to determine if it is 32bit or 64bit?

Answer Posted / Ankit Agrawal

To check whether a Windows DLL is 32-bit or 64-bit, you can use the `IMAGE_FILE_MACHINE` structure defined in the WinNT.h header file. Here's an example code snippet using Visual C++:
```cpp
#include <windows.h>
#include <stdio.h>

BOOL Is32BitDll(const char *dllPath) {
IMAGE_FILE_HEADER imageFileHeader;
HANDLE file = CreateFileA(dllPath, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);

if (file == INVALID_HANDLE_VALUE) {
return false;
}

DWORD fileSize = GetFileSize(file, NULL);
ReadFile(file, &imageFileHeader, sizeof(IMAGE_FILE_HEADER), NULL, NULL);

CloseHandle(file);

return (imageFileHeader.Machine == IMAGE_FILE_MACHINE_I386); // returns true for 32-bit DLL
}
```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When will the next windows os come out?

883


What is the current version of windows 10?

933


How does registry work wedding?

879


How much does it cost for a copy of windows 10?

860


What is the latest windows operating system?

1040


How much does a copy of windows 10 cost?

890


What is the next windows after 10?

939


How much does a windows 10 license cost?

921


What is the next version of windows after 10?

965


What is the latest version of microsoft edge for windows 10?

892


What does it cost to upgrade to windows 10?

915


How do I add a google account to windows 10?

905