Problem Using PRNADMIN.DLL in .NET

D

Dave Wee Pei Yang

Hi,

Can anyone help? Although PRNADMIN.DLL was meant to be used by scripting
however, due to certain requirements, I had to use it in my vb.net project
as a COM interop.

When enumerating the Printers using PrintMaster, everything's ok. Problem
appears for enumerating Drivers/Forms/Ports. The exception thrown was "The
data area passed to a system call is too small.". Has anyone got a clue?

Below's is a basic code snippet;

Private PrnAdm As New PRNADMINLib.PrintMaster
Private Driver As PRNADMINLib.Driver
Private Drivers As ArrayList

Friend Function EnumerateDrivers(ByVal txtServerName As String) As ArrayList
Try
For Each Driver In PrnAdm.Drivers("\\" & txtServerName)
Drivers.Add(Driver.ModelName)
Next
Return Drivers
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Function

Regards,
Dave.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top