Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


How to port 'C' functions to b4ppc


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-09-2007, 10:15 AM
taximania's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 231
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 ?
__________________
Endemol
Waste of space

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net
Reply With Quote
  #2 (permalink)  
Old 12-09-2007, 10:39 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,134
Default

dzt has already created a library for this: Hardware library was updated - 3.10
Reply With Quote
  #3 (permalink)  
Old 12-11-2007, 07:29 PM
taximania's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 231
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.
__________________
Endemol
Waste of space

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net
Reply With Quote
  #4 (permalink)  
Old 12-11-2007, 07:35 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,134
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, 08:16 PM
taximania's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 231
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#
__________________
Endemol
Waste of space

O2 XDA Artemis Touch Flo 4.02 Full Cube Rom WM6.1

http://www.taximania.net
Reply With Quote
  #6 (permalink)  
Old 12-12-2007, 10:25 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,690
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
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.

ControlEvents library
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
db2000 - functions library maXim Italian Forum 8 Yesterday 11:06 AM
db2000 - vb Functions maXim Italian Forum 3 07-30-2008 08:17 AM
calling .Net functions directly colin9876 Questions & Help Needed 1 12-03-2007 12:14 PM
Low-level memory functions Mistrel Basic4ppc Wishlist 3 10-19-2007 07:57 PM
3D to 2D functions collection legugusse Share Your Creations 2 07-12-2007 12:11 PM


All times are GMT. The time now is 05:02 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0