How to port 'C' functions to b4ppc

Discussion in 'Questions (Windows Mobile)' started by taximania, Dec 9, 2007.

  1. taximania

    taximania Well-Known Member Licensed User

    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 ?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. taximania

    taximania Well-Known Member Licensed User

    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.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    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.
     
  5. taximania

    taximania Well-Known Member Licensed User

    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#
     
  6. agraham

    agraham Expert Licensed User

Loading...