- - PR -
用紙サイズ(幅、高さ)の指定
投稿者 | 投稿内容 |
---|---|
|
投稿日時: 2004-11-30 23:24
上のサンプルは落ちる事が判明。
Public Structure FORM_INFO_1 Public Flags As Int32 Public pName As String Public Size As SIZEL Public ImageableArea As RECTL End Structure ↓ Public Structure FORM_INFO_1 Dim Flags As Integer Dim pName As Integer Dim Size As SIZEL Dim ImageableArea As RECTL End Structure として、 MoveMemory(udtFormInfo1, _ bytFormInfo1Buffer(0), _ Len(udtFormInfo1)) の前に Dim ptrNameHandle As IntPtr = Marshal.AllocHGlobal(20) Dim pNameHandle As Integer = ptrNameHandle.ToInt32 udtFormInfo1.pName = pNameHandle を記述。 ptrNameHandle は使い終わったら、 Marshal.FreeHGlobal(ptrNameHandle) で開放。 |