Carbon API Calls in PureBasic

Mac OSX specific forum
DARKGirl
User
User
Posts: 61
Joined: Wed Nov 10, 2004 10:32 pm

Carbon API Calls in PureBasic

Post by DARKGirl »

Hello everyone!

I am happy to report that PureBasic Alpha 1 works on my Intel (AMD) based computer. I'm not sure how it compiles and works beautifully, but I am not complaining. I have yet to test a lot of functions, but I will get to that as soon as I cross this roadblock.

How do I call Carbon API functions in PB? I found the Function here: http://developer.apple.com/documentatio ... TP30000176 ,but that doesn’t help much other than tell me the syntax. Please look at OpenDrawer.

Oh btw, I am going to attempt to write a chat client using mostly PB commands only and rely less on API commands. I wrote another Chat Client in Windows, but that code relies heavily on WinAPI, so I was not able to port any of it at all. My plan now is to design my applications so they will function with or without the API code...sort of like...standalone procedures that have been set in their own file (Include). I don't know why I didn't do it like this before. It would have saved me a lot of headache.

Thanks in Advance!

DARKGirl
Fred
Administrator
Administrator
Posts: 18397
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

The easier choice is to use the "ImportC" statement, it should do the trick.
Post Reply