Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

How to port 'C' functions to b4ppc

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-09-2007, 09:15 AM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 592
Awards Showcase
Beta Tester 
Total Awards: 1
Default How to port 'C' functions to b4ppc

Here's something I found that allows you control of the LED's on your PPC.
I noticed PocketDAQ flashes the red LED of my PPC when connected to a port.

But it's in 'C'

http://www.pocketpcdn.com/articles/led.html

How would you do the same functions in b4ppc or #develop ?
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
  #2 (permalink)  
Old 12-09-2007, 09:39 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,728
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

dzt has already created a library for this: http://www.basic4ppc.com/forum/showp...19&postcount=7
Reply With Quote
  #3 (permalink)  
Old 12-11-2007, 06:29 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 592
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by taximania View Post
How would you do the same functions in b4ppc or #develop ?
Thanks Erel, but it didn't answer my question.
I see lots of code snippets written in 'C' and wondered how easy it was to port them to other means.
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
  #4 (permalink)  
Old 12-11-2007, 06:35 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,728
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

It is not simple.
You can P/Invoke native code from managed call (i.e. call C code from C#) but you will have to handle many complex data type conversions.
I recommend you to search for managed code or c# code.
Reply With Quote
  #5 (permalink)  
Old 12-11-2007, 07:16 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 592
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Many thanks for the, as usual, quick reply Erel.
I now understand what you mean.

It would be like adding assembler language into a C program, which I have done in the past.
I'll google as you suggest and see if I can run c code in a .vbnet program.
I don't have much luck with c#
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
  #6 (permalink)  
Old 12-12-2007, 09:25 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by taximania View Post
I don't have much luck with c#
It's worth perservering. There's pretty much a one to one conversion of most stuff from C# to VB and it's all .NET underneath. Anyway doesn't SharpDevelop have a conversion capability - dzt stated that it had in post #8 of this thread.

http://www.basic4ppc.com/forum/showt...t=sharpdevelop
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
db2000 - functions library maXim Italian Forum 12 12-01-2008 09:52 AM
db2000 - vb Functions maXim Italian Forum 4 12-01-2008 09:46 AM
calling .Net functions directly colin9876 Questions (Windows Mobile) 1 12-03-2007 11:14 AM
Low-level memory functions Mistrel Basic4ppc Wishlist 3 10-19-2007 06:57 PM
3D to 2D functions collection legugusse Share Your Creations 2 07-12-2007 11:11 AM


All times are GMT. The time now is 06:00 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0