タイトル : Re: プリンタに生データを送信する方法 投稿日 : 2006/03/20(Mon) 19:30 投稿者 : YAS
DllImportの宣言が間違っているのではないでしょうか?(自信ないけど) 例えば,OpenPrinterの宣言にpd As Longとありますが,Longの訳がないと思うんですが... IntPtrに変えて試してみてください。 (MSのサンプルはときどき間違っていてそのまま実行できないことがあると思います) Public Shared Function OpenPrinter(ByVal src As String, _ ByRef hPrinter As IntPtr, ByVal pd As Long) As Boolean End Function Public Shared Function OpenPrinter(ByVal src As String, _ ByRef hPrinter As IntPtr, ByVal pd As IntPtr) As Boolean End Function |