How do I work around PIGetStr placing an invalid character in character buffer?

In an Export plug-in, I need to read in the destination file path from scripting parameters.  Often, the character at exportPath[0] is junk and not an actual part of the path (hence the check).  Recently, this junk has actually been alphanumeric characters.  I can write a more accurate platform-dependent workaround, but would prefer an actual solution.  As a note, this happens whenever I use PIGetStr, not just in the case of reading filepaths.
Is there a standard way to handle this behavior?
Example:
case keyFilePath:
                    Str255 exportPath;
                    PIGetStr(token, &exportPath);
                    byte offset = 0;
                    if(!isalpha(exportPath[0]))
                                   offset = 1;
                    strcpy_s((char*)gDestination, 256 - offset, (char*)exportPath + offset);
                    DescParams->playInfo = 0; //Don't pop dialog.
                    break;
Result in exportPath:  Ec:\temp\assets\textures\brick_stacked_tile_01_SpecColor_gradients.dds
Expected:  c:\temp\assets\textures\brick_stacked_tile_01_SpecColor_gradients.dds

So, those things that show up in green tell you how to use someone elses programming constructs.  Fascinating stuff.
/facepalm.  I even went to the definition in PITypes.h, and looked at it and was like "Hey, it's an unsigned character array of 256 characters" and never read the comment next to it.
Thank you for answering my question.    It seems like I need to pay more attention to details in the future.

