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 returns -37



The problem is here... CFStrings are not null terminated internally, so when you tell it you are giving it an array of _MAX_PATH characters, it creates a string whose length is _MAX_PATH.  As a result, it QTNewDataReference... thinks the file name is Clip_12.mov\0\0\0\0\0\0\0\0...\0, which exceeds the 63 character file limit.  You should replace the line below with the following:

CFStringRef pathstr = CFStringCreateWithCharacters(0, (UniChar*)tmpPath, _tcslen(tmpPath));

Brian


On Jun 2, 2006, at 11:21 AM, Paul Deepak wrote:

// Create a CFStringRef with the Unicode string. UniChar is also an

unsigned // short so should be compatible with tmpPath

CFStringRef pathstr = CFStringCreateWithCharacters(0, (UniChar*)tmpPath,

_MAX_PATH);


 _______________________________________________
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: 
 >RE: QTNewDataReferenceFromFullPathCFString returns -37 (From: "Paul Deepak" <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.