Results 1 to 8 of 8
  1. #1
    xBear Grylls's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    Maryland
    Posts
    198
    Reputation
    14
    Thanks
    27
    My Mood
    Psychedelic

    How to use API and operate it with toolbox items

    I'm pretty advanced with vb.net, but have no idea how to use an API! Let's say I can get my hands on a skype, pastebin, imgur api. How would I use this in my project? Thanks!

  2. #2
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    top menu in msvs: Project-->Add Reference

    3 tabs (?) : .net | com | browse

    maybe you'll find it in the first 2, if not try browse -- I think it automatically copies the dll into the build folder.


    To use it (and vb does it own unique thing when it comes importing namespaces for you?) you can try

    Code:
    Imports ProductNamespace
    ''Imports must at top of class declaration
    or
    Dim myObject As ProductNamespace.SeeIntellisense
    maybe?

    Not sure about toolbox items.
    edit: Right click on a clear area in the toolbox and "Choose Items"
    a few tabs: check .net and com probably.
    ?
    Last edited by abuckau907; 04-28-2013 at 01:43 AM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  3. #3
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by abuckau907 View Post
    Not sure about toolbox items.
    Right-Click within the Toolbox.
    >Choose Items...
    >>Then Browse...

    >Find the .DLL File, and Open it

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  4. #4
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    Took me 2 minutes to pull up msvs and check. Beat me too it.

    ---------- Post added at 02:49 AM ---------- Previous post was at 02:48 AM ----------

    Quote Originally Posted by Jorndel View Post


    Right-Click within the Toolbox.
    >Choose Items...
    >>Then Browse...

    >Find the .DLL File, and Open it
    Speedy. Thnx.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  5. The Following User Says Thank You to abuckau907 For This Useful Post:

    Jorndel (04-28-2013)

  6. #5
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by abuckau907 View Post
    Took me 2 minutes to pull up msvs and check. Beat me too it.
    That's because I knew how


    But I'm glad to see you're helping out people.
    -I'm grateful for your contribution

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  7. #6
    DawgiiStylz's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Dawg House
    Posts
    7,811
    Reputation
    219
    Thanks
    2,896
    My Mood
    Tired
    Quote Originally Posted by xBear Grylls View Post
    I'm pretty advanced with vb.net, but have no idea how to use an API! Let's say I can get my hands on a skype, pastebin, imgur api. How would I use this in my project? Thanks!
    API's come in different forms and processes.. I guess I could say. Basically.. an API, such as imgur or pastebin, is a web client based method that allows your program to communicate in and out of a website. Like Pastebin, you could set up an API registration that gives you the unique keys that are required for you to use the website API.
    I'd suggest reading over Pastebin API details for a better understanding. Pastebin.com - Login Page

    To actually use the API, you can you'll need to send a url based string, which API's are based off of in this case. To do that, simply send a webrequest POST method.

    Code:
    Dim postReq As HttpWebRequest = DirectCast(WebRequest.Create(URL), HttpWebRequest)
    postReq.Method = "POST"
    After requesting, you'll need to retrieve the data you get from the request by getting a response.
    Code:
    Dim postreqstream As Stream = postReq.GetRequestStream()
    postreqstream.Write(byteData, 0, byteData.Length)
    postreqstream.Close()
    Dim postresponse As HttpWebResponse
    postresponse = DirectCast(postReq.GetResponse(), HttpWebResponse)
    Dim postreqreader As New StreamReader(postresponse.GetResponseStream())
    Dim thepage As String = postreqreader.ReadToEnd

    but before you can do all that, you'll have to enter a url requesting what exactly you want to get. An example would be..
    Code:
    Dim Post = "api_option=paste&api_dev_key=" & DevKey & _
                                "&api_paste_code=" & PasteData & _
                                "&api_paste_private=" & Exposure & _
                                "&api_paste_name=" & Title & _
                                "&api_paste_expire_date=" & Expire & _
                                "&api_paste_format=" & Syntax & _
                                "&api_user_key=" & UserKey & _
                                "&api_paste_name=" & Title
    Think of each part as a parameter of a function that you need to have for it to work. If it doesn't work, it'll return a specific string on why it hasn't work.

    This should be enough to get you started, although the code that I have is incomplete. Good luck

    or like what they said ^
    API's can come in .net assembly files


    Last edited by DawgiiStylz; 04-28-2013 at 01:56 AM.

  8. The Following 3 Users Say Thank You to DawgiiStylz For This Useful Post:

    abuckau907 (04-28-2013),Jorndel (04-28-2013),xBear Grylls (04-28-2013)

  9. #7
    Threadstarter
    Advanced Member
    xBear Grylls's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    Maryland
    Posts
    198
    Reputation
    14
    Thanks
    27
    My Mood
    Psychedelic
    Quote Originally Posted by DawgiiStylz View Post

    API's come in different forms and processes.. I guess I could say. Basically.. an API, such as imgur or pastebin, is a web client based method that allows your program to communicate in and out of a website. Like Pastebin, you could set up an API registration that gives you the unique keys that are required for you to use the website API.
    I'd suggest reading over Pastebin API details for a better understanding. Pastebin.com - Login Page

    To actually use the API, you can you'll need to send a url based string, which API's are based off of in this case. To do that, simply send a webrequest POST method.

    Code:
    Dim postReq As HttpWebRequest = DirectCast(WebRequest.Create(URL), HttpWebRequest)
    postReq.Method = "POST"
    After requesting, you'll need to retrieve the data you get from the request by getting a response.
    Code:
    Dim postreqstream As Stream = postReq.GetRequestStream()
    postreqstream.Write(byteData, 0, byteData.Length)
    postreqstream.Close()
    Dim postresponse As HttpWebResponse
    postresponse = DirectCast(postReq.GetResponse(), HttpWebResponse)
    Dim postreqreader As New StreamReader(postresponse.GetResponseStream())
    Dim thepage As String = postreqreader.ReadToEnd

    but before you can do all that, you'll have to enter a url requesting what exactly you want to get. An example would be..
    Code:
    Dim Post = "api_option=paste&api_dev_key=" & DevKey & _
                                "&api_paste_code=" & PasteData & _
                                "&api_paste_private=" & Exposure & _
                                "&api_paste_name=" & Title & _
                                "&api_paste_expire_date=" & Expire & _
                                "&api_paste_format=" & Syntax & _
                                "&api_user_key=" & UserKey & _
                                "&api_paste_name=" & Title
    Think of each part as a parameter of a function that you need to have for it to work. If it doesn't work, it'll return a specific string on why it hasn't work.

    This should be enough to get you started, although the code that I have is incomplete. Good luck

    or like what they said ^
    API's can come in .net assembly files


    I cant thank you enough! Resolved.

  10. #8
    DawgiiStylz's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Dawg House
    Posts
    7,811
    Reputation
    219
    Thanks
    2,896
    My Mood
    Tired
    Glad to help

Similar Threads

  1. How to use tubebot and triggerbot, i'm playing HCDM
    By OnlySev7n in forum Call of Duty Modern Warfare 2 Help
    Replies: 3
    Last Post: 04-24-2010, 12:59 AM
  2. How To Use Cheat Engine 5.5 With Pinball
    By comon trade in forum General Game Hacking
    Replies: 2
    Last Post: 12-20-2009, 08:37 PM
  3. How To Use PerX And Other Injectors
    By nfitz02 in forum Combat Arms Discussions
    Replies: 14
    Last Post: 09-23-2009, 03:52 AM
  4. [TUT]How to use Stealth and CHeeat Injectors.
    By krishna in forum CrossFire Hacks & Cheats
    Replies: 7
    Last Post: 09-06-2009, 02:18 PM
  5. How to use wallhack and MHS speed hack together.{if you don't already know}
    By neononxxx in forum Combat Arms Hacks & Cheats
    Replies: 16
    Last Post: 07-18-2009, 12:35 AM