CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 5 of 5

Thread: Get smbios structure

  1. #1
    Join Date
    Aug 2001

    Unhappy Get smbios structure


    I wanna get the smbios structure in Win32 environment (95-Xp)
    I heard four methods to do this:

    1. Use direct memory access. Smbios information stores from 0x0000f000, we can parse this area into useful data. But it can't be implemented with 32bits application in NT+ envirnoment because of OS's access protection.

    2. Use driver in NT+ or vxd in 95/98

    3. Run 16bits application

    4. Use WMI

    I wanna make a application to get smbios structure without driver, and it can be used at every platform. I can't use WMI because some OS have no WMI support (95/98/NT)

    Can someone give me a little advice?

    I have some source codes to dump bios written in assembly and dephi, but I can't use those resources in C/C++/VC++..

  2. #2
    Join Date
    Dec 2002
    You don't need to write a driver to access physical memory (this question has been asked multiple times on this forum):


  3. #3
    Join Date
    Aug 2001
    Thanks, Dan ..

    I had tried the url you mentioned.
    One is invalid and I had tested another link's sample code.

    #include <windows.h>
    namespace NT {extern "C" {
    #include <ntddk.h>
    using NT::NTSTATUS;
    int main(int argc, char* argv[])
    HANDLE hSect;
    WCHAR s[] = L"\\Device\\PhysicalMemory";
    NT::UNICODE_STRING name = {sizeof s - sizeof (WCHAR), sizeof s, s};
    NT::OBJECT_ATTRIBUTES oa = {sizeof oa, 0, &name, OBJ_CASE_INSENSITIVE, 0, 0};
    NT::ZwOpenSection(&hSect, SECTION_MAP_READ, &oa);
    PVOID p = MapViewOfFile(hSect, FILE_MAP_READ, 0, 0, 0x400);
    return 0;

    I could build and link successfully, but the binary can't be executed because of normal initialization error (0xc0000005)

    What's wrong?

    My programming envirnemnt is Win2k + VC6 + PlatformSDK + NTDDK.

    Could you show me the sample codes of your own if you have?

  4. #4
    Join Date
    Dec 2002
    Both URLs worked OK for me.
    I remember I used physmem long time ago and didn't encounter any problems. It comes with full source code:


  5. #5
    Join Date
    Aug 2001
    The sample project works smoothly.

    The url is ok, that was my ISP's problem.

    Thanks for your help, the code encourages me a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)