Query:how to use windows api in my c source code?

Discussion in 'C Programming' started by Jack Dowson, Jun 12, 2007.

  1. Jack Dowson

    Jack Dowson Guest

    Hello Everybody:
    I'm learning c now.I think it's really a tedious job following my
    textbook to write programs which are used to deal with math problems.I
    want to write some codes related with OS(just like creating processes or
    so).Then it may refers to the applying of windows API.
    Now here is my question:How to use api in my source code without
    error?Will the statement "#include<windows.h>" do(I can't find this head
    file in my include directory)?Or there might have some other ways?
    By the way:My os is windowXP and compiler is TURBO c2.0.
    Any help will be greatly appreciated.

    Dowson.
    Jack Dowson, Jun 12, 2007
    #1
    1. Advertising

  2. In article <f4mjrd$96k$99.com>, Jack Dowson <> wrote:
    >Now here is my question:How to use api in my source code without
    >error?Will the statement "#include<windows.h>" do


    You should ask about this in one of the Windows programing newsgroups.
    Sorry, I don't keep track of their names; I usually stick to pure C,
    or to C with POSIX extensions. comp.lang.c only discusses the things
    defined by the C programming language, not anything OS specific.
    --
    Prototypes are supertypes of their clones. -- maplesoft
    Walter Roberson, Jun 12, 2007
    #2
    1. Advertising

  3. Walter Roberson said:

    > In article <f4mjrd$96k$99.com>, Jack Dowson
    > <> wrote:
    >>Now here is my question:How to use api in my source code without
    >>error?Will the statement "#include<windows.h>" do

    >
    > You should ask about this in one of the Windows programing newsgroups.
    > Sorry, I don't keep track of their names;


    comp.os.ms-windows.programmer.win32

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at the above domain, - www.
    Richard Heathfield, Jun 12, 2007
    #3
  4. Jack Dowson

    jacob navia Guest

    Jack Dowson wrote:
    > Hello Everybody:
    > I'm learning c now.I think it's really a tedious job following my
    > textbook to write programs which are used to deal with math problems.I
    > want to write some codes related with OS(just like creating processes or
    > so).Then it may refers to the applying of windows API.
    > Now here is my question:How to use api in my source code without
    > error?Will the statement "#include<windows.h>" do(I can't find this head
    > file in my include directory)?Or there might have some other ways?
    > By the way:My os is windowXP and compiler is TURBO c2.0.
    > Any help will be greatly appreciated.
    >
    > Dowson.


    Normally that will do to use most of the API exposed by windows.
    If there are additional header files to be included you should see
    that in the documentation of the specific function of the API
    you want to use.

    Turbo c 2.0 is an outdated compiler. You should use a newer one.

    For instance, you can download
    http://www.cs.virginia.edu/~lcc-win32
    for free

    jacob
    jacob navia, Jun 12, 2007
    #4
  5. Jack Dowson

    CBFalconer Guest

    Jack Dowson wrote:
    >
    > I'm learning c now.I think it's really a tedious job following my
    > textbook to write programs which are used to deal with math
    > problems.I want to write some codes related with OS(just like
    > creating processes or so).Then it may refers to the applying of
    > windows API. Now here is my question:How to use api in my source
    > code without error?Will the statement "#include<windows.h>" do(I
    > can't find this head file in my include directory)?Or there might
    > have some other ways? By the way:My os is windowXP and compiler
    > is TURBO c2.0.


    Specific system, such as windows, Turbo C, etc. are off-topic here,
    where we deal with the C language as defined in the various C
    standards. In particular, there is no such include file as
    <windows.h> in standard C, so your question is unanswerable here.
    Things would be different on a windows news group, but strictly
    limited to windows systems.

    Try the references in my sig. below:

    --
    Some useful references about C:
    <http://www.ungerhu.com/jxh/clc.welcome.txt>
    <http://www.eskimo.com/~scs/C-faq/top.html> (C-faq)
    <http://benpfaff.org/writings/clc/off-topic.html>
    <http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/> (C99 std)
    <http://www.dinkumware.com/refxc.html> (C-library}
    <http://gcc.gnu.org/onlinedocs/> (GNU docs)
    <http://clc-wiki.net/wiki/C_community:comp.lang.c:Introduction>



    --
    Posted via a free Usenet account from http://www.teranews.com
    CBFalconer, Jun 12, 2007
    #5
  6. Jack Dowson

    Al Balmer Guest

    On Tue, 12 Jun 2007 18:59:45 -0400, CBFalconer <>
    wrote:

    >jacob navia wrote:
    >>

    >... snip ...
    >>
    >> Normally that will do to use most of the API exposed by windows.
    >> If there are additional header files to be included you should see
    >> that in the documentation of the specific function of the API
    >> you want to use.

    >
    >You know better than to answer an off-topic question in this
    >newsgroup. You should give him a reference to a suitable group.
    >

    It wasn't an answer, it was an advertising opportunity.

    --
    Al Balmer
    Sun City, AZ
    Al Balmer, Jun 13, 2007
    #6
  7. CBFalconer said:

    > jacob navia wrote:
    >>

    > ... snip ...
    >>
    >> Normally that will do to use most of the API exposed by windows.
    >> If there are additional header files to be included you should see
    >> that in the documentation of the specific function of the API
    >> you want to use.

    >
    > You know better than to answer an off-topic question in this
    > newsgroup.


    No, he doesn't. Caveat emptor!

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at the above domain, - www.
    Richard Heathfield, Jun 13, 2007
    #7
  8. In article <>,
    CBFalconer <> wrote:
    >Richard Heathfield wrote:
    >> CBFalconer said:
    >>> jacob navia wrote:
    >>>>
    >>> ... snip ...
    >>>>
    >>>> Normally that will do to use most of the API exposed by windows.
    >>>> If there are additional header files to be included you should see
    >>>> that in the documentation of the specific function of the API
    >>>> you want to use.
    >>>
    >>> You know better than to answer an off-topic question in this
    >>> newsgroup.

    >>
    >> No, he doesn't. Caveat emptor!

    >
    >I disagree. He does, but he doesn't. :)


    In much the same way that most of the American public (and 100% of the
    regulars in this NG) "know" that Christ was born of a virgin. "Knowing"
    things that you know aren't true is dangerous.
    Kenny McCormack, Jun 13, 2007
    #8
  9. Jack Dowson

    Net Nanny Guest

    On 12 Jun 2007 at 22:56, CBFalconer wrote:
    > Try the references in my sig. below:


    If you really intend the OP to see the list of references, put it in the
    main body of your post - many people have their newsreaders hide
    signatures. Of course, in your case that might well fail and only the
    second of your signatures be recognized as a signature.

    > --
    > Some useful references about C:
    > <http://www.ungerhu.com/jxh/clc.welcome.txt>
    > <http://www.eskimo.com/~scs/C-faq/top.html> (C-faq)
    > <http://benpfaff.org/writings/clc/off-topic.html>
    > <http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/> (C99 std)
    > <http://www.dinkumware.com/refxc.html> (C-library}
    > <http://gcc.gnu.org/onlinedocs/> (GNU docs)
    > <http://clc-wiki.net/wiki/C_community:comp.lang.c:Introduction>
    >
    >
    >
    > --
    > Posted via a free Usenet account from http://www.teranews.com


    Either way, this sig/these sigs are in gratuitous violation of basic
    netiquette.

    --
    CBFalconer: breathtaking hypocrite or insidious troll?
    Net Nanny, Jun 14, 2007
    #9
  10. Jack Dowson

    Al Balmer Guest

    On Thu, 14 Jun 2007 21:42:37 +0200 (CEST), Net Nanny
    <> wrote:

    >On 12 Jun 2007 at 22:56, CBFalconer wrote:
    >> Try the references in my sig. below:

    >
    >If you really intend the OP to see the list of references, put it in the
    >main body of your post - many people have their newsreaders hide
    >signatures.


    I never heard of that. Which newsreaders provide that option? Why
    would anyone want to use it?

    For the intended purpose, the references are in the proper place. They
    do exceed the 4-line limit, of course.

    --
    Al Balmer
    Sun City, AZ
    Al Balmer, Jun 14, 2007
    #10
  11. Jack Dowson

    Morris Dovey Guest

    Re: [OT] Query:how to use windows api in my c source code?

    Al Balmer wrote:
    | On Thu, 14 Jun 2007 21:42:37 +0200 (CEST), Net Nanny
    | <> wrote:
    |
    || On 12 Jun 2007 at 22:56, CBFalconer wrote:
    ||| Try the references in my sig. below:
    ||
    || If you really intend the OP to see the list of references, put it
    || in the main body of your post - many people have their newsreaders
    || hide signatures.
    |
    | I never heard of that. Which newsreaders provide that option? Why
    | would anyone want to use it?

    It's done all the time, Al - In fact, I just set up a 'rule' on
    Outhouse Express that deletes all of netnanny's sigs. :cool:

    | For the intended purpose, the references are in the proper place.
    | They do exceed the 4-line limit, of course.

    BFD! In the context of all other problems in the world today, there
    are surely more pressing needs than counting lines in sig files...

    --
    Morris Dovey
    DeSoto Solar
    DeSoto, Iowa USA
    http://www.iedu.com/DeSoto/
    Morris Dovey, Jun 14, 2007
    #11
  12. Re: [OT] Query:how to use windows api in my c source code?

    Morris Dovey said:

    > Al Balmer wrote:

    <snip>
    >
    > | For the intended purpose, the references are in the proper place.
    > | They do exceed the 4-line limit, of course.
    >
    > BFD! In the context of all other problems in the world today, there
    > are surely more pressing needs than counting lines in sig files...


    There are more pressing needs than using an int to receive getchar's
    return value, too. But when someone is told that int is appropriate and
    yet continues to use char over and /over/ and OVER, what does that tell
    us about him?

    Chuck has been told over and /over/ and OVER about his sig, and yet he
    continues to violate the Usenet convention of four lines. Until he
    fixes that, his criticisms of other people's netiquette violations have
    little or no moral force.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at the above domain, - www.
    Richard Heathfield, Jun 14, 2007
    #12
  13. Jack Dowson

    Default User Guest

    Net Nanny wrote:


    > You know better than to breach basic netiquette with this over-long
    > sig. You should cut it down, and omit the second sig.


    You are aware that the "second sig" is added by his news service, over
    which he has no control, right?




    Brian
    Default User, Jun 14, 2007
    #13
  14. Jack Dowson

    Al Balmer Guest

    Re: [OT] Query:how to use windows api in my c source code?

    On Thu, 14 Jun 2007 16:33:56 -0500, "Morris Dovey" <>
    wrote:

    >Al Balmer wrote:
    >| On Thu, 14 Jun 2007 21:42:37 +0200 (CEST), Net Nanny
    >| <> wrote:
    >|
    >|| On 12 Jun 2007 at 22:56, CBFalconer wrote:
    >||| Try the references in my sig. below:
    >||
    >|| If you really intend the OP to see the list of references, put it
    >|| in the main body of your post - many people have their newsreaders
    >|| hide signatures.
    >|
    >| I never heard of that. Which newsreaders provide that option? Why
    >| would anyone want to use it?
    >
    >It's done all the time, Al - In fact, I just set up a 'rule' on
    >Outhouse Express that deletes all of netnanny's sigs. :cool:


    I can do better - a rule that deletes his entire post :)

    I'd be interested in how you get OE to edit a received post with a
    rule. In Outlook non-express, it could be done by running a script, I
    suppose, but I've never used OE.
    >
    >| For the intended purpose, the references are in the proper place.
    >| They do exceed the 4-line limit, of course.
    >
    >BFD! In the context of all other problems in the world today, there
    >are surely more pressing needs than counting lines in sig files...


    --
    Al Balmer
    Sun City, AZ
    Al Balmer, Jun 14, 2007
    #14
  15. Jack Dowson

    Default User Guest

    Al Balmer wrote:

    > On Thu, 14 Jun 2007 21:42:37 +0200 (CEST), Net Nanny
    > <> wrote:
    >
    > > On 12 Jun 2007 at 22:56, CBFalconer wrote:
    > >> Try the references in my sig. below:

    > >
    > > If you really intend the OP to see the list of references, put it
    > > in the main body of your post - many people have their newsreaders
    > > hide signatures.

    >
    > I never heard of that. Which newsreaders provide that option? Why
    > would anyone want to use it?


    I could, after a fashion, by setting the .sig text color to the same as
    the background (it's currently a shade of gray somewhat darker than the
    background). The text would still be there, and I could drag across it
    and see it.

    > For the intended purpose, the references are in the proper place. They
    > do exceed the 4-line limit, of course.


    True. It's not an flagrant violation, but one all the same.



    Brian
    Default User, Jun 15, 2007
    #15
  16. Jack Dowson

    Morris Dovey Guest

    Re: [OT] Query:how to use windows api in my c source code?

    Richard Heathfield wrote:
    | Morris Dovey said:
    |
    || Al Balmer wrote:
    | <snip>
    ||
    ||| For the intended purpose, the references are in the proper place.
    ||| They do exceed the 4-line limit, of course.
    ||
    || BFD! In the context of all other problems in the world today, there
    || are surely more pressing needs than counting lines in sig files...
    |
    | There are more pressing needs than using an int to receive getchar's
    | return value, too. But when someone is told that int is appropriate
    | and yet continues to use char over and /over/ and OVER, what does
    | that tell us about him?
    |
    | Chuck has been told over and /over/ and OVER about his sig, and yet
    | he continues to violate the Usenet convention of four lines. Until
    | he fixes that, his criticisms of other people's netiquette
    | violations have little or no moral force.

    Agreed. <s>

    Still, here in c.l.c it does seem (to me) more appropriate to focus on
    C language/usage issues than to waste time beating up on CBF for
    teranews' antisocial behavior.

    If CBF reads this and likes the idea, I'm willing to host an orphan
    page with his C links. That way he can shrink his sig to point to that
    page.

    BTW, I still have a Post-It with your initials on it stuck to the
    front of a small book (ISBN 0-13-110163-3) that you once said you
    wanted. If you don't want it, please let me know - else send your
    mailing address!

    --
    Morris Dovey
    DeSoto Solar
    DeSoto, Iowa USA
    http://www.iedu.com/DeSoto/
    Morris Dovey, Jun 15, 2007
    #16
  17. Re: [OT] Query:how to use windows api in my c source code?

    Morris Dovey said:

    > Richard Heathfield wrote:


    <snip>
    > |
    > | Chuck has been told over and /over/ and OVER about his sig, and yet
    > | he continues to violate the Usenet convention of four lines. Until
    > | he fixes that, his criticisms of other people's netiquette
    > | violations have little or no moral force.
    >
    > Agreed. <s>
    >
    > Still, here in c.l.c it does seem (to me) more appropriate to focus on
    > C language/usage issues than to waste time beating up on CBF for
    > teranews' antisocial behavior.


    Oh, I can live with that. I'm talking about /his/ outsized sig block
    data, not his ISP's additions.

    > BTW, I still have a Post-It with your initials on it stuck to the
    > front of a small book


    Can't be my book, then. :)

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at the above domain, - www.
    Richard Heathfield, Jun 15, 2007
    #17
  18. Jack Dowson

    Morris Dovey Guest

    Re: [OT] Query:how to use windows api in my c source code?

    Al Balmer wrote:
    | On Thu, 14 Jun 2007 16:33:56 -0500, "Morris Dovey"
    | <> wrote:

    || It's done all the time, Al - In fact, I just set up a 'rule' on
    || Outhouse Express that deletes all of netnanny's sigs. :cool:
    |
    | I can do better - a rule that deletes his entire post :)
    |
    | I'd be interested in how you get OE to edit a received post with a
    | rule. In Outlook non-express, it could be done by running a script,
    | I suppose, but I've never used OE.

    Well, it's not exactly "editing". If truth be told, it deleted all
    headers /and/ the message text right along with the sig. :-D

    Never used OE? Excellent decision!
    I'm inclined to believe that in its original form OE was a real-time
    tectonic emulator with more fault lines than California put together.

    --
    Morris Dovey
    DeSoto Solar
    DeSoto, Iowa USA
    http://www.iedu.com/DeSoto/
    Morris Dovey, Jun 15, 2007
    #18
  19. Jack Dowson

    Morris Dovey Guest

    Re: [OT] Query:how to use windows api in my c source code?

    Richard Heathfield wrote:
    | Morris Dovey said:
    |
    || BTW, I still have a Post-It with your initials on it stuck to the
    || front of a small book
    |
    | Can't be my book, then. :)

    Of course not. That would be ISBN 0-672-31896-2, three volumes over.
    These days it'd probably be considered an act of terrorism to attempt
    sending anything that heavy by air.

    --
    Morris Dovey
    DeSoto Solar
    DeSoto, Iowa USA
    http://www.iedu.com/DeSoto/
    Morris Dovey, Jun 15, 2007
    #19
  20. Jack Dowson

    Richard Bos Guest

    "Default User" <> wrote:

    > Net Nanny wrote:
    >
    > > You know better than to breach basic netiquette with this over-long
    > > sig. You should cut it down, and omit the second sig.

    >
    > You are aware that the "second sig" is added by his news service, over
    > which he has no control, right?


    Yes, he does. He can get a real, non-violating news service.

    But please don't follow up to Kenny, or to his nyms.

    Richard
    Richard Bos, Jun 15, 2007
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anony!

    Java API Source Code

    Anony!, Aug 13, 2004, in forum: Java
    Replies:
    6
    Views:
    626
    Andrew Thompson
    Aug 13, 2004
  2. Ken

    Java API source code?

    Ken, Sep 23, 2004, in forum: Java
    Replies:
    4
    Views:
    625
    Andrew Thompson
    Sep 24, 2004
  3. Replies:
    2
    Views:
    136
    bbiker
    Oct 25, 2007
  4. Jenny
    Replies:
    3
    Views:
    245
    Dag Sunde
    Dec 17, 2004
  5. roadrunner
    Replies:
    1
    Views:
    222
    Gunnar Hjalmarsson
    Feb 8, 2006
Loading...

Share This Page