943,746 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 822
  • C++ RSS
You are currently viewing page 1 of this multi-page discussion thread
Apr 2nd, 2009
0

API interchangable?

Expand Post »
If I were to work on say an Instant Messenger project, and wrote the gui and event handling using wxWdigets, could I then use the windows API and use winsock to connect the two computers? Basically are API's interchangble in source code?
Reputation Points: 23
Solved Threads: 3
Junior Poster
clutchkiller is offline Offline
181 posts
since Jul 2008
Apr 2nd, 2009
0

Re: API interchangable?

Try it and find out for yourself.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005
Apr 2nd, 2009
0

Re: API interchangable?

well thats not very helpful =(. I am just looking for a simple idea if anyone can give me one. Nothing super in depth
Reputation Points: 23
Solved Threads: 3
Junior Poster
clutchkiller is offline Offline
181 posts
since Jul 2008
Apr 2nd, 2009
0

Re: API interchangable?

well thats not very helpful =(. I am just looking for a simple idea if anyone can give me one. Nothing super in depth
The best way to learn how something works is to try it out yourself and test it on your own computer with your own code. If you want to every program professionally then you will have to learn how to do your own experiments to see what works and what doesn't.

If you want a simple answer then: yes you can probably mix the two, and no they are not interchangeable.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005
Apr 2nd, 2009
0

Re: API interchangable?

I know this isn't what you are asking but may I suggest you use something a little more portable than winsock. That would be Boost asio. There are good examples of an echo client/server here: http://www.boost.org/doc/libs/1_37_0.../examples.html

There are other options too, if you look around.

I suppose it doesn't hurt to learn the Windows API and Winsock for experience and to see another way of doing things, but someone would have to pay me very well to even think about using them.
Reputation Points: 22
Solved Threads: 28
Junior Poster
adam1122 is offline Offline
181 posts
since Mar 2009
Apr 2nd, 2009
0

Re: API interchangable?

You could just look at the APIs and see for yourself.
Reputation Points: 231
Solved Threads: 12
Junior Poster
thoughtcoder is offline Offline
139 posts
since Mar 2009
Apr 2nd, 2009
0

Re: API interchangable?

You could just look at the APIs and see for yourself.
I suggested that too be apparently he is too lazy to do it.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005
Apr 2nd, 2009
0

Re: API interchangable?

I suggested that too be apparently he is too lazy to do it.
Isn't that what "they" say about programmers: we're lazy?
Reputation Points: 22
Solved Threads: 28
Junior Poster
adam1122 is offline Offline
181 posts
since Mar 2009
Apr 2nd, 2009
0

Re: API interchangable?

lazy? Not at all, I know many different api's have functionality that allows you to do the same thing as winsock, but I am more familiar with winsock then other api's similar functions. Perhapes if you read my original SIMPLE question, these subtle insults would not be needed.
Last edited by clutchkiller; Apr 2nd, 2009 at 8:26 pm.
Reputation Points: 23
Solved Threads: 3
Junior Poster
clutchkiller is offline Offline
181 posts
since Jul 2008
Apr 2nd, 2009
0

Re: API interchangable?

Click to Expand / Collapse  Quote originally posted by adam1122 ...
Isn't that what "they" say about programmers: we're lazy?
I've been called a lot of things in my life, but "lazy" isn't one of them. I would have taken only about an hour or less to find out the answer to that op's question, but he messed around for several hours trying to get someone else to do it for him.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,950 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Chess program
Next Thread in C++ Forum Timeline: Read This Before Posting A Question





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC