Tech Off Thread

17 posts

Sending a fax through NET platform

Back to Forum: Tech Off
  • Richard1975

    Hi all,

    I am developing an application (developed in C#) that will give the user the ability to send a fax.

    However, I haven't come across any .NET libraries to do this (I am still new to the platform). From my investigations I am considering going down the path of developing a wrapper to the MAPI API in c#, is this a crazy idea?. 

    However, I am not too keen on this as I have no idea how long this is going to take me to do. 

    If anyone out there could give me any suggestions on what would be the best option to take and/or libraries in .NET, if they exist. I would greatlty appreciate this.



  • Richard1975

    I forgot, There is no mail server eg exchange running on the machine.

  • rhm

    Go to http://www.componentsource.com and search for "fax". There don't appear to be and 'pure' .NET fax components available, but they have activeX components which you can call from .NET.

  • figuerres

    CaptainOblivious wrote:

    Hi all,

    I am developing an application (developed in C#) that will give the user the ability to send a fax.

    However, I haven't come across any .NET libraries to do this (I am still new to the platform). From my investigations I am considering going down the path of developing a wrapper to the MAPI API in c#, is this a crazy idea?. 

    However, I am not too keen on this as I have no idea how long this is going to take me to do. 

    If anyone out there could give me any suggestions on what would be the best option to take and/or libraries in .NET, if they exist. I would greatlty appreciate this.





    any user -- is this for commercial / wide distribution or a target user ??

    for example some printers have faxing built in, my HP all-in-one can just "Print" to a second print driver that will fax the document.

    if you have users with that kind of multi-function printer in an office you might be able to just use that printer and it's print dialog.

    if you need to enable any random user to fax a document then you need to know if that user has a modem attached to a phone line -- if they don't then you may need to have a way to route the document to a fax converter that can be in-house hardware or some third party services.

    just a few things you may need to look at depending on who your target users are.

  • Maurits

    Are you trying to enter the POTS at the client, or are you going to use a TCP connection to a server with a phone (like eFax?)

  • figuerres

    Maurits wrote:
    Are you trying to enter the POTS at the client, or are you going to use a TCP connection to a server with a phone (like eFax?)


    Just in case some folks don't know the term:

    POTS = Plain Old Telephone Service

    which means normal phone lines and touch tone dialing
    as opposed to stuff like ISDN and Cable based VOIP phone service or wireless / cellular / digital etc...

  • Richard1975

    Maurits wrote:
    Are you trying to enter the POTS at the client, or are you going to use a TCP connection to a server with a phone (like eFax?)



    Maurits,

    At this stage I'm trying to use POSTS at the client.

    There are no plans to use a TCP connection.

    I was just hoping that my application will send the document through POSTS with the corresponding number and the fax machine at the other end interpret that the data is to be produced as a fax and therefore print out the document.

    Basically, I want an API to convert the document into a fax language with the number so the fax machine at the other can interpret this and print the contents of the fax.

    has this helped ?


  • Maurits

    Sounds like TAPI will do what you want

  • rhm

    Maurits wrote:
    Sounds like TAPI will do what you want


    TAPI plus about 30,000 lines of additional code. Take my advice and buy a component.

  • Eddie

    Are you using XP.. Try the built in Faxing.. It's a simple COM component that can be used from .net.. It takes 4 lines of code to send a fax...

    Just use "Add/Remove Windows Componenets" and select Faxing.... It's that simple...

  • Richard1975

    Eddie,

    I'm Using XP Sp2, client computers are using Windows2000 and XP SP1 or XP SP2.

    However, I think I am mssing something here. I have added the reference to the COM component. Then I typed the following:

    FAXCONTROLLib.FaxControl fc = new FAXCONTROLLib.FaxControlClass();

    The only available methods from fc are:  InstallFaxService() & InstallLocalFaxPrinter().
     
    I have also tried with the interface objects ie. IFaxControl and FaxControl with no success.


    If you have used this component before and if you wouldn't mind if you could provide some code, I would greatly appreciate this.



     

     

  • Sam Vel

    Hello

    Few months back I did the same project in case you need any help contact me

    Regards

  • guerrero

    Hi, I am having the same kind of trouble.
    Need to send a fax from my C# application but cannot find the .NET component.
    Only find the FAXCONTROLLIB and the faxcom.dll then I will need to create a wrapper to be able to use it on .NET

    Do we have to wrap a COM dll to do this? is there any Namespace that contains such a class?

    Any suggestions.

    tks

  • CiaoRoma
  • LAcike

    Do somebody know how to call FAXCOMLib or FAXCOMEXLib from application implemented as windows service?

    If the application is standard executable, everything is ok. When the application is windows service it freezes/hangs on Connect(""); command. IMHO it is something with permissions, but who knows?


    Thanks for help

  • ScanIAm

    LAcike wrote:
    Do somebody know how to call FAXCOMLib or FAXCOMEXLib from application implemented as windows service?

    If the application is standard executable, everything is ok. When the application is windows service it freezes/hangs on Connect(""); command. IMHO it is something with permissions, but who knows?


    Thanks for help


    It probably IS an issue with permissions.  If you look at the service options for that service, you'll see that there are a couple of different ways that the service can log on.  Play with those until you get it to work.

    If you aren't sure where to find the service options, go into control panel, choose administrator tools, and look for the 'services' control panel applet.  From there, find your service, right-click, and choose properties.

  • panj

    ScanIAm said:
    LAcike wrote:
    Do somebody know how to call FAXCOMLib or FAXCOMEXLib from application implemented as windows service?

    If the application is standard executable, everything is ok. When the application is windows service it freezes/hangs on Connect(""); command. IMHO it is something with permissions, but who knows?


    Thanks for help


    It probably IS an issue with permissions.  If you look at the service options for that service, you'll see that there are a couple of different ways that the service can log on.  Play with those until you get it to work.

    If you aren't sure where to find the service options, go into control panel, choose administrator tools, and look for the 'services' control panel applet.  From there, find your service, right-click, and choose properties.
    Change Connect("") to Connect(Environment.MachineName);

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.