GhostScriptSharp/GhostscriptSharp.cs
/// <summary>
/// Calls the Ghostscript API with a collection of arguments to be passed to it
/// </summary>
Calls the Ghostscript API with a collection of arguments to be passed to it
Calls the Ghostscript API with a collection of arguments to be passed to it
private static void CallAPI(string[] args)
		{
			IntPtr gsInstancePtr;
			lock (resourceLock)
			{
				CreateAPIInstance(out gsInstancePtr, IntPtr.Zero);
				try
				{
					int result = InitAPI(gsInstancePtr, args.Length, args);
					if (result < 0)
					{
						throw new ExternalException("Ghostscript conversion error", result);
					}
				}
				finally
				{
					Cleanup(gsInstancePtr);
				}
			}
		}
private static void CallAPI ( string [ ] args ) { IntPtr gsInstancePtr ; lock ( resourceLock ) { CreateAPIInstance ( out gsInstancePtr , IntPtr . Zero ) ; try { int result = InitAPI ( gsInstancePtr , args . Length , args ) ; if ( result < 0 ) { throw new ExternalException ( " " , result ) ; } } finally { Cleanup ( gsInstancePtr ) ; } } }
Calls the Ghostscript API with a collection of arguments to be passed to it
Calls the Ghostscript API with a collection of arguments to be passed to it
// Get a pointer to an instance of the Ghostscript API and run the API with the current arguments
args
string[]