Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Console API Functions

  1. #1
    Join Date
    Oct 2007
    Location
    /dev/null
    Posts
    4,513
    Blog Entries
    8
    Rep Power
    59

    Console API Functions

    I'm writing a class that uses API functions such as ReadConsoleOutputCharacter and ReadConsoleOutputAttribute. However, my compiler (Visual V++ 2005) can't seem to find windows.h, where all of the functions are declared. When I did a file search on my computer, windows.h was nowhere to be found.
    The error message was:

    fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

    I tried working around this by linking to kernel32.dll using the #using preprocessor directive, but it failed, giving me this error:

    fatal error C1113: #using failed on 'c:\windows\system32\kernel32.dll'

    I check all of my include paths, and they're correct. Passing absolute pathnames didn't do anything, and apparently windows.h isn't even on my computer. Can someone please tell me how to fix the dll linking error or at least tell me where to get a copy of windows.h?
    Last edited by dargueta; 10-14-2007 at 04:19 PM.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Victor is offline Programmer
    Join Date
    May 2007
    Location
    The boondocks
    Posts
    116
    Rep Power
    0
    You can find windows.h with this link. You just have to put it in the right directory in your compiler's lib folder. Or just make an #include "windows.h"
    Visual Studio C/C++ Header,Include Files

  4. #3
    davHunter is offline Newbie
    Join Date
    Oct 2007
    Posts
    8
    Rep Power
    0
    Visual C++ 2005 (at least the Express Edition) does not come with the Native Windows API.
    For using windows.h, or any other windows (not .NET) include, you must download Windows Platform SDK first.
    After you install it, you should be able to use all those functions.
    But remember that you must put the necessary paths for it to work.
    To do so, go to Tools > Options > Projects and Solutions > VC++ Directories and add the Platform SDK includes, libraries and binaries paths to the list (in the corresponding directory)....

    The Windows Platform SDK can be downloaded from Microsoft page. Unfortunately I cannot post any links since it's my first message, so try looking on its search engine

    That should work.
    BTW, I'm not a native english-speaker, so forgive any mistakes...
    Last edited by davHunter; 10-14-2007 at 06:49 PM.

  5. #4
    mindsurfer is offline Learning Programmer
    Join Date
    Oct 2007
    Posts
    39
    Rep Power
    0
    try using DevC++ or code blocks.. much better than .NET ****..lol
    MindSurfer

  6. #5
    Join Date
    Oct 2007
    Location
    /dev/null
    Posts
    4,513
    Blog Entries
    8
    Rep Power
    59
    .NET is free, though. Thank you all, it works great now!

  7. #6
    Victor is offline Programmer
    Join Date
    May 2007
    Location
    The boondocks
    Posts
    116
    Rep Power
    0
    Dev-C++ is free as well

  8. #7
    Join Date
    Oct 2007
    Location
    /dev/null
    Posts
    4,513
    Blog Entries
    8
    Rep Power
    59
    Ah, well. I already have VC++6 and now it works, but thanks anyway. Is there any real difference between VC++ and Dev-C++ ?

  9. #8
    v0id is offline Retired
    Join Date
    Apr 2007
    Posts
    2,937
    Blog Entries
    3
    Rep Power
    42
    Yes, there's. It's like saying, is there a difference between Internet Explorer and Firefox?

    It's two completely different programs, which each have the same purpose; to serve the user with a nice layout, and integrated compiler options. If I've to come with two big differences, then it's: They use different compilers, and the layout of the programs are different.

  10. #9
    mindsurfer is offline Learning Programmer
    Join Date
    Oct 2007
    Posts
    39
    Rep Power
    0
    i prefer msvc++ 6.0 over devC++..
    MindSurfer

  11. #10
    Join Date
    Oct 2007
    Location
    /dev/null
    Posts
    4,513
    Blog Entries
    8
    Rep Power
    59
    What specifically, I mean? Anything to do with either 1)ease of making GUIs or 2)efficiency of produced programs?

Closed Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 02-06-2011, 01:37 PM
  2. Cmoputer Management Console Functions
    By tygernet in forum Visual Basic Programming
    Replies: 0
    Last Post: 02-10-2010, 04:43 PM
  3. Replies: 20
    Last Post: 01-14-2010, 08:05 PM
  4. SQL Functions - SQL Encryption Functions
    By chili5 in forum Tutorials
    Replies: 8
    Last Post: 09-04-2009, 09:40 AM
  5. SQL Functions - Math Functions
    By chili5 in forum Tutorials
    Replies: 6
    Last Post: 09-02-2009, 02:11 PM

Tags for this Thread

Bookmarks

Posting Permissions

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