<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
hello everyone.<br>
<br>
after reading through the api manual of the ogg vorbis win32 sdk, i
tried to implement a very simple comment reader in visual c++. but for
some reason the very first operation to initialize the OggVorbis_File
struct keeps failing and i can't figure out why. is there anything i
might not have considered? The memory exception seems to happen deep
within the calling tree of ov_open, in some operation that ms seemed to
have implemented. but i believe i followed all rules (binary mode and
so on), so this should not happen. i hope, someone can give me a hint.<br>
<br>
thanks.<br>
<br>
wan-hi<br>
<br>
<small><font face="Helvetica, Arial, sans-serif">void
ProcessOGG(LPCTSTR pFilePath, MetaData& data)<br>
{<br>
OggVorbis_File vf;<br>
vorbis_info *info;<br>
vorbis_commen *comment;<br>
<br>
///////////////////////////////////////////////////////////////////////////<br>
// 1) OPENING AND INITIALIZING THE OGG VORBIS FILE<br>
///////////////////////////////////////////////////////////////////////////<br>
<br>
//Let's open the file in binary mode for reading.<br>
if (_topen(pFilePath, _O_RDONLY | _O_BINARY) == -1)<br>
{<br>
data.valid = false;<br>
return;<br>
}<br>
<br>
// Let's initialize the OggVorbis_File.<br>
if(ov_open(stdin, &vf, NULL, 0) < 0)<br>
{<br>
_close(0);<br>
data.valid = false;<br>
return;<br>
}<br>
.....<br>
}<br>
</font></small>
</body>
</html>