[fpc-pascal] mciSendString with long file names
alex at dcclost.com
Tue Sep 20 17:26:04 CEST 2022
I've only ever done this like:
pcmd:='open "'+filename+'" ... '+#0;
mciSendString does return errors.. duno if that'll be helpful.
I originally used it in Virtual Pascal and had to make a partial header myself so the FreePascal one might take parameters differently.
From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> on behalf of James Richters via fpc-pascal <fpc-pascal at lists.freepascal.org>
Sent: Tuesday, September 20, 2022 9:56:03 AM
To: 'FPC-Pascal users discussions' <fpc-pascal at lists.freepascal.org>
Cc: James Richters <james.richters at productionautomation.net>
Subject: [fpc-pascal] mciSendString with long file names
I’m trying to get mciSendString() to work with long file names with spaces in them and I’m not having any success.
I know with winnows you need quotes around long file names, so I’m trying things like this:
But still it works if my file name has no spaces, but does not work if there are spaces.
I think maybe it’s my conversion to a PChar, but it works as long as there are no spaces, so I don’t know.
The name of my file is in a string because it comes from a record with a string variable in it.. part of another whole system that I don’t want to change just to get this to work.
Any one have any ideas how to get long file names with spaces to work?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal