Announcement

Collapse
No announcement yet.

Error 478

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

  • Error 478


    Ok, I'm Stump'd... What am I forgetting?

    RC - created res file ok!
    PBRes - created pbr file ok!

    Compile the program! Error 478

    What gives?
    Here's the code:

    Code:
    #COMPILE EXE
    #DIM ALL
    #REGISTER NONE
    #RESOURCE "MEEKS.PBR"
    #INCLUDE "win32api.inc"
    
    FUNCTION WINMAIN ( BYVAL hCurInstance AS LONG, _
                       BYVAL hPrevInstance AS LONG, _
                       lpszCmdLine AS ASCIIZ PTR, _
                       BYVAL nCmdShow AS LONG ) AS LONG
    
        DIM fRes AS LONG
        DIM hRes AS LONG
        DIM pMem AS LONG PTR
        DIM szText AS ASCIIZ PTR
        DIM id AS STRING
        
        '// Look this up in your resource part.
        fRes = FindResource ( hCurInstance, "MYDATA", BYVAL %RT_RCDATA )
        IF fRes = 0 THEN EXIT FUNCTION
    
        '// It must be loaded in your address space.
        hRes = LoadResource( hCurInstance, fRes )
        IF hRes = 0 THEN EXIT FUNCTION
    
        '// Now you have a pointer to your resource data in memory.
        pMem = LockResource( hRes )
    
        '// Just one way to retrieve it..
        '// This could be a pointer to a struct of course.
        szText = pMem
        id = MID$(@szText,1,32)
        
        MSGBOX id
    
        FUNCTION = 1
    
    END FUNCTION
    
    ' RC File
    '
    '   MYDATA RCDATA "RCTest.bin"
    '
    
    ' Error Message: Error 478 in F:\RCTEST\RCTEST.BAS (47:1)
    '                Resource file error line 47  
    ' Note: There is no line 47!
    '

    Thanks
    MWM


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

  • #2

    Found the Answer:

    By copying the WIN32API.INC FILE to
    my F:\RCTEST\ Directory, it compiles just fine.

    However, I compile other files just fine without doing this...
    Strange...Win2k Bug

    Thanks All
    MWM



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

    Comment


    • #3
      It really sounds like something else was happening there...

      An Error 478 means the PBR file was not actually "valid" or was missing from the /I (include options) path in the IDE. Possibly the "current" IDE directory was wrong when you want to compile the .BAS file?


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

      Comment

      Working...
      X