Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QTNewDataReferenceFromFullPathCFString usage



Siddharth Mathur <email@hidden> wrote:

I am writing a simple command-line app on Win32 using the QT 7.1 SDK that
exports the poster-frame in a MOV file to an image file (e.g PNG).

When I attempt to get a dataref via
QTNewDataReferenceFromFullPathCFString() for a new (non-existent) image
file it returns an error of -50.

What is the correct way to get a dataref for new and non-existent files?

//My code (sans the error checks)
imageStrRef = CFStringCreateWithCString (0,  argv[2], 0);
QTNewDataReferenceFromFullPathCFString(imageStrRef,
             kQTNativeDefaultPathStyle,
             0, &imageDataRef, &imageDataRefType);

Did you check that CFStringCreateWithCString returned a non-NULL value? That last 0 parameter to CFStringCreateWithCString seems doubtful, since it indicates that you're using the Mac Roman encoding. I don't know what character encoding is used for command line parameters on Windows, but I'd guess that it's either Windows Latin-1 or UTF-8.


What does the path argument you passed look like?
--
  James W. Walker, ScriptPerfection Enterprises, Inc.
  <http://www.write-brain.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden
References: 
 >QTNewDataReferenceFromFullPathCFString usage (From: Siddharth Mathur <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.