Null pointer exception in cs3&4 but not in cs5 / Get Plugin folder/path


 

pmstring appfold;

fileutils::getappfolder(&appfold);

string fname = appfold.getplatformstring();

fname.append("/plug-ins/myplugin.pln"); //<----- c0000005 exception in cs3&4 not in cs5

 

this code works fine cs5.

it compiles cs3 , 4 sdk, gives exeption c0000005 (accessviolation because of writing null pointer). happens on windows 7 machine (i did not test other operating systems).

 

i tried many other way receive indesign folder , append plugin subpath , filename it. either receive c0000005 exception when trying modify std::string received getplatformstring() or directly after functions return. code of hole function same cs3,4 , 5.

 

there (new) post c0000005 exception occurs on windows 7 doesn't on windows xp:

http://forums.adobe.com/thread/666366?tstart=0

 

if has solution, either solving trivial pointer problem or posting way plugins path please help.

 

first off, dumb question: using code in thread?

cs5 picky not liking indesign framework calls in thread.

you try win native code creating path , see if crashes.

 

--

 

alternatively approach code differently.

you said tried few ways, how like:

 

idfile afile;

fileutils::getappfolder(&afile);

fileutils::appendpath(&afile, "plug-ins");

fileutils::appendpath(&afile, "myplugin.pln");

pmstring thepath = afile.getstring();

 

??



More discussions in InDesign SDK


adobe

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support