' Copyright (c) 2002 Dan Mount and Ghostgum Software Pty Ltd ' ' Permission is hereby granted, free of charge, to any person obtaining ' a copy of this software and associated documentation files (the ' "Software"), to deal in the Software without restriction, including ' without limitation the rights to use, copy, modify, merge, publish, ' distribute, sublicense, and/or sell copies of the Software, and to ' permit persons to whom the Software is furnished to do so, subject to ' the following conditions: ' ' The above copyright notice and this permission notice shall be ' included in all copies or substantial portions of the Software. ' ' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ' EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ' MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ' NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ' BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ' ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ' CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ' SOFTWARE. ' This is an example of how to call the Ghostscript DLL from ' Visual Basic.NET. There are two examples, one converts ' colorcir.ps to PDF, the other is like command line Ghostscript. ' The display device is not supported. ' ' This code is not compatible with VB6. There is another ' example which does work with VB6. Differences include: ' 1. VB.NET uses GCHandle to get pointer ' VB6 uses StrPtr/VarPtr ' 2. VB.NET Integer is 32bits, Long is 64bits ' VB6 Integer is 16bits, Long is 32bits ' 3. VB.NET uses IntPtr for pointers ' VB6 uses Long for pointers ' 4. VB.NET strings are always Unicode ' VB6 can create an ANSI string ' See the following URL for some VB6 / VB.NET details ' http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvb600/html/vb6tovbdotnet.asp OptionExplicitOn Imports System.Runtime.InteropServices