[fpc-pascal] mciSendString with long file names
James Richters
james.richters at productionautomation.net
Tue Sep 20 15:56:03 CEST 2022
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:
Var MySoundFile:String;
mciSendString(PChar('play '+Ansistring(#34+MySoundFile+#34)),Nil,0,0);
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?
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20220920/cf1bf83f/attachment-0001.htm>
More information about the fpc-pascal
mailing list