PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Douglas McDonald on August 09, 2012, 07:09:03 PM

Title: winmain error
Post by: Douglas McDonald on August 09, 2012, 07:09:03 PM
I JUST STARTED GETTING THIS ERROR. on minute all was working great then on the next compile I get this. I went back and undid a simple change, changing a + to a -, and now I can't make anything work.
HELP!!

thank doug

Function FF_WINMAIN( ByVal hInstance     As Dword, _
                     ByVal hPrevInstance As Dword, _
                     ByVal lpCmdLine     As Asciiz Ptr, _
                     ByVal iCmdShow      As Long ) As Long


   ' If this function returns TRUE (non-zero) then the actual WinMain will exit
   ' thus ending the program. You can do program initialization in this function.

   Function = %FALSE    'return %TRUE if you want the program to end.

End Function

Error 476 BLOCK/SCANNED STATMENTS NOT ALLOWED HERE


Title: Re: winmain error
Post by: Paul Squires on August 09, 2012, 09:39:10 PM
The error is elsewhere than the FF_WinMain. You are probably missing an END FUNCTION somewhere in your code for one of the Forms or Modules. In the few times this has happened to me, it invariably comes down to a missing END SUB/FUNCTION. (hopefully this is the same for you).
Title: Re: winmain error
Post by: Paul Squires on August 09, 2012, 09:39:54 PM
I assume you also compiled and ran the CODEGEN*_MAIN.BAS in PBEdit or JPro?
Title: Re: winmain error
Post by: José Roca on August 10, 2012, 07:44:24 AM
Off topic. Before I forgot it, ByVal lpCmdLine As Asciiz Ptr should be changed to ByVal lpCmdLine As WStringz Ptr in PB 10. Nothing to do with Douglas' problem.
Title: Re: winmain error
Post by: Douglas McDonald on August 10, 2012, 10:25:33 AM
Thank you. Yes it was a missing (commented out) End Function. There error just kind of put me off track a bit. I'll try and remember this. BTW I really like Ver 3.6. I wish I could spend more time learning all the great stuff Jose  has made available. Slowly but surly I guess.

Thanks again
Doug