Yep, the plugin is being run from C:\Users\*\AppData\Local\Google
\Chrome\Application\4.0.249.30

So, I need to get to C:\Users\*\AppData\Local\Google\Chrome\User Data
\Default\Extensions\*extensionid*\1.0\

Looks like I'm going to have to parse the extension id from
chrome.extension.getURL() and pass it to the plugin.

Thanks

On Dec 14, 7:08 pm, Matt Perry <[email protected]> wrote:
> The "current directory" of the running NPAPI plugin won't be the extension's
> directory. It's probably the Chrome directory. I think you can get the
> directory the plugin is in through a windows API.
>
> On Mon, Dec 14, 2009 at 3:05 PM, Nathan <[email protected]> wrote:
> > I'm bundling a very large text file with my extension, which I want to
> > extract data from. To do this, I have an NPAPI plugin, with the
> > following code:
>
> > FILE * pFile;
> > char readStr[3];
> > pFile = fopen("db" , "r");
> > if (!pFile)
> >  throw 1;
> > fgets(readStr, 2, pFile);
> > fclose(pFile);
>
> > The exception is thrown, indicating the file can't be opened. The code
> > works in a stand alone program, and I've also tried fstream to read
> > the file.
>
> > I assume there's a permission issue. The file is in the same directory
> > as the DLL. How should I go about reading the file?
>
> > Thanks
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-extensions" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<chromium-extensions%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/chromium-extensions?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en.


Reply via email to