Re: Getting the current song string?
- From: "Alessandro Angeli [MVP::DS/MF]" <nobody@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 22 Jul 2006 10:59:19 +0200
Dalin S. wrote:
Well the error has gone away but it still writes out the
numbers and letters (which is different for each media
file and is apparently randomized on compile?). I'm
beginning to thing that maybe it's the file writing
calls. Maybe it's writing out szName the variable as it's
storage id (making this up as I go huh :)) instead of the
data that it's actually storing? I also got an error
when I tried to write string text along with the
variable, it said something about not being able to
addpointers together.
C/C++ has no operator to concatenate C-strings (and a BSTR
is a sort of C-string). You would need to convert the BSTR
to a wstring object from the C++ STL to get an overloaded +
operator that performs string concatenation.
Maybe it's writing out the pointer
ID instead of what the data the pointer is pointing too?
or maybe I just don't know what I'm talking about...
You should use the C stdio functions instead of the C++
iostream objects to get more control:
FILE* f = fopen("G:\\example.txt","wt");
fprintf(f,"%ls",szName);
fclose(f);
However, this is now totally off-topic since you are on
multimedia-focused group and on a C/C++ programming one.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// a dot angeli at psynet dot net
.
- References:
- Re: Getting the current song string?
- From: Alessandro Angeli [MVP::DS/MF]
- Re: Getting the current song string?
- From: Alessandro Angeli [MVP::DS/MF]
- Re: Getting the current song string?
- From: Dalin S.
- Re: Getting the current song string?
- From: Alessandro Angeli [MVP::DS/MF]
- Re: Getting the current song string?
- From: Alessandro Angeli [MVP::DS/MF]
- Re: Getting the current song string?
- Prev by Date: Re: Getting the current song string?
- Next by Date: Re: Continuous WriteFile without filling disk
- Previous by thread: Re: Getting the current song string?
- Next by thread: Are exceptions and 'pixels outside its bounds' normal for WMP?
- Index(es):
Relevant Pages
|