On 2/12/07, Ralph Versteegen <[EMAIL PROTECTED]> wrote:
> On 2/13/07, Keith Gable <[EMAIL PROTECTED]> wrote:
> > Hey guys,
> >
> > I'm in a class where we're learning C++ data structures. I've been thinking
> > of some useful dataset I can work on to help make sure I know what I'm
> > doing. Then it hit me -- you guys are still loading .RPG files from
> > FreeBasic! :) So, I'm wondering....
>
> Huh?

It's my understanding that FreeBasic is like VB in that it's compiled
to "fake" code and is then executed by an interpreter. So, using a C
library to do this will be faster. If it's not, then it's really the
same either way... :)


>
> >
> > 1) How useful would a native code lump/unlump library be to OHRRPGCE?
> > Preferably, I don't want to mess with underlying implementation of stuff
> > right now (so -- basically, just extract lumps into memory and such). So,
> > you could call it liblump.so/lump.dll or something like that. Later, if it's
> > useful, I could try for a librpgfile.so/rpgfile.dll that does all of that
> > underlying parsing.
> >
>
> What do you mean by native code?

Again, I understand that FreeBasic is interpreted. If not, nevermind :)

>
> Well, that sort of library would be useful to programs which access
> RPG files. I tried to make a lump.dll for Fyre for VB, but I don't
> think he got it working - VB seems to require special activex dlls or
> something.

DLLs work fine. You have to use Declare Function. Something like this:

In C:
int function_name(int &var1, int var2);

In VB:
Declare Function function_name Lib "dllname.dll" (ByRef var1 As
Integer, ByVal var2 As Integer) As Integer

If you actually want to associate the DLL with the project, it has to
be an ActiveX DLL. It's easier to do it using Declare Function. Or,
option #2 is to write a .ocx (ActiveX Control) in VB that executes
stuff in the DLL and then have VB users use the VB OCX. Slower, but
hey, it's VB6. :)

>
> Have a look at OHR++, it includes unlumping to memory and a (nearly
> finished?) RPG file loader.

Ahh.... If there's already a project, nevermind! :)

>
> > 2) Does FreeBasic support C++'s ABI, or does it only support C?
> >
>
> Only C. See Mike's wrapper for the audiere library.

Ouch. Nobody supports the C++ ABI except those coding in C++ -_-.

-- 
Keith Gable
Lead Programmer / Project Leader
The Ignition Project <http://www.ignition-project.com/>

[Ask me how you can get a free Gmail account - Now with Google Chat!]
_______________________________________________
ohrrpgce mailing list
ohrrpgce@lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to