Using Windows API (Desktop) with b4ppc?

Discussion in 'Questions (Windows Mobile)' started by jesb4ppc, Aug 27, 2007.

  1. jesb4ppc

    jesb4ppc Member Licensed User

    Hi everyone,

    Is it possible to call a Win API 32 funcion from the Desktop?

    I'd like to be able to read the Serial Number of a Drive. The Api function GetVolumeInformation, in kernel32.exe, do it, as I have tested in VB6. But I find myself much more confortable working with b4ppc.

    I also would like to print some kind of report from the Desktop. The DesktopOnly library just support plain text, but if the next version arrives soon (please..), I could do with b4ppc instead of recode the application to VB. I now b4ppc is intended to works with PPC, and it's just fine for me, but if it increases the support for Desktop, it would be the top!

    I wish there was something like the Hardware library, which works fine for the PPC, that also works fine for the Desktop. Maybe the WIN 32 API support do the job (if it's possible).

    Thanks.
     
  2. Cableguy

    Cableguy Expert Licensed User

    I thought I was alone in this line of thinking....
    But imagine a software developing platform designed for PPC's but powerfull enough to deploy WIn32 apps....
    Maybe one day, maybe one day...

    PS.- In my way of seeing these things, there are not too much lacking in b4ppc for a good desktop enviroment, exception made to the printing ability....
     
  3. agraham

    agraham Expert Licensed User

    Unfortunately no, at least not without writing a new library for B4PPC to do it for you (which is actually quite simple to do).

    If you are only interested in the desktop then you could use the free Express edition of VB.NET or C# to write a simple dll that would give you access to the Win32 APIs you want but they cannot make device applications or device libraries so you would be restricted to the desktop.
     
  4. jesb4ppc

    jesb4ppc Member Licensed User

    Hi CableGuy,

    Of course, I agree. B4ppc is a fantastic developement platform, but, you know, when you like something you expect more and more of it. I think this kind of improvements will make it even better.

    About my needs, I'm thinking in how could I pass the result of the application developed in VB to my b4ppc application, in a safe way. Maybe with an intermediate file.... Any ideas?

    Thanks for the answer.
     
  5. agraham

    agraham Expert Licensed User

    I don't know what format yout data is in but investigate the B4PPC Table control. It can read and parse CSV files and also write its' contents back out. It may help in getting your data in to B4PPC.

    Also B4PPC does support arguments so if you really wanted to you could Shell your B4PPC app from VB6 giving it the datafile name as a parameter.
     
  6. jesb4ppc

    jesb4ppc Member Licensed User

    Hi agraham,

    Good idea. What I want is to get the VB result to b4ppc, but if if works one direction, maybe it will works in the other one. I'll take that way, to see what I find.

    Thanks.
     
Loading...