Jump to content
Sign in to follow this  
dekzorro

Apa Tiu Api?

Recommended Posts

kalau nak dikira sebagai API...

printf, scanf pun adalah API tapi printf, scanf adalah standard api utk semua sistem komputer yang mengguna c sebagai bahasa pengaturcaraan.

oleh kerana bukan awak yg design function seperti printf.. so awak tak tahu cara printf berfungsi secara dalaman.. awak hanya tahu menggunakan function printf tsbt..

kalau nak tahu mcm mana printf di code..awak kena disassembler dia punya library..

sebab masa compile, function printf dikepilkan bersama program awak so program awak akan menjalan printf..

sama macam windows.. untuk menyenangkan programmer..microsoft telah design win32 api ataupun library utk digunakan oleh pengaturcara..

contoh MessageBoxA

int MessageBoxA (hWnd, lpText, lpCaption, uType); // seperti dalam win32 api library

so utk jalan kan function messageboxa awak..

char ayat[]="aaaaaaaaa aaa dsad ad asd as";

char title[]="tajuk awak";

MessageBoxA(hwnd, ayat, title, 0);

hwnd ialah handle bagi program awak..

kalau nak bercerita pasal handle.. baik awak cari buku "programming windows"

Share this post


Link to post
Share on other sites

aku nak tanyer.. apa sebonar nye API dan apa function nih dalam Windows. lagi satu, camner aku nak implemet benda alah tuh dlm coding aku???

thank you... tongue.gif

aku ada sikit tambahan drpd jawpaan zeph. Yg zeph jwb tu, adalah C API (Application Protocol Interface) atau lg senang kita nk paham adalah koleksi fungsi2 dlm C. jadi, Windows API pulak maknanya koleksi2 fungsi windows. Melalui API, kita blh mudahkan arahan, cthnya dlm kita buat 3D, kalo nk wat engine sendir, maunya 5 tahun pun x abis. Tp, kalo pakai direcx API, kita blh singkatkan masa development sbb kenayakan fungsi2 yg basic seperti triangle drawing, rotation, plain, control dll disediakan.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...