Similar Messages

  • HT1751 On an old Mac I got this message while trying to burn a CD for the car: "The attempt to burn a disc failed.  The burn failed because of a medium write error."  What does this mean?  And how do I work around it?

    On an older Mac I got this message while trying to burn a CD for the car: "The attempt to burn a disc failed.  The burn failed because of a medium write error."  What does this mean?  And how do I work around it?

    I had been getting this all morning and checked other messages from the community. THe one which worked was trying a different brand of disc.
    I had been using Verbatim which had copied the music fine off the Real Player on my PC at school, but wouldn't work with I Tunes. Tried a Staples and an Office Depot CD-R , both of which did the job.

  • Itunes 11.1.5 will not sync new apps with iPhone 5 iOS 7.0.6 and gives grayed out "install" no message?  How does one work around this?

    Itunes 11.1.5 (MacBook Pro,OS 10.6.8) will not sync new apps with iPhone 5 iOS 7.0.6 and gives grayed out "install" no message?  How does one work around this?

    Just reboot your laptop... While its rebooting try to reboot your phone also by holding the home and power buttonn for 10-15 seconds...When your phone is turned off try to connect it to iTunes and it will recognize your phone in recovery mode.
    If you have the .ipsw file for iOS 7.0.6 saved in your desktop then in itunes press shift and click on Restore.
    Select the ipsw file and let it restore.
    If you dont have it downloaded then simply click on restore.
    I hope it works
    Cheers !

  • Home Sharing turns off as soon as my computer enters sleep mode.  How can I work around this issue?

    Home Sharing turns off as soon as my computer enters sleep mode.  How can I work around this issue?

    please start firefox in safemode (by pressing the shift-key while it is launching) & go to ''firefox > options > advanced > general'' & disable hardware acceleration.
    for some background on that issue you can also refer to [https://bugzilla.mozilla.org/show_bug.cgi?id=812683 bug #812683]

  • HT202919 I need to update my ARD admin from 3.6 to 3.7 but client is at 3.8 and it errors out. How do I work around this?

    I need to update my ARD admin from 3.6 to 3.7 but client is at 3.8 and it errors out. How do I work around this?

    This is a concern amoung many corporate users.  It's going to take somekind of policy change with apple.
    Enterprise support:
    Call enterprise support  (866) 752-7753  to create  a case ID number

  • When I try to open a file I created in Pages, I get this: "The required index.xml file is missing."  This has happened many times and I have forgotten how I've worked around it.

    When I try to open a file I created in Pages, I get this: "The required index.xml file is missing."
    This has happened many times and I have forgotten how I've worked around it.

    That is wrong advice and you appear to have repeated it all over the forum.
    All Pages files no matter what version have the same file extension, .pages, despite being radically different formats and that is the problem. The System does not distinguish between them when you double click on the file, it opens the first version of Pages it encounters.
    You need to right click on the file and choose the correct App version for the file. Unfortunately there are no clues to tell you which is which.
    If you are unhappy with this and the removal of over 100 features plus the problems with transmitting files across devices, servers and different versions of OS X, rate/review Pages 5.5.2 in the App Store.
    Peter

  • My school uses ms12 i just purchased ms13 how do i work around

    my school uses ms12 i just purchased ms13 how do i work around

    it is multisim. i need to convert my homework that i did in ms13 the newest vesion to multisim 12., i understand the software is not backward compatible.
    larry

  • I upgraded my macbookpro hard drive to 1 TB then migrated my files from time machine. I'm now locked out of the computer because the password is not the same as my usual one and one that was years old and not retreivable. How do I work around this?

    I upgraded my macbookpro hard drive to 1 TB then migrated my files from time machine. I'm now locked out of the computer because the password is not the same as my usual one and one that was years old and not retreivable. How do I work around this?

    Whether or not you are able to recover the data off the drive yourself will depend on if the drive suffered any impact damage in the crash. You can buy USB SATA or IDE adapters (Intel and almost all G5 use SATA) that will let you connect your hard drive to a computer (like a flash drive) to see if you can recover the data. If the drive has suffered physical damage if may not mount.
    If you know someone who has one of these adapters you could try using theirs, otherwise you could buy one but you take the risk of the data on the drive being non recoverable. Regardless, both are much cheaper than $1699!
    (Alternatively, if you know of someone with a Mac Pro or PowerMac G5 they may be able to install the drive in their machine and try to boot from or mount it and copy the data off.)

  • Someone changed my mother's adminstrative password.  Now she can't update software or make changes.  How do you work around that?

    Someone changed my mother's administrative password, and that person can't remember what he changed it to.  How do I work around this? 

    You have to get the install disc that came with the computer and boot to it.
    Put the cd in and restart the computer. Hold down the C key and it will bo into the installer.
    Once in you can click on the top menu and select reset password. Click the user and reset the password.

  • How can I work around a DVD burning problem

    Steve Grisetti: How can I work around a DVD burning problem?
    Question: Does PSE and PE -7 solve this problem or make any difference at all?
    Joanna

    This article, from the FAQ list at the top of this forum, is valid for all versions, since it may be a problem for any.
    http://www.adobeforums.com/webx/.59b5f52c
    The problem is not so much with Premiere Elements as it is with challenges faces in the operating system registry. Basically, DVD burner programs, like Nero, which are installed on your computer at the factory, refuse to share access to the DVD burner with other programs.

  • How do I work around a JDBC driver "unsupported function"?

    We have a JDBC driver to a Unidata [multivalue, a truely interesting concept] database. It does not support setMaxRows(). The 10.1.3dp3 version throws an exception:
    Internal Exception: java.sql.SQLException: setMaxRows(int) not supported by eTools JDBC.Error Code: 0
    Query:DataReadQuery()
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:280)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:567)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:442)
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:453)
    and our application fails.
    The driver maker suggests the JDBC spec says the function must be present but it may throw an unsupported exception.
    And toplink does not appear to handle the unsupported exception gracefully.
    So we appear to be stuck between the rock and the hard place.
    Any help would be appreciated.

    We can add setFetchSize to the list of work arounds required.
    Internal Exception: java.sql.SQLException: setFetchSize(int) not yet implemented by eTools JDBC.Error Code: 0
    Query:ReadObjectQuery
         at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:280)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:567)
         at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:442)
         at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:453)
         at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
    So the question becomes, in general, how does one indicate to toplink that the driver has unsupported functions and it should (a) ignore them or (b) deal with it.

  • How do i work around 2 different frame rates in same sequence??

    hello,
    a client of mine just shot a video using two frame speeds...24PA and regular 24p.
    how can i get around this? so far i captured the 24PA footage using the pulldown in the FCP, and the 24P in a regular 48k capture...
    i am currently editing in a 23.98 timeline, but the 24p footage looks slower...HELP!
    thanks,
    steve

    hi kyle,
    sorry, but just to elaborate on your response a little while ago here:
    - i captured the 24PA footage using the advanced pulldown
    - i captured the 24P footage using no pulldown
    - i am editing in a 29.97 timeline now, as most of my footage was shot with 24P
    please let me know your thoughts on how i should go about working with this footage!
    thanks!
    steven

  • How do I work around incorrect capture scratch disk use estimates in FCP?

    Hi Everyone,
    I am trying to find a work around solution for FCP incorrectly estimating the space required on my capture scratch disk. I am using a Panasonic AJHD1400 to play back some DVCAM footage. I want to capture it 720x480 Anamorphic H264, via the firewire output on the deck. I am able to "free" capture the clip by hitting play on the deck and crash recording ("capture now") on the log and capture tool. From this process, I know the final captured file will be somewhere in the 3GB range, give or take. The clip is a little less than an hour long. I have 343 GB available on my scratch drive according to the information in the "Capture Settings" tab of the log and capture tool but according to the same info FCP thinks only 36.9 minutes of footage will fit on the disk. Consequently I can't log and capture the clip properly due to "insufficient disk space". What gives?
    Any suggestions and responses will be appreciated.
    Thanks in advance

    It isn't an Easy Setup per se. I modified the "generic capture" template in the capture preset editor to use DV video from the AJHD1400 as the "Digitizer" and set the "Compressor" to be h.264 at 100% quality.
    The whole point of the strange capture is for our sound editorial staff to edit to in pro tools. We don't have networked video storage for our audio department. If i capture in DV, the files are still like 20GB. using my "custom" settings I get a reasonably sized file that looks decent enough for the editors in a file that is small enough to fit on a data dvd if need be. I save rendering time as well.

  • Work around for User ID 32 character limitation in CCX Agent?

    Are there any kind of creative work arounds for getting past the ridiculous 32 character limit when logging into the CCX Agent?
    We are moving toward using the User Principal Name (UPN) in CUCM LDAP which means that the domain is now tacked onto the end of their existing User IDs.  We are doing this so that users from multiple domains can authenticate to various Cisco tools and apps.  It works very well, except when firing up the Agent!
    I've already been playing around with UPN suffixes, and while I can get them to show up in CUCM (and subsequently), I can't seem to get them to authenticate.
    I shouldn't even have to get this creative, just remove the 32 character limit, Cisco!
    We are running CCX 8.5 and CUCM 8.6

    Hi ,
    I am not aware about any such workarounds.
    After referring to the below guide,
    http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_8_5/configuration/guide/uccx851ag.pdf
    On page 78, it is mentioned as,
    Caution : When logging into Cisco Agent Desktop, agents use the Unified CM user ID and password. While the Unified CM limits agent IDs to 128 alphanumeric characters, the Unified CCX limits agent IDs to 31 alphanumeric characters. Be sure to abide by the 31 character-limit when configuring agents in Unified CM.
    I am sure even if it works by some workarounds also, you may see some issues specially from the CAD\CSD\CDA side, which Cisco will not support it quoting the same above reason.
    Hope it helps,
    Anand
    Please Rate helpful posts !!

  • How can I work around this issue when buying a new mac? And what will the difference be in speed?

    OK. In a nutshell.
    I am getting render times (converting to H.264 for web, 8000kbps, 720x1280) of about 25 minutes with my current Macbook Pro - 4GB ram. Without doing anything else with the machine.
    First question - how much can I reasonably expect this time to reduce to with:
    A. 21.5-inch: 2.5GHz
    2.5GHz Quad-Core Intel Core i5
    1920 x 1080 resolution
    4GB (two 2GB) memory
    500GB hard drive1
    AMD Radeon HD 6750M with 512MB
    - - - OR - - -
    B. 15-inch: 2.2 GHz
    2.2GHz quad-core
    Intel Core i7
    4GB 1333MHz
    500GB 5400-rpm1
    Intel HD Graphics 3000
    AMD Radeon HD 6750M with 512MB GDDR5
    Built-in battery (7 hours)2
    Am I going to buy myself much time?
    Secondly I would like to keep my existing MacBook Pro. Installed on this machine I have FCP 6. I regulary edit as I own a produciton company. I cannot upgrade to Lion as it does not support FCP 6.
    I could upgrade to FCP 7 (which would cost a fortune and still would only provide one licence) or FCP 10. The later is attractive, but looking at Apple's Specs, I meet all the specs on my MacBook bar the graphics card. I have a GL Graphics Card (GeForce 8600M GT) but for some reason this is excluded from the list of acceptable graphic cards.
    So...the possibilities are:
    A. Get a iMac. Downgrade it to Snow Leopard. Back up from my Time Machine so FCP is now on both machines. Is this even possible? Since the license will only cover one machine?
    B. Get a iMac. Keep as Lion and buy FCP 10. Upgrade MacBook to Lion, but partition the drive with Snow Leopard so I can still have FCP 6. Download FCP 10 to my MacBook and hope it works even though my graphics card is not supported (I hear it might). How do I even get FCP 10 on my MacBook? Will it tell me I cannot install it because it recognises I don't have the right graphics card?
    C. Get a MacBook Pro. Do all the above, but if it doesn't work, sell my old MacBook Pro.
    Any help on this matter would be greatly appreciated.

    The warranty will be valid within one year from the original date of purchase. this is the date that the device was purchased either from apple or an apple authorized reseller.
    you are able to purchace the applecare protection plan within one year of the original date of purchase as well, provinding there is no accidental damage to the device.
    This page pertains to your question:
    http://www.apple.com/support/products/faqs.html
    hope it helps.

Maybe you are looking for