winmain error

Started by Douglas McDonald, August 09, 2012, 07:09:03 PM

Previous topic - Next topic

Douglas McDonald

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


Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?

Paul Squires

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).
Paul Squires
PlanetSquires Software

Paul Squires

I assume you also compiled and ran the CODEGEN*_MAIN.BAS in PBEdit or JPro?
Paul Squires
PlanetSquires Software

José Roca

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.

Douglas McDonald

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
Doug McDonald
KD5NWK
www.redforksoftware.com
Is that 1's and 0's or 0's and 1's?