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
Comment