winternl.h compile error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gabriel

    winternl.h compile error

    Hi,

    I downloaded the last platform sdk which works with vc++ 6 (February
    2003): http://www.microsoft.com/msdownload/.../psdk-full.htm

    However im getting a strange error when i compile. what i do is the
    following:

    - Run this shortcut from the start menu to set variables: Set Windows
    XP 32-bit Build Environment (Retail).lnk

    - Open vc++ 6 and create a new Win32 Simple Application

    - Include winternl.h



    This is the code:

    #include "stdafx.h"
    #include <winternl.h>

    int APIENTRY WinMain(HINSTAN CE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow) {
    PROCESS_BASIC_I NFORMATION p;
    return 0;
    }



    When compiling i get these errors:

    error C2065: 'PROCESS_BASIC_ INFORMATION' : undeclared identifier
    error C2146: syntax error : missing ';' before identifier 'p'
    error C2065: 'p' : undeclared identifier



    The include is done correctly but still that (and any) member from the
    header isn't recognized.
    If i use other headers (just tried a couple) everything works fine.

    Any ideas?
  • Jack Klein

    #2
    Re: winternl.h compile error

    On Thu, 2 Oct 2008 19:55:29 -0700 (PDT), Gabriel
    <gabriel.manya@ gmail.comwrote in comp.lang.c++:
    Hi,
    >
    I downloaded the last platform sdk which works with vc++ 6 (February
    2003): http://www.microsoft.com/msdownload/.../psdk-full.htm
    >
    However im getting a strange error when i compile. what i do is the
    following:
    >
    - Run this shortcut from the start menu to set variables: Set Windows
    XP 32-bit Build Environment (Retail).lnk
    >
    - Open vc++ 6 and create a new Win32 Simple Application
    >
    - Include winternl.h
    >
    >
    >
    This is the code:
    >
    #include "stdafx.h"
    #include <winternl.h>
    >
    int APIENTRY WinMain(HINSTAN CE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow) {
    PROCESS_BASIC_I NFORMATION p;
    return 0;
    }
    >
    >
    >
    When compiling i get these errors:
    >
    error C2065: 'PROCESS_BASIC_ INFORMATION' : undeclared identifier
    error C2146: syntax error : missing ';' before identifier 'p'
    error C2065: 'p' : undeclared identifier
    >
    >
    >
    The include is done correctly but still that (and any) member from the
    header isn't recognized.
    If i use other headers (just tried a couple) everything works fine.
    >
    Any ideas?
    My idea is that you should ask in a Windows programming group.
    news:comp.os.ms-windows.program mer.win32 is a very good one.

    Nether of these headers is part of the C++ language, they are all
    Windows specific extensions. Non-standard extensions are off-topic
    here.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://c-faq.com/
    comp.lang.c++ http://www.parashift.com/c++-faq-lite/
    alt.comp.lang.l earn.c-c++

    Comment

    • Gabriel

      #3
      Re: winternl.h compile error

      On Oct 3, 1:43 am, Jack Klein <jackkl...@spam cop.netwrote:
      On Thu, 2 Oct 2008 19:55:29 -0700 (PDT), Gabriel
      <gabriel.ma...@ gmail.comwrote in comp.lang.c++:
      >
      >
      >
      Hi,
      >
      I downloaded the last platform sdk which works with vc++ 6 (February
      2003):http://www.microsoft.com/msdownload/.../psdk-full.htm
      >
      However im getting a strange error when i compile. what i do is the
      following:
      >
      - Run this shortcut from the start menu to set variables: Set Windows
      XP 32-bit Build Environment (Retail).lnk
      >
      - Open vc++ 6 and create a new Win32 Simple Application
      >
      - Include winternl.h
      >
      This is the code:
      >
      #include "stdafx.h"
      #include <winternl.h>
      >
      int APIENTRY WinMain(HINSTAN CE hInstance, HINSTANCE hPrevInstance,
      LPSTR lpCmdLine, int nCmdShow) {
         PROCESS_BASIC_I NFORMATION p;
         return 0;
      }
      >
      When compiling i get these errors:
      >
      error C2065: 'PROCESS_BASIC_ INFORMATION' : undeclared identifier
      error C2146: syntax error : missing ';' before identifier 'p'
      error C2065: 'p' : undeclared identifier
      >
      The include is done correctly but still that (and any) member from the
      header isn't recognized.
      If i use other headers (just tried a couple) everything works fine.
      >
      Any ideas?
      >
      My idea is that you should ask in a Windows programming group.
      news:comp.os.ms-windows.program mer.win32 is a very good one.
      >
      Nether of these headers is part of the C++ language, they are all
      Windows specific extensions.  Non-standard extensions are off-topic
      here.
      >
      --
      Jack Klein
      Home:http://JK-Technology.Com
      FAQs for
      comp.lang.chttp ://c-faq.com/
      comp.lang.c++http://www.parashift.com/c++-faq-lite/
      alt.comp.lang.l earn.c-c++http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
      OK, thank you for the advice, I'll do that and sorry for asking in the
      wrong group.

      Comment

      Working...