I assume that you use GhostscriptVersionInfo.GetLastInstalledVersion() function to get installed ghostscript libraries. The error you get is because mentioned method looks into the registry to collect all installed Ghostscript locations. If you want to use specific ghostscript dll that you are shipping with your application I would recommend you to do something like this:
Cheers,
Josip
GhostscriptVersionInfo gvi = new GhostscriptVersionInfo(new Version(0, 0, 0), @"e:\myapp\gsdll32.dll", string.Empty, GhostscriptLicense.GPL);
ghostscriptRasterizer.Open(@"e:\mytest.pdf", gvi);
orGhostscriptProcessor ghostscriptProccessor = new GhostscriptProcessor(gvi);
orghostscriptViewer.Open(@"e:\mytest.pdf", gvi);
or you can pass dll as byte array like this:string pathToGsDll = @"e:\myapp\gsdll32.dll";
byte[] gsDllBinary = System.IO.File.ReadAllBytes(pathToGsDll);
ghostscriptRasterizer.Open(@"e:\mytest.pdf", gsDllBinary);
orGhostscriptProcessor ghostscriptProccessor = new GhostscriptProcessor(gsDllBinary);
ghostscriptProccessor.StartProcessing(...)
orghostscriptViewer.Open(@"e:\mytest.pdf", gsDllBinary);
I hope this helps.Cheers,
Josip