Win API calls work in Visual Basic 6 IDE but not in EXE file
Win API calls work in Visual Basic 6 IDE but not in EXE file
(OP)
I have a program written in Visual Basic 6. It uses Win API calls for serial port communication using CreateFile, WriteFile, ReadFile, etc calls from the Win API. It works fine when in the IDE. When I make an EXE file and run it, the program crashes. The WriteFile and ReadFile calls seem to be the problem. Can anyone give me a possible reason for this?
Thanks.
Thanks.
RE: Win API calls work in Visual Basic 6 IDE but not in EXE file
RE: Win API calls work in Visual Basic 6 IDE but not in EXE file
Crashing usually means memory/stack corruption. You may want to check the parameters to these funtions. Are these of the correct type and size? Are you maybe specifying an empty stringbuffer to readfile, etc. etc.
Greetings,
Rick
RE: Win API calls work in Visual Basic 6 IDE but not in EXE file
Al
RE: Win API calls work in Visual Basic 6 IDE but not in EXE file
Chip H.
____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first