VB.NET怎样获取传真机的信息?

it_gz_xi 2007-10-31 09:29:37
各位大虾帮帮忙。怎么获取传真机的信息,并且修改传真的状态,比如说挂起;暂停;继续
...全文
427 17 打赏 收藏 转发到动态 举报
写回复
用AI写文章
17 条回复
切换为时间正序
请发表友善的回复…
发表回复
it_gz_xi 2007-11-05
  • 打赏
  • 举报
回复
怎么给帖子加分
it_gz_xi 2007-11-02
  • 打赏
  • 举报
回复
如何获取打印机作业的状态?又如何修改状态呢??
it_gz_xi 2007-11-01
  • 打赏
  • 举报
回复
谢谢楼上帮顶
zhang_dl 2007-11-01
  • 打赏
  • 举报
回复
关注,楼主问题解决没?
如果解决了,请分享一下
it_gz_xi 2007-11-01
  • 打赏
  • 举报
回复
发传真已经发送了,想问以下传真可以发到邮箱吗?
it_gz_xi 2007-11-01
  • 打赏
  • 举报
回复
谢谢大哥啊
nopingno 2007-11-01
  • 打赏
  • 举报
回复
幫你頂上去。。呵呵。。看你一個人回拉這麼多也不容易啊。
kongweibin 2007-11-01
  • 打赏
  • 举报
回复
看不懂!!
it_gz_xi 2007-10-31
  • 打赏
  • 举报
回复
连接传真机出错了是怎么回事??
objFaxServer.Connect("Fax")

System.Runtime.InteropServices.COMException was unhandled
ErrorCode=-2147023174
Message="Connection to fax server failed."
Source="FaxComEx.FaxServer.1"
StackTrace:
at FAXCOMEXLib.FaxServerClass.Connect(String bstrServerName)
at WindowsApplication1.Form3.Button3_Click(Object sender, EventArgs e) in C:\Documents and Settings\Administrator\桌面\WindowsApplication1\WindowsApplication1\Form3.vb:line 156
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
it_gz_xi 2007-10-31
  • 打赏
  • 举报
回复
我是新人啊,好多不会啊,求救!.dll怎么加进去?
it_gz_xi 2007-10-31
  • 打赏
  • 举报
回复

Dim objFaxServer As New FAXCOMEXLib.FaxServer 'Fax server object

Dim objFaxActivity As FAXCOMEXLib.IFaxActivity 'Fax activity Object

Dim collFaxDevices As FAXCOMEXLib.FaxDevices 'Fax devices object

Dim intTotJobCnt As Integer 'Job and device count

Dim objBalFileWritter As StreamWriter 'object to write text



'connect to the fax server.

objFaxServer.Connect("fax-server1")



'work out how many jobs are on the server by adding up the outgoing and queued

objFaxActivity = objFaxServer.Activity



'Refresh the activity object

objFaxActivity.Refresh()



'get the current numbers

intTotJobCnt = objFaxActivity.OutgoingMessages + objFaxActivity.QueuedMessages



'now write it out to the bal file along with the no of modems on this server

collFaxDevices = objFaxServer.GetDevices



'open the file for writing and put the message into it on a new line

objBalFileWritter = File.AppendText("c:num_jobs.log")

objBalFileWritter.WriteLine("Time:" & Now())

objBalFileWritter.WriteLine("Modems:" & collFaxDevices.Count)

objBalFileWritter.WriteLine("Total Faxes:" & intTotJobCnt)

objBalFileWritter.WriteLine("Outgoing: " & objFaxActivity.OutgoingMessages)

objBalFileWritter.WriteLine("Queued: " & objFaxActivity.QueuedMessages)

objBalFileWritter.WriteLine("Incoming: " & objFaxActivity.IncomingMessages)

objBalFileWritter.Close()

FAXCOMEXLib是不能用的,好象要添加 FAXCOMEXLib.dll
it_gz_xi 2007-10-31
  • 打赏
  • 举报
回复
有人来帮忙吗??
it_gz_xi 2007-10-31
  • 打赏
  • 举报
回复

上述问题是在向传真发文件的时候出错的
it_gz_xi 2007-10-31
  • 打赏
  • 举报
回复
我实现发传真使用FAXCOMEXLib. DLL
程序运行会报错:
System.Runtime.InteropServices.COMException (0x80070483): Operation failed.
at FAXCOMEXLib.FaxDocumentClass.ConnectedSubmit(FaxServer pFaxServer)
不知如何解决.
安装windows自带的fax功能,可以实现传真
出错代码:objFaxDocument.ConnectedSubmit(objFaxServer)
it_gz_xi 2007-10-31
  • 打赏
  • 举报
回复
怎么样才可以修改传真的状态呢?求教
it_gz_xi 2007-10-31
  • 打赏
  • 举报
回复
已经解决错误。连接写的是电脑名
it_gz_xi 2007-10-31
  • 打赏
  • 举报
回复
错误已经解决,原来要写电脑名的

16,554

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