Announcement

Collapse
No announcement yet.

Bypassing DATA's restrictions ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bypassing DATA's restrictions ?


    hi,

    semen, or anyone!

    i found a post of an example, which i'm attempting to run, however,
    i have no idea on the #include "data.inc", which wasn't
    included.

    (referencing) http://www.powerbasic.com/support/pb...ad.php?t=22630

    any help would be appreciated!

    thanks




    ------------------
    mwm
    mwm

  • #2
    DATA.INC appears to be the file created by the utility, hence the line:
    Code:
    Open $Inc_File For Output As #2
    I should point out that the 30K (approx) limit on DATA *per* Sub/Function is a bug in the current release of the compiler and this will be corrected in the next update, to allow the full 64Kb of DATA per Sub/Function.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Thanks Lance,

      I'll give it another shot! It's great to place the data in
      a dll, where the data seldom ever changes!

      Mike



      ------------------
      mwm
      mwm

      Comment


      • #4

        Lance, still having problems!

        This dll works using PB without problems.
        With VB it generates GPF.

        Code:
        (Include File)
        
        %DataCountA = 20999
        GLOBAL DataItemA AS ASCIIZ PTR, DataAddrA AS LONG PTR
        
        (Source File)
         
        #COMPILE DLL "ships.dll"
        #REGISTER NONE
        #INCLUDE "win32api.inc"
        #INCLUDE "Data.Inc"
        #RESOURCE "Data1.Pbr"
        
        FUNCTION GetShips(BYVAL ShipName AS STRING) EXPORT AS STRING
        
            ' Ship Listing
            '
            '---- Initialization --------
            DataAddrA = LoadResource (BYVAL 0, BYVAL FindResource(BYVAL 0&, "Data1", BYVAL %RT_RCDATA))
            '----------------------- Test ------------------
        
            ' VB GPF's here - PB has no Problem here!
            DataItemA = @DataAddrA[100] + DataAddrA
        
            GetShips = @DataItemA
        
        END FUNCTION

        Any help would appreciated!

        Thanks
        Mike


        ------------------
        mwm
        mwm

        Comment


        • #5
          Michael --
          Sorry for delay, I couldn't work in Internet during two days.
          If you are interesting, E-Mail me your code
          (new E-Mail [email protected])



          ------------------

          Comment

          Working...
          X