I know that this function IS in this dll that comes with windows xp
that allows bidirectional printing (you can search "bidispl.dll" on
MSDN). However, I keep getting the same error all day, go to bed, get
up, get the same error over and over.
PLEASE Help! Here is the code and I'm just trying to get the FIRST
function to work and there are three more:
IBidiRequest Methods
Method - Description
SetSchema Sets the bidi schema string.
SetInputData Sets the data to send to the device.
GetResult Gets the result code.
GetOutputData Gets the output data coming back from the device.
GetEnumCount Gets the number of output items.
#region Using directives
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Data;
#endregion
[StructLayout(LayoutKind.Sequential)]
public struct DOCINFO
{
[MarshalAs(UnmanagedType.LPWStr)]
public string pszSchema;
[MarshalAs(UnmanagedType.LPWStr)]
public string hr;
[MarshalAs(UnmanagedType.LPWStr)]
public string pDataType;
}
namespace PInvoKe1
{
partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string str1;
DOCINFO di = new DOCINFO();
string shipping1 = (@"\\Web1\Shipping1");
str1 = shipping1;
Win32.SetSchema(str1);
// Win32.MsgBox(0, "", str1, 0);
// Win32.MsgBox(0, hPrinter, str1, 0);
}
}
public class Win32
{
[DllImport("User32.dll", EntryPoint = "MessageBox",
CharSet = CharSet.Auto)]
public static extern int MsgBox(int hWnd, String text, String
caption, uint type);
[DllImport("bidispl.dll")]
public static extern void SetSchema(string Param);
// hr = CoInitialize (NULL);
}
public class TestPInvoke
{
}
}
Thanks for your help!
Trint