NetTalk Support
  NetTalk header
Vote for this Product at ClarionShop
 
Buy now at ClarionShop
Version version number beta
CapeSoft Software Copyright
www.capesoft.com
Updated
07 July 2020
c3pa approved
     

NetTalk Support

horizontal rule
Learn NetTalk (great for New users)
NetTalk Examples
NetTalk Protocol Objects
NetTalk Protocol Objects
NetSimple Objects
NetDUN (Dial-Up Networking Object)
NetTalk Support - Important Information
NetTalk Future & History
Learn NetTalk
Examples
Common
Features
NetAuto
Objects
NetSimple
Objects
Dial-Up
Support
Version History
  recommended reading bullet = recommended reading
horizontal rule
 
Contents - Support
  recommended reading bullet How to get Support (read this first)  
recommended reading bullet Top 10 Questions
recommended reading bullet FAQ - Frequently Asked Questions
recommended reading bullet Error messages
recommended reading bullet LOG files - How to create LOG files

    Multi-DLL applications and NetTalk
    Legacy applications and NetTalk
    Web Builder applications and NetTalk
    How to check TCP/IP is installed on your machine
    Glossary

 recommended reading bullet

Submit a Question to CapeSoft Support
     

horizontal rule

Support

bullet How to get Support for NetTalk (read this first) (recommended reading)

We've designed this page to help you get the fastest and most accurate support for NetTalk.

This is what we suggest:

1) If you think you've found a bug, please make sure you are running the latest version of NetTalk. Upgrades are free and can be downloaded from www.capesoft.com/accessories/netsp.htm. You can check what version you are running by either looking in Global Extension at the NetTalk template, or looking in the template registry (under the Setup menu in Clarion).
2) One of the easiest ways to create a network application is to start off by using the code in the examples. There are lots of examples, that will help you get going.
Tip: These examples are also a great place to try and reproduce any oddities or errors you are getting in your application. (see Examples section).
Most of the NetTalk objects are demonstrated in the NetDemo.app file. For example if you are struggling with Email, Web, FTP, Close Apps etc. then you can compare the behaviour of the NetDemo application with your application. This can help you find bugs in your application, or it confirms a bug in NetTalk.
3) Have a look in the FAQ (Frequently Asked Questions) - maybe what you are dealing with has cropped up before and been answered. There's even a list of the Top Ten Questions.
4) If you are getting error messages (compiler or run-time), be sure to look them up in the Error Message section.
5) NetTalk has an impressive logging system , which enables you to generate LOG files, so that you can "see" what is going on in the background. This info is available in the How to Create LOG files section.
6) We've also listed some special topics that may be helpful:
  • Legacy Applications,
  • WebBuilder Applications,
  • Multi-DLL Applications,
  • Check TCP/IP on your machine,
  • We've also included a Glossary.
7) Another increasing large cause of issues are Firewall type applications that block TCP/IP and UDP traffic. These come in all sorts of shapes and sizes:
  XP SP2 - turns on the Windows Firewall. (More info here Q842242)
  Personal Firewalls and Proxy systems.
  Anti-Virus applications and Internet Security systems
    (note: Some Anti-Virus apps also have Email proxy agents that may
     prevent your application from sending or receiving emails).

The easiest way to diagnose if these are the fault is to temporality disable them and see if you application works. Often once, you've worked out this is the problem you can turn the firewall application back on, and then configure it to allow your application to work..
8) If none of the above is helping then please submit a Support Question to CapeSoft.

horizontal rule

bulletTop 10 (or So) Questions (recommended reading)

Question - A3 How do I make sure I am running the latest NetTalk version?
Question - A23 What's the difference between the NetAuto objects and the NetSimple objects?
Question - G7 What changes in NetTalk from NetTalk version 3 to version 4 will affect my NetTalk 3 applications
What changes in NetTalk from NetTalk version 2 to version 3 will affect my NetTalk 3 applications
Question - A21 How can I tell if a user is connected to the Internet?
Question - G2 When I use NetSimple I send 9 packets from my NetSimple client to my NetSimple Server, but they get joined together and arrive as 2 packets. Is this normal?
Question - G3 Sometimes my NetSimple messages arrive mangled. If I send a lot of messages, a number of them arrive as one message. Is there any way to force NetSimple to send different messages as separate IP packets?
Question - D1 How do I suppress NetTalk error messages?
Question - D3 How do I turn on the NetTalk log file option?
Question - J1 How can I get Web HTTPS (Secure) pages?
Question - G8 NetTalk (NetSimple) crashes or doesn't work  when I use SSL. What can I do?
Question - H4 What's the difference between SMTP and MAPI Email Sending? Which one is better?
Question - A4 I want to write a NetAuto (not NetSimple) application that works over the Internet or a WAN where do I start?
Question - A10 How do I make my NetAuto application connect to another machine over the Internet?
Question - A3 I think I am running different versions of NetTalk together and it's not working, how do I clean this up?
Question - A22 It's just not working. What should I do?

horizontal rule

bulletFAQ Frequently Asked Questions (recommended reading)

I'm getting Compile Errors

List of Questions that are tackled:

NetTalk & NetAuto
A1)   Question I've got a NetAuto NetClient object on my frame (or main window) and I've put some nettalk code in my window.init, but it's not working.
A2)   Question I've put a NetAuto object code in a window that quickly opens, does something and then closes, but the NetTalk is not working.
A3)   Question How do I re-install NetTalk?
A3)   Question How do I make sure I am running the latest NetTalk version?
A3)   Question I think I am running different versions of NetTalk together and it's not working, how do I clean this up?
A4)   Question I want to write a NetAuto (not NetSimple) application that works over the Internet or a WAN where do I start?
A5)   Question What are NetDIP and NetAutoRemote all about?
A8)   Question Why does the DOS driver keep getting added to my application when I use NetTalk?
A9)   Question What does VIRTUAL mean, and why do I have to set the Prototype of some methods to "(), VIRTUAL"?
A10) Question How do I connect my NetAuto application to another machine over the Internet?
A11) Question How do I get NetAuto to work through a firewall or Proxy Server?
A12) Question If I have 5 users using the Internet (Let's assume I know Their IPs) Where Should I insert The NetAutoRemote command so they can all see each other?
A13) Question How does NetAuto really work?
A14) Question How does NetAuto know about the machines on my LAN?
A15) Question How does NetAuto communicate over the Internet or my WAN?
A16) Question If I set self.broadcast=1 does it send data to every PC on my LAN?
A17) Question What Ports does NetAuto use?
B4)   Question I have built an NT service using NetTalk, but NetTalk does not seem to be working. What's wrong?
A19) Question I would like to try out NetTalk in my program before I purchase it. Do you have a demo for me to try out?
A20) Question We are mass producing pre-configured hard-drives (ghosting hard-drives). Is there anything I need to bear in mind.
A21) Question How can I tell if a user is connected to the Internet?
A22) Question It's just not working. What should I do?
A23) Question What's the difference between the NetAuto objects and the NetSimple objects?

Windows 2000 / XP
B1) Question  I am running Windows 2000 / XP, and if I can not connected to a LAN, my NetTalk only works when I connect to the Internet.
B2) Question  I am getting error 10065, "No route to host" Errors on Windows 2000 / XP
B3) Question  NetTalk keeps disabling my Windows 2000 / XP Media Sense option. How do I stop it doing this?
B4) Question  I have built an NT service using NetTalk, but NetTalk does not seem to be working. What's wrong?

 
Dial-Up Networking
C1) Question  I am running Win95 and get "No Domain Server Was Available to Validate" errors. How do I fix this?
C2) Question  I am running Win95 and want to upgrade by Dial-Up Networking? Is there a Microsoft patch?
C3) Question How do I detect if I am on the Internet?

Errors, Logging & Debugging
D1) Question  How do I suppress NetTalk error messages?
D2) Question  How do I change the NetTalk error messages?
D3) Question  How do I turn on the NetTalk log file option?
D4) Question I'm getting an Error -73 when trying to open an SSL connection.

Legacy
E1) Question  I am building a Legacy application in Clarion 5 and when I run my app it GPF's immediately. (Can be that it GPFs before the frame window appears). What am I doing wrong?

NetRefresh
F1) Question  I am trying to use NetRefresh, but it doesn't refresh

NetSimple
G1) Question What are good TCP ports to use for my server application?
G2) Question When I use NetSimple I send 9 packets from my NetSimple client to my NetSimple Server, but they get joined together and arrive as 2 packets. Is this normal?
G3) Question Sometimes my NetSimple messages arrive mangled. If I send a lot of messages, a number of them arrive as one message. Is there any way to force NetSimple to send different messages as separate IP packets?
G4) Question I am getting -34 (ERROR_ClientNotConnected) errors - what do I do?
G5) Question I am using a NetSimple Server. How should I best manage the multiple incoming connections?
G6) Question It's just not working what should I do?
G7) Question What changes in NetTalk from NetTalk version 3 to version 4 will affect my NetTalk 3 applications
What changes in NetTalk from NetTalk version 2 to version 3 will affect my NetTalk 3 applications
G8) Question NetTalk (NetSimple) crashes or doesn't work  when I use SSL. What can I do?
A23) Question What's the difference between the NetAuto objects and the NetSimple objects?
G9) Question How do I get NetSimple to work with SSL?

 
Email
H1) Question  I am getting 550 Relaying Prohibited Errors when trying to send email. What's going on?
H2) Question  I am using Exchange Server. Internal email sent from NetTalk works fine, but my external emails are never delivered. What's going wrong?
H3) Question  I want to extend the self.DataQueue queue to hold more information, so that I can work out which of my emails were sent successfully or not.
H4) Question  What's the difference between MAPI and SMTP Email? Which one is better?
H5) Question I want to be able to read in the contents of a MHT file and extract the text or HTML or attachments from this file. Where do I start?
H6) Question How do I save the returned email as an EML file?

Web
J1) Question  How can I get HTTPS (Secure) pages?
J2) Question  I'm doing a post to a webpage, but not all the data is getting there.
J3) Question  How do I Post data to an HTTPs web server, and how do I determine the Post string that is required?.

 

bullet smallCompile Errors

CE1): Question: I get a whole list of NetTalk compile errors when compiling a non-NetTalk Data-DLL application. How come?

Answer: You need to add the Supperss NetTalk global extension template to the Data-DLL.


bullet small NetTalk & NetAuto


A1) : Question: I've got a NetAuto NetClient object on my frame (or main window) and I've put some NetTalk code in my window.init, but it's not working.

Answer: Okay, there are a couple of things that could be causing this:


1) If this is the first object that you are using, you need to be aware that NetTalk needs a small amount of time to initialise. Your NetClient needs time to locate the Servers or Public Clients that are out there on your network. This takes a small amount of time.

So trying to get your NetAuto NetClient object to send data in the window.init is not advisable, as your NetClient won't know about the other machines on your network yet. The best place to put your code is in the ServersChanged() method. This method is called when the list of servers changes. (You will often find it gets called more than once.) So the best kind of code to put in here is something like this:

In ServersChanged() method:
if records (self.servers) > 0   
  if FirstFlag = 0
    FirstFlag = 1
    <Do your processing here>
  end
end


make sure you declare FirstFlag as a byte in the local data section.

 



A2) : Question: I've put NetAuto object code in a window that quickly opens, does something and then closes, but the NetTalk is not working.

Answer:
1) See FAQ A1 - Try putting some code in your ServersChanged() method.
2) If you are using a frame, try putting a "dummy" NetClient object on the Frame or main window of your application. This will mean that NetAuto is fully initialised before you call your procedure window. You can set the service name to something unique and set the object to private in the extension template.



A3): Question : How do I re-install NetTalk
A3) : Question: How do I make sure I am running the latest NetTalk version
A3) : Question: I think I am running different versions of NetTalk together and it's not working, how do I clean this up?

Answer: To find out what version of NetTalk you are running - look in your Global Extensions of an application that uses NetTalk or look in your Template Registry.

To "clean" up your NetTalk install, here's what we suggest:

1) Make sure you have a backup of your code.

2) Download the latest version off the web (www.capesoft.com/nettalkd.htm). (But don't install it yet).
If you are battling to download the latest version, then the .saf file is probably being cached in a proxy between you and our site. Then try downloading from capesoft.com.
3) Make sure you don't have any NetTalk applications running that would currently be using the NetTalk DLLs, otherwise they can't be upgraded.

4) Find the following on your drive(s) and delete them:

net*.clw 
net*.inc 
nettalk.tpl 
c55net*.* 
c5net*.*
c60net*.*


5) You can also delete all the files in the following folders:

<Clarion>\Obj32 
<Clarion>\Obj32\release

6) Reboot your machine.

7) Install the install file that you downloaded in step (2).

8) Recompile your applications.



A4) : Question: I want to write an NetAuto (not NetSimple) application that works over the Internet or a WAN where do I start?
A5) : Question: What are NetDIP and NetAutoRemote all about?

Answer: [This has got to be one of the best bits of advice on this subject to date - please read the whole thing through, a lot of people are getting confused on WAN / Internet / NetAutoRemote / NetDIP and this snippet should help bring some clarity]

Important (read this first): My first recommendation would be that you create WAN or Internet applications using the NetSimple objects not the NetAuto objects. So this FAQ article is all about getting your NetAuto application to work over a WAN or Internet. There are some serious downsides to trying to use NetAuto do this - this most important one, being that your NetAuto application will not work if either end is behind a firewall or behind a proxy server. Since this is the case in the majority of Internet applications this can be very limiting. The NetAuto objects are primarily for use on a LAN only environment, and they work brilliantly at this. NetSimple objects, can be easily used on a LAN, WAN or Internet environment.

Tip 1 - A really good debugging technique is to build a small app, or even use our Demo app, to simulate the situation you're in. The Chat window is particularly good because it lists the servers simultaneously.

Tip 2 - Get this small application working on a LAN first before you try and get it to work on a WAN. The jump from LAN to WAN is not that big, but most people get confused when trying to simultaneously get the app to work in LAN and WAN. Break the application into small achievable tasks that can be done one at a time.

Perhaps we should quickly cover the definition of a WAN (or the Internet which is basically a BIG WAN). In this case it's strictly when the machines are on different sub-nets. The speed of the connection, and the bandwidth of the connection, are not important (from a NetAuto point of view...)

So assuming this is a WAN, then the machines that are connecting have a different IP subnet to the Servers.

In a WAN situation NetAuto cannot broadcast packets which announce the arrival, and departure, of servers and clients. (That's just the way Networks work).

To overcome this problem we use the NetAutoRemote function so that a client, or server, can manually announce it's presence to the others. Note that NetAutoRemote is asynchronous, so you need to check the docs for the correct way of using it.

If your server program is "transient" (by that I mean if you cannot rely on the server program being available, or if the server program often gets stopped), then from time to time you would need to use NetAutoRemote to "reconnect" to it.

Of course all this use of NetAutoRemote implies that the IP numbers for the Server's machines are fixed. If they are not then you can use a DIP server (on a machine with a permanent IP address) to allow the two sides to "NetAutoRemote" to each other.

Please note: The NetAuto protocol (this is different from the NetSimple protocol) does not yet work through a proxy server. If you need access via a Proxy Server you'll need to use the NetSimple objects. Read more about this in the Configuring Firewalls and Proxy Servers for NetAuto Ports section.



A8) : Question: Why does the DOS driver keep getting added to my application when I use NetTalk?

Answer: NetTalk uses the DOS driver, and the template automatically adds this driver to your application.



A9) : Question: What does VIRTUAL mean, and why do I have to set the Prototype of some methods to "(), VIRTUAL"?

Answer: See the glossary.



A10) : Question: How do I connect my NetAuto application to another machine over the Internet?

Answer: Use NetDIP object or the the UseRemoteMachine Control Template or the NetAutoRemote DLL function.

Please note: The NetAuto protocol (this is different from the NetSimple protocol) does not yet work through a proxy server. If you need access via a Proxy Server you'll need to use the NetSimple objects. Read more about this in the Configuring Firewalls and Proxy Servers for NetAuto Ports section.



A11) : Question: How do I get NetAuto to work through a firewall or Proxy Server?

Answer: The trick is to unblock the port numbers that NetAuto is using. See the section called Configuring Firewalls and Proxy Servers for NetAuto Ports.



A12) : Question: If I have 5 users using the Internet (Let's assume I know Their IPs) Where Should I insert The NetAutoRemote command so they can all see each other?

Answer: See the NetAutoRemote section.



A13) : Question: How does NetAuto really work?
A14) : Question: How does NetAuto know about the machines on my LAN?
A15) : Question: How does NetAuto communicate over the Internet or my WAN?
A16) : Question: If I set self.broadcast=1 does it send data to every PC on my LAN?
A17) : Question: What Ports does NetAuto use?

Answer: See the Inside NetAuto section.



A19) : Question: I would like to try out NetTalk in my program before I purchase it. Do you have a demo for me to try out?

Answer: Unfortunately we don't have a demo that you can program with. We do however have a 30-days money back guarantee. NetTalk provides you with some excellent tools for building Network applications, but if you aren't satisfied with NetTalk we will refund your money within 30-days of purchase.



A20) : Question: We are mass producing pre-configured hard-drives (ghosting hard-drives). Is there anything I need to bear in mind?

Answer: There are two things you need to bear in mind: 
1) The Global Unique Identifier (GUID) is stored in the registry. NetAuto requires that each machine has a unique GUID. When no GUID is present NetTalk creates a new one and stores it in the registry. 
You'll find this registry keys in HKEY_CURRENT_USER\Software\CapeSoft\NetTalk\GUID\GUID
We recommend that when you copy (ghost) the hard-drives you do not copy the GUID or that at least you delete the GUID from the registry after copying it. 
2) The second item to bear in mind is the NetName that is generated from the hostname. While the NetName does not need to be unique, but it is highly recommended as from a user point of view it becomes difficult to distinguish between machines that all have the same name. It would also be a good idea to give each machine a different NetName. This can be done by changing it in the Network Properties or it can be done programmatically using the NetOptions function.


A21) : Question: How can I tell if a user is connected to the Internet?

Answer: This is a very common question, and one that is extremely natural (I've asked it myself), but which in itself is flawed.
Remember the "internet" is simply a large network. If your machine is connected to a network, then it's connected to a network. There's no way of telling if that network is the "Internet". 
The real question is, of course, "How can I tell if the machine I want to talk to is connected?" And the answer to that is straight-forward - simply try and connect to it. Unfortunately this technique has a downside. If the machine is not on the network then the OPEN command can take a long time to come back and report a failure. The exact length of this timeout seems to vary greatly from machine to machine - times from 30 seconds up to a couple of minutes have been reported.  Under Winsock 2 you are able to set this timeout period, but unfortunately under Winsock 1 you can't. We are investigating the possibility of having NetTalk automatically detect the WinSock version, and allow you to set this parameter if it's available.

 

A22) : Question: It's just not working what should I do?

Answer: Read the section about Getting Support. This section lists lots of ways to find the solutions yourself, which is always quicker than emailing for support. It also lists tips for being on the lookout for Firewalls (now turned on as part of XP SP2) etc. 


A23) : Question: What's the difference between the NetAuto objects and the NetSimple objects?

Answer: You can find answers to this question in the following parts of the NetTalk docs:

In summary: The NetAuto objects are the best choice for a LAN only application. They don't work through firewalls or behind proxy servers, so for all other types of network communication (e.g. LAN, WAN or Internet) then the NetSimple objects are the best choice.


bullet Windows 2000 / XP


B1) : Question: I am running Windows 2000/XP, and if I can not connected to a LAN, my NetTalk only works when I connect to the Internet.

B2) : Question: I am getting error 10065, "No route to host" Errors on Windows 2000 / XP

Answer: This may be due to the Windows 2000 / XP feature called media sense.

Quick solution: If this is the first time you've used NetTalk, reboot your computer. NetTalk by default disables Media Sense, but you need to reboot in order for this to take effect.

Here's some more information:


DISCONNECTED NETWORKING  (From SysInternals Newsletter.)
Much of my development centers on network-enabled applications, but on Windows 2000 you can't test such applications when you boot up a disconnected computer (like a laptop) in the default configuration. That's because the TCP/IP stack is not activated unless the system detects a network connection. This means for instance, that "dir \\laptop\c$" (where "laptop" is the name of your computer) and "ping 127.0.0.1" both fail on disconnected systems. If you have a domain-based computer this can also lead to painful delays during boot up.

There are two workarounds to this:
One is to install the Microsoft loopback adapter, which is a virtual network adapter installable using the Hardware Wizard. 
The second is to disable media sense, which prevents the system from detecting that its disconnected, by setting a Registry value as described in Microsoft KB article Q239924: https://www.capesoft.com/Cached/Q239924 How to Disable Media Sense.htm. (Jono's comments - We even built this into NetTalk for you, see the next topic).

With either of these approaches the TCP/IP stack is active even on disconnected systems, letting you access the local system via networking APIs and UNC paths (like \\laptop\c$).



B3) : Question: NetTalk keeps disabling my Windows 2000 / XP Media Sense option. How do I stop it doing this.

Answer: For more info on what Media Sense is see https://www.capesoft.com/Cached/Q239924 How to Disable Media Sense.htm. To prevent NetTalk disabling it put a registry DWORD called NetTalkDontChangeMediaSense with a value of 1 in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
This stops NetTalk disabling the Media Sense. This is not recommended as running a machine with Media Sense can result in your NetTalk applications being unable to talk to themselves even on the same machine if the network cable is unplugged or the Network dies. This is not recommended. 



B4) : Question: I have built an Win NT/2K service using NetTalk, but NetTalk does not seem to be working. What's wrong?

Answer: Clarion 5 and Clarion 5.5 threading model won't allow you to create multi-threaded NT Services. However this has been fixed in Clarion 6, and NetTalk communications are achievable using the CapeSoft SelfService 3rdParty Accessory to create your Service.
 


bullet small Dial-Up Networking



C1) : Question: I am running Win95 and get "No Domain Server Was Available to Validate" errors. How do I fix this?

Answer: See Microsoft's knowledge base article https://www.capesoft.com/Cached/Q154434 No Domain Server Was Available to Validate.htm. You can download the patches that apply to your Windows 95 version (OSR1 or OSR2)



C2) : Question: I am running Win95 and want to upgrade by Dial-Up Networking? Is there a Microsoft patch?

Answer: Yes there is a Dial-Up Networking 1.3 patch available here https://www.capesoft.com/Cached/Q191494 Dial-Up Networking 1.3 Upgrade Available.htm

 


C3): Question: How do I detect if I am on the Internet?

Answer: The best way to do this is to try and connect to the server you want to access. For example if you want to send email, then use a NetSimple object (set to client mode - with errors suppressed) to try and connect to the email server (port 25 (SMTP) or 110 (POP3)) you want to access.  If it connects, then you are connected. If the connection times out during the open phase then you'll need to dial-up to get connected. The same applies to web sites. You could for example try to connect to www.google.com (port 80) to see if you are online.


bullet small Errors, Logging & Debugging



D1) : Question: How do I suppress NetTalk error messages?

Answer: There's a section that describes Error message suppression.



D2) : Question: How do I change the NetTalk error messages?

Answer: There's a section that describes Changing error messages.



D3) : Question: How do I turn on the NetTalk log file option?

Answer: There's a section that describes the NetTalk log files.


 

D4) : Question: I'm getting and Error -73 when trying to open an SSL connection.

Answer: Please take note of the files you need to distribute in your application folder (in the Distribution section of the main NetTalk document) if you are using SSL.


bullet small Legacy



E1) : Question: I am building a Legacy application in Clarion 5 and when I run my app it GPF's immediately. (Can be that it GPFs before the frame window appears). What am I doing wrong?

Answer: See the Legacy application section. There is a define you must add.
 


bullet small NetRefresh


F1) : Question: I am trying to use NetRefresh, but it doesn't refresh

Answer: Make sure you are using a Frame in the application and that there are no windows loaded on the same thread as the Frame. Use the start function to load windows on their own threads. Also make sure you haven't put code in the Event:OpenWindow accept event embed point. Rather put code in the Window.init method.
 


bullet small NetSimple


G1) : Question: What are good TCP ports to use for my server application?

Answer: It's best to use ports 5000 to 49151

See: http://tangentsoft.net/wskfaq/intermediate.html#svrport


G2) : Question: When I use NetSimple I send 9 packets from my NetSimple client to my NetSimple Server, but they get joined together and arrive as 2 packets. Is this normal?

Answer: That's actually the way that TCP/IP works. TCP/IP is a streamed connection orientated network protocol. Data is just streamed down the connection. So even though you are doing 9 sends, they can end up connecting to each other down the pipe..

Another way of thinking of this is to imagine a NetSimple connection as a drain pipe that is connected to the roof of your house. If you pour a bucket of water onto your roof, it will make it's way down to the gutters and down the drain pipe, and you'll get one "packet" out the bottom. But if you pour two buckets of water on the roof one immediately after the other, you'll still get two buckets worth of water out the drain pipe, but they will come out as one long stream. (i.e. One "packet", just double the size). This is the same with NetSimple. You could send two 4K packets and end up with one 8K packet. Likewise the network can also break up the packets during transit and you could send two 4K packets and end up with three packets (the first say 5K, the second 1K and the third 2K). To keep things clean and tidy the maximum packet size in NetSimple is 16K. But you can still stream 2MB by sending one hundred and twenty-eight 16K packets in a row.

It is because of these packet complexities that we wrote the NetAuto protocol and the NetAuto objects (these are different from NetSimple). They handle all the packet boundaries for you. So when you send a NetAuto 2K packet, it will arrive guaranteed as a 2K packet the other side. The NetAuto protocol automatically can encrypt data (you just turn on a property and all the data is encrypted). The only down side with the NetAuto objects is that they don't go through proxy servers at the moment. We hope to change this, but it may take a while still to implement.

So in conclusion if you use the NetAuto objects, NetAuto keeps your packets separate and complete, but the NetSimple objects are unable to know when you want a packet to start or finish. Your data will still all arrive, and it will arrive in the same order that your sent it, but you will have to manage your own packet boundaries. There are two ways to do this:

1) Send the length of your data and then your data, then the length, then the data etc. There's a fully working example of this in the NetSimple Packet Boundary example.

2) The other way to do this is to wait till the server responds with an OK packet after each packet you send, but this will slow you down. (This is how Email servers work).   
     More info: http://tangentsoft.net/wskfaq/articles/effective-tcp.html
     or http://tangentsoft.net/wskfaq/intermediate.html#packetscheme
 



G3) : Question: Sometimes my messages arrive mangled. If I send a lot of messages, a number of them arrive as one message. Is there any way to force NetSimple to send different messages as separate IP packets?
 
Answer:  The effect you're experiencing has nothing to do with NetTalk, but everything to do with the way TCP/IP works.
 
If you use the NetSimple  objects then you are using TCP/IP at it's most basic level. This is good because it allows other programs to communicate with your program, and is the right way to go if you are making an open interface to your program.
 
However, for efficiency reasons, TCP/IP is allowed to do 2 things;
   a) packets can be broken into multiple pieces and
   b) packets destined for the same destination can be put together into 1 packet.
 
Thus on the receiving end you need to allow for the possibility of both these things happening. The key is in knowing the length of the packets that are being sent, or by having some sort of 'end of packet' marker.
 
If you know the length, then you can work with the incoming packet. (The length of the incoming packet is in self.Packet.BinDataLen )
Let's say BinDataLen is 100, and you're expecting packets 5 bytes long, then what you probably have is 20 packets all joined together.
 
Another approach is to simply have an end of packet marker. For example:
Email uses <13,10> to identify the end of a line, and <13,10>.<13,10> to identify the end of the email.  It will receive multiple packets, and put them together until this sequence is received...
 
Of course, for those who haven't experienced this yet, there's no requirement that splitting, or joining HAS to happen. But if you are coding using NetSimple then you should allow for it...
 
 

 G4) : Question: I am getting -34 (ERROR:ClientNotConnected) errors - what do I do?
 
Answer: See also, the section on the DontErrorTrapInSendIfConnectionClosed in the NetSimple properties section.

Error -34 can occur when the object tells the NetTalk DLL to either close a connection or to send data down a connection, but the DLL already knows the connection has closed. This can happen quite often with the following sort of scenario:

1) New incoming packet arrives - DLL posts object a message (A)
2) Connection is closed by remote side - DLL posts object a message (B)
3) Object - gets message (A) and asks DLL for the packet contents
    - This calls self.Process - which may in turn request a CloseConnection - which tells the DLL to close the
       connection, which produces a -34 error as the connection is already closed
4) Object - gets message (B) - and only now does the object know the connection was closed by the remote side.

Sometimes this error just happens naturally during the course of normal execution. In this case there's nothing to worry about.

Other times this error can be caused by displaying a message for too long, and in the meantime the connection times out, and then a Send() is called after the message closes (and the connection is closed).

Four solutions spring to mind if you are displaying a Message:

a) You can either get rid of the Message,

b) After the Message, post say a (event:user+1) and in the .TakeEvent trap for event:user+1 and then call your send. This will give the object the time (in the TakeEvent()) to realise that the connection has in fact closed. You can test if the connection is open by looking if self.OpenFlag = 1 and self.AsycnOpenBusy = 0

c) Ignore the error (by overriding the .ErrorTrap method),

d) or by checking the status of the connection before sending data (see DontErrorTrapInSendIfConnectionClosed). 


G5) : Question: I am using a NetSimple Server. How should I best manage the multiple incoming connections?
 
Answer:   There are a number of solutions that will work. There seem to be two parts to this one:

A) Managing multiple connections
B) Possibly distributing any data processing different threads

A) Managing multiple connections
The CapeSoft Email Server application also has to handle multiple connections to the Server. This is how this has been implemented:
I have a queue with a SockID (long) in it, and I also have a bunch of status variables and data in this queue.
So in the .Process()
I do something like this:

case self.packet.packetType
! --------------------------
of NET:SimpleNewConnection
 
!create a new entry in the queue
of NET:SimplePartialDataPacket
  !lookup the correct item in the queue,
  !process request and respond (or you may want to start your thread
  !processing here and respond later)
of NET:SimpleIdleConnection
  !lookup the correct item in the queue,
  !handle idleness
end
You'll need code in the .ConnectionClosed() to delete items out your queue and wherever you call close() or abort()

B) Possibly distributing any data processing different threads
If you can immediately reply with an answer then responding in the .Process() method is probably the best and simplest solution.
However if you need to process data, then starting a thread can give you a performance increase, because other connections won't have to wait while you process through your database.
You can implement this by starting a new thread and giving the thread some work to do.
Once the work is done the new thread should post back an event to tell the original thread to return the data.
Note 1: You can add the Event number to the queue discussed in part (A), just make sure it is unique. This would be the Event number the new thread would need to post and the event that the original thread would need to look out for in the .TakeEvent() method.
Note 2: You could make your new thread put data back into a queue for returning back on the connection, but bear in mind in C6 global queues are not thread safe, and so you'd need to implement critical sections.


G6) : Question: It's just not working. what should I do?
 
Answer: See FAQ A22


G7) Question: What changes in NetTalk from NetTalk version 3 to version 4 will affect my NetTalk 3 applications?
G7) Question: What changes in NetTalk from NetTalk version 2 to version 3 will affect my NetTalk 2 applications?

Answer: NetTalk v3 to NetTalk v4

1) The NetTalk 3 DLL won't work with NetTalk 4 applications.
As always please make sure you ship the correct version of the NetTalk DLL that your application was compiled in, if you are building Stand-Alone applications.

2) The default SSL options now include:
     • Remote Certificate Common Name must match Server name
     • Remote Certificate must be issued by an Issuer found in CARoot file (which defaults to '.\CARoot.pem'
     These options are configurable.
     This implies you must ship a CARoot file or change this option.

3) Most of the NetTalk NetAuto DLL calls or Groups and Queue Type now have the word Auto in them. For example.:
     ??????? Net:PacketType => Net:AutoPacketType
     • Net:IDType=> Net:AutoIDType
     • Net:DirectResponse=> Net:AutoDirectResponse
     • Net:ServiceType=> Net:AutoServiceType
     • Net:RemoteType=> Net:AutoRemoteType
     • Net:RecoveryOptionsType=> Net:AutoRecoveryOptionsType
     • Net:PublicServicesQType => Net:AutoPublicServicesQType
     • NetRemote => NetAutoRemote
     • NetGetNetName=> NetAutoGetNetName
     • NetNotify=> NetAutoNotify
     • NetReceive=> NetAutoReceive
     • NetSendAsync=> NetAutoSendAsync
     • NetSetService=> NetAutoSetService

4) Some other minor improvements for example:
     • self.packet.Error has been split into self.packet.NetError, self.packet.WinSockError and self.packet.SSLError

5) New in 4.09.
 

"The NetTalk - FTP one file" uses this parameter to set the Active property of the Net:FTPGroupType. By default this is set to 1 which is Active mode, setting this to zero will result in Passive mode being used.

Answer: NetTalk v2 to NetTalk v3

There are 3 weighty changes to NetSimple in version 3 that are improvements over version 2, but they do require some changes:
 
1) NetSimple now uses Asynchronous Open by default (instead of the old Synchronous Open).
So there are two options:
a) The first is simply to make NetSimple behave like it used to (ie Synchronous Open)
To do this make sure you set the following before any calls to .Open
MyC.AsyncOpenUse = 0
MyC.AsyncOpenTimeout = 0
 
b) The second approach is to take the bull by the horns, and change your app over to using Asynchronous Open. Asynchronous Opens are better, but you'll need to block off some time to change your app.
 
(See the NetSimple.Open method (in the NetTalk docs - under NetSimple Methods.)
2) The second change is that in your Process method there are different types of packets that arrive (ie Not just Data packets)
a) Again you can either get it to behave like it used to by setting the following before any .Open calls:
MyC.InActiveTimeout = 0
 
b) Or change your .Process to handle Net:SimplePartialDataPacket, Net:SimpleWholeDataPacket Net:SimpleAsyncOpenSuccessful and NET:SimpleIdleConnection
 
(See the NetSimple.Open method (in the NetTalk docs - under NetSimple Methods.)
3) The third change will only really affect you if you adopt the Asnchronous Open, and that is when you use self.OpenFlag to test if the connection is open. During an async open the self.OpenFlag is 0, but self.AsynOpenBusy = 1
(See the NetSimple.Open method (in the NetTalk docs - under NetSimple Methods.)
 



bullet small Email



H1) : Question: I am getting 550 Relaying Prohibited Errors when trying to send email. What's going on?

Answer: Relaying problems are all to do with your Email Server. Basically it doesn't like who you are sending emails from. There are a couple of things you can do to try and resolve this:

1) Check you are using the latest NetTalk version.
2) Try sending the email from the NetTalk NetDemo.app - do you get the same result?
3) Try using a different (or a more valid) .HELO property or leave it blank and it will be set from the .From property.
4) Try sending the email from a email address with a domain that matches your ISP (For example, your ISP may be mweb.co.za but you are sending out emails as joe@yourcompany.com - try using your joe@mweb.co.za account. I know this doesn't fix the problem, but it does show you what that mweb.co.za don't want to relay your emails from joe@yourcomany.co.za)
5) Speak to your ISP and ask them why your emails can't be sent. (You may also get relaying errors if the email server wants a secure email login. NetTalk now supports secure logins. See the NetSendEmail's AuthUser and AuthPassword properties for more details.)
6) Failing all the above please create a LOG file and contact support.
 



H2) : Question: I am using Exchange Server. Internal email sent from NetTalk works fine, but my external emails are never delivered. What's going wrong?

Answer: Go to Internet mail service properties - routing tab - switch "reroute incoming smtp mail" to on


H3) : Question: I want to extend the self.DataQueue queue to hold more information, so that I can work out which of my emails were sent successfully or not.

Answer: You can extend the self.DataQueue queue that NetTalk uses to included your own ID field (of course you can add all sorts of other information if you like).


Define your own queue (note this is an extension of the Net:EmailDataQType type)
  myDataQueue       Queue (Net:EmailDataQType)
  Extra_EmailID       long
! this is your ID
                    end


In .Init()
  ! Use our own queue structure
  self.DataQueue &= myDataQueue


Then in .AfterBuildFromWhole()
  myDataQueue.Extra_EmailID = some ID number that you specify.


Then in .MessageSent() or ErrorTrap()
You can see which Email was just sent by using the
  myDataQueue.Extra_EmailID


H4) : Question: What's the difference between SMTP and MAPI Email Sending? Which one is better?

Answer: The answer to this question really lies in what you are trying to do. Below is a list of Pros and Cons for each, which should help you make a good decision.

MAPI Pros:

MAPI Cons:

SMTP Pros:

SMTP Cons:

SMTP Solutions:

SMTP Tips:

At the end of the day, you'll need to decide which route is best for you and your application. Incidentally CapeSoft uses SMTP for email. Our TNA application which is in use at over 1000 sites uses SMTP.

Follow ups on this article:
Read peoples comments to this article at: www.capesoft.com/opinion/SMTP.htm


H5 Question: I want to be able to read in the contents of a MHT file and extract the text or HTML or attachments from this file. Where do I start?

Answer: Well to start with it's worth knowing that a .mht and a .eml file are almost identical in format. The .mht file is a complete HTML file (including images etc) that Internet Explorer can create when saving a web page. The only differences are in the headers (e.g. .mht files don't have a To recipient, and they have a blank Subject), and the .mht files typically don't have a text only portion (but they do have an HTML portion). You can use the NetEmailReceive._ProcessSplitWholeMessage() method (see the code in the NetDemo.app - Get Email - Load From File) to process a .mht file. This can give you the html portion of the HTML file. (You can turn the HTML portion into text using the NetWebClient.TextOnly() methods (or the methods that .TextOnly calls) but it may look a little rough and unformatted.).


H6 Question: How do I save the returned email as an EML file?

Answer: You need to dump the returned WholeMessage (a field in the mail queue) string to disk. You can either do this using WinEvent's ds_String2File function, or using a loop and add to dos file.



bullet smallWeb


J1) : Question: How can I get HTTPS (Secure) pages?

Answer: The NetWebClient object can talk to any HTTP or HTTPS server. For normal websites use either "www.example.com" or "http://www.example.com" . For HTTPS sites use the "https://www.example.com" format.
 


J2) : Question: I'm doing a post to a webpage, but not all the data is getting there.

Answer: 

1) Download and run ethereal (www.ethereal.com) and get it listening on port 80

2) Open Internet Explorer and reproduce the behaviour you want using Internet Explorer to the website you are wanting to post to.

You can use the ethereal right-click Follow TCP Stream option to view the conversation. 

3) Open the NetDemo.exe (in your 3rdParty\Examples\NetTalk\Demo folder), and using the web client example - on the post tab, enter in values that will simulate the same post data. (Using ethereal to check it all).

4) Once you've got the above working you can then code this into your application.


J4) : Question: How do I Post data to an HTTPs web server, and how do I determine the Post string that is required?.

Answer: See NetTalk Tips: for extracting Post strings from HTTPS web sites for information on posting data to a website and how to extract the post strings for HTTPs sites.

 



Multi-DLL Applications and NetTalk (recommended reading)


If you are building a Multi-DLL application, then you need to include the Suppress_NetTalk global extension to all your apps (in your DLL project set) that don't have the Activate_NetTalk global extension. More details available in the Global Extension section of the docs.

Tip: If you application doesn't appear to be closing down correctly (e.g. The Windows close, but the process continues running in Task Manager), then try adding a call to:
NetCloseCallBackWindow()
as your application closes.
 


 
Legacy Applications and NetTalk (recommended reading)


If you are building a Legacy application in Clarion you need to add the following define (Project Menu - Properties - Properties button - Defines) to every application that uses NetTalk.:
_ABCDllMode_=>0
_ABCLinkMode_=>1

If you don't do this your application will probably GPF immediately when loaded.



Web Builder Applications and NetTalk  (recommended reading)


NetTalk is now working with Web Builder (Clarion 5.5 and higher). You can add NetTalk objects to these applications. We've included an example application, for you to try.

Important TIPS:

1. To prevent your Web Builder application from either not shutting down, or GPF'ing when it shuts down don't display messages from any of the NetTalk notification methods (these methods are the asynchronous methods that are called by NetTalk to notify you when a packet arrives (Process), some task has finished (e.g. Done() or MessageSend()) or an error occurred (ErrorTrap()).

2. To get your screen refreshed with updated data you can tell Web Builder to automatically refresh the page, alternatively you can provide the user with a button to refresh the screen, include the following code in the button embed:

3. If you are finding that data on a page is not being updated make sure you are using the display() command. Even if a form is auto-displaying you may need to use the display() command.

horizontal rule

bullet Error Messages (recommended reading)

Runtime Errors

Note: You can also turn on the NetTalk log file option see the Logging section.
For a list of the WinSock Errors please consult https://www.capesoft.com/Cached/Q199485 Winsock Error Codes.htm

For a list of the NetTalk runtime errors you can look in your Clarion/LibSrc/netall.clw in the _NetAll.InterpretError method.

X1)
Application GPFs after adding the FTP objects

You've probably typed in the wrong object name in the More Settings extension tab of either the NetFTPClientControl and NetFTPClientData NetTalk object extension.

X2)
Error 10065 - No route to host

See the Media Sense FAQ answer.

X3)
Error number -3 which means too many instances.

NetAuto by default allows you to load 5 instances (running copies) of NetAuto enabled applications on the same machine. You can change this using the NetOptions DLL function to allow more (or less) instances. 

ourString    String (80)

Code

  ourString = 10                  
! Note this must be a string variable
  NetOptions (NET:SETMAXINSTANCES, ourString)
! Set Max NetAuto instances to 10

X4)
Multiple-Packet Set communication does nothing

You need to change the name of your NextPacket() method to MultPacketReply(). New features in Version 1 beta 4.

X5)
A required .DLL file, C5DOSX.DLL, was not found.

The application could not find the Clarion DOS DLL. See the Distribution section.

X6)
A required .DLL file, C5NETX.DLL, was not found.

The application could not find the NetTalk DLL. See the Distribution section.

X7)
No matching prototype: parent.ErrorTrap (...) or self.ErrorTrap (...)

The prototype for the ErrorTrap method has changed to (string errorStr, string functionName). You will need to change your derived ErrorTrap methods as well as places where you call parent.ErrorTrap. An example of how to call the new ErrorTrap function is:

self.ErrorTrap ('An error occurred while attempting to get the time', 'OurTimeObject.Ask')

Changed in version 1.0 beta 4.

X8)
Receiver not found or Receiver not found in qNetServices

This means that you were trying to send a packet to a service that is not found in the qNetServices list. You can look in the log file to see what services are in the qNetServices queue. This queue stores a list of public (non-private services) that are available for talking to on other NetAuto processes. 

This error may occur when you are trying to reply to a private service yourself. In other words you tried swapping the ToNetName and the FromNetName around. Rather set self.sendreply=1 in the Process() method and let NetAuto send back a reply for you. See Scenario One for more details.

X9)
Internal error 02 WSLINT

Some of the old (pre v1 beta 9) logging options can produce the 'Internal error 02 WSLINT' run-time error. Upgrade to the latest NetTalk.
 

ERROR:DllActive                 equate(-2)
ERROR:TooManyInstances          equate(-3)
ERROR:InvalidStructureSize      equate(-4)
ERROR:MainStartFailed           equate(-5)
ERROR:CallBackWindowTimeOut     equate(-6)
ERROR:AcceptedDataTooShort      equate(-7)
ERROR:DataIsOutOfTopic          equate(-8)
ERROR:UnknownPacketType         equate(-9)
ERROR:NotAllDataSent            equate(-10)
ERROR:NotAllDataReceived        equate(-11)
ERROR:ReceiverNotFound          equate(-12)
ERROR:NoRequest                 equate(-13)
ERROR:RequestNotFound           equate(-14)
ERROR:NoServers                 equate(-15)
ERROR:ServerNotFound            equate(-16)
ERROR:ServiceNotSupport         equate(-17)
ERROR:BadResponseAddress        equate(-18)
ERROR:NewThreadFail             equate(-19)
ERROR:AddressNotFound           equate(-20)
ERROR:IncorrectDLLVersion       equate(-21)
ERROR:BadOptions                equate(-22)
ERROR:TooManyListeningSockets   equate(-23)
ERROR:SocketDead                equate(-24)
ERROR:IncompatiblePacketVersion equate(-25)
ERROR:MachineHasNoIP            equate(-26)
ERROR:ServiceNowInactive        equate(-27)
ERROR:SimpleConnectNotClosed    equate(-28)
ERROR:TooManySendingSockets     equate(-29)
ERROR:QueueAccessError          equate(-30)
ERROR:CouldNotLoad              equate(-31)
ERROR:CouldNotAllocMemory       equate(-32)
ERROR:NoIPorSocketSpecified     equate(-33)
ERROR:ClientNotConnected        equate(-34)
ERROR:FileAccessError           equate(-35)
ERROR:ConnectionNotOpen         equate(-36)
ERROR:ObjectRequiresMoreProperties equate(-37)
ERROR:NoLongerSupported         equate(-38)
ERROR:CouldNotConnectToHost     equate(-39)
ERROR:SimpleDataNotSent         equate(-40)
ERROR:GeneralFTPError           equate(-41)
ERROR:InvalidStringSize         equate(-42)
ERROR:DUNNoPhoneBookEntryCantDial equate(-43)
ERROR:DUNObjectNotInDLLQueue    equate(-44)
ERROR:DUNObjectBusy             equate(-45)
ERROR:CouldNotLoadDUNProcedures equate(-46)
ERROR:WinSockNotActive          equate(-47)
ERROR:CallBackWindowAlreadyClosed equate(-48)
ERROR:NoNewThread               equate(-49)
ERROR:CouldNotLoadProcedures    equate(-50)
ERROR:CorruptPacket             equate(-51)
ERROR:NoPostingAllowed          equate(-52)
ERROR:OpenTimeOut               equate(-53)
ERROR:PingUnSuccessful          equate(-54)
ERROR:AlreadyOpen               equate(-55)
ERROR:DllNotActive              equate(-56)
ERROR:IdleTimeOut               equate(-57)
ERROR:AlreadyBusy               equate(-58)
ERROR:NoDataReceived            equate(-59)
ERROR:ObjectInitNotCalled       equate(-60)


FTP Error Messages
ERROR:FTP:ServiceNotReady       equate(120)
ERROR:FTP:ServerClosingDown     equate(421)
ERROR:FTP:TransferAborted       equate(426)
ERROR:FTP:FileUnavailable       equate(450)
ERROR:FTP:LocalProcessingError  equate(451)
ERROR:FTP:InsufficientStorageSpace equate(452)
ERROR:FTP:CommandUnrecognized   equate(500)
ERROR:FTP:SyntaxError           equate(501)
ERROR:FTP:CommandNotImplemented equate(502)
ERROR:FTP:BadSequenceOfCommands equate(503)
ERROR:FTP:InvalidParameter      equate(504)
ERROR:FTP:NotLoggedIn           equate(530)
ERROR:FTP:NeedAccountToStoreFiles equate(532)
ERROR:FTP:FileAccessError       equate(550)
ERROR:FTP:ExceededStorageAllocation equate(552)
ERROR:FTP:FileNameNotAllowed    equate(553)
ERROR:FTP:InvalidNumberOfParameters equate(-651)
ERROR:FTP:CannotOpenFile        equate(-652)
ERROR:FTP:CannotWriteToFile     equate(-653)
ERROR:FTP:UnknownFormatOfDirListing equate(-654)
ERROR:FTP:UnknownReplyFormat    equate(-655)
ERROR:FTP:ControlConnectionClosed equate(-656)
ERROR:FTP:ControlConnectionClosedInPassive equate(-657)
 


X10) Email: Command unrecognized: "STARTTLS"

This error is probably being created because your Email Server does not support Secure Email.
You can turn off this option in the NetTalk Demo or make sure  self..SecureEmail = 0
 

X11) FTP
Unknown format of directory listing

This occurs when the directory listing returned by the server is in an unknown format. It is quite unusual to find a server that uses a format that NetTalk can't figure it out.
 
If you don't want this error to be called then put the following code in the virtual method _FigureOutDirFormat() after the parent call:
      if self._DirListingFormat = 0
          self._DirListingFormat = 255
      end
 
You will need to figure out the directory listing yourself in this case. The way that it works is that the ._ProcessGetDirListing() method is called when data is received. If there is not enough information to figure out the format then the _DirFormatSet property is set to zero and the data is stored.

When there is sufficient information from the server the _DirFormatSet property is set to 1 and _FigureOutDirFormat() is called. If this method manages to figure out the directory format then it sets the _DirListingFormat property, otherwise it sets it to zero.

This is what is happening in this case - enough data has been received to figure out the format, but the format itself is unknown. In order to add support for the custom format add code to the _FigureOutDirFormat() embed to process the directory listing after the parent call (the parent method could not figure it out, which is what caused the error).
 
The _FigureOutDirFormat() method is passed a string which contains the directory list (what you would see printed out in a terminal if you were connecting to the FTP server on the command line and the LIST command was issued to the server).
 
NetTalk allows you to process the listing and set the _DirListingFormat to a number between 200 and 255, which means that it is in a custom format. You then need to process this string in the _FillDirListingQ_FormatCustom() virtual method that NetTalk provides for you.
 
It might be helpful to have a look at the source code for the methods such as _FillDirListingQ_Format01() to see how they process the string into the queue and then write your own FillDirListingQ_FormatCustom() to process your specific server's response. You might find that it is quite close to one of the currently supported formats. The full source code for the FTP objects (and other NetSimple objects) is in the NetSimple.clw and NetSimple.inc files in your \Clarion\3rdparty\libsrc\ directory.

 

Compiler Errors/Warnings


Y1)
Unknown variable "%NoNetTalk"

You have not added the NetTalk Global Extension Template to your application. Go to the "Global" Button, press "Extension", then "Insert" and choose "Activate_NetTalk".

Y2)
File Not found - you_need_to_change_your_app_to_32-bit.lib

You are probably trying to compile your application as a 16-bit application. NetTalk only supports 32-bit applications and so you should change your application to be a 32-bit application. To do this go to the "Project" Menu, choose "Properties", choose the "Properties" button and change the "Target OS" to "Windows - 32-bit".

Y3)
Warning: Label duplicated, second used: _ABCDLLMODE_
Warning: Label duplicated, second used: _ABCLINKMODE_


Don't worry this is just a warning. This message appears in Clarion 5.5. Everything is fine

Y4)
Link Error: Unresolved External DOS in nettalk.obj

This happens when you do not add the DOS driver to your application. The NetTalk template now adds the DOS driver to your application for you, so this error should no longer appear.  

Y5)
Syntax Error: Unknown identifier: ?IPADDRESSES

This means you need to delete the UseRemoteMachineControls Control Template and add it again. You will notice the new features after adding it.
horizontal rule

bullet Debug Information - How to generate LOG files (recommended reading)

NetTalk can product extensive and valuable logging information. This will help you see what is going on in the background. All logging produced by NetTalk can be captured using the free SysInternals' DebugView application available from www.microsoft.com. You'll need to download this now, if you don't have a copy.
 

debug view screenshot
Example of using DebugView to monitor NetTalk applications


DebugView allows you to view and save the NetTalk log information.

(Fine Print: This is not a CapeSoft product and while we recommend it (and we use it ourselves), we can not take responsibility for what this application may or may not do to your computer system).

To turn on the logging using the template options you need to do the following:

1)
Important Step

In Clarion 5.5 and higher - use the Global NetTalk Template option and turn on the "Add NETTALKLOG=>1 define to application". (Without this project define Object level logging will not be compiled into your application).

template logging

In Clarion 5
Go to the "Project" Menu and click on "Properties", click on the "Properties" button, click on the "Defines" tab and enter the following):
NETTALKLOG=>1

Note: These changes won't take place until you re-compile your application
2) Select a level of logging that you would like to produce.
Object & DLL This logs everything. (Please use this one when sending CapeSoft log files, unless we ask you to use a different one)
Object If you are trying to debug Email, FTP, Web errors, this is a good place to start.
DLL This just logs the NetTalk DLL. (Not normally that useful in itself).

To turn on the logging using the command line switches you need to do the following:

  Run your application with one or more of the following arguments. (The easiest way to do this is to create a windows shortcut to the EXE and add these arguments to the "Target" field in the shortcut's properties box.)
Simple Parameters
/netall This logs everything. (Please use this one when sending CapeSoft log files, unless we ask you to use a different one)
/nettalklog This logs on a NetAuto and NetSimple object level. If you are debugging your application, try this one first. (If you are sending log files to CapeSoft - use /netall instead)
/netnolog Forces all logging off. This is useful if you've added logging options with the Global Template and want to quickly run your app with no logging without having to go to the effort of recompiling.
Advanced Parameters
/neterrors This only logs Errors (for both the object level and the DLL level)
/netdlllog This logs on a NetTalk DLL level. 
/netdlllogall This logs on a NetTalk DLL level, but with much more detail.
/netdlllogerrors This only logs errors on the NetTalk DLL level.


Important
If you send CapeSoft support a log file (you can get DebugView to produce a .log file), please make sure it is generated using the Force /netall (Object and DLL Logging) option.
or <YourApp> /netall If you want to run it off the command line

HOT Tip !!
There is a color filter option in DebugView that you can use to highlight various entries that you may be looking for. You can set these up using the Edit-Filter/Highlight Menu. It's worth setting the red filter to "error;warning". Like this:

debug view filter screenshot


horizontal rule

bullet Glossary

Client: A Client is the process that initiates the conversation. 

DIP: Dynamic IP. May be used in reference with the NetDIP object that manages Dynamic IP allocation and who is online.

Datagram Socket / Packet: Fast, but a non-guaranteed network communication method. Used to send NetAuto "I Can Do" packets, but you can also create/receive your own using NetSimple

Instance: the number of running copies of Applications that use one or more NetAuto object on the same machine. This has nothing to do with the number of copies of NetAuto enabled applications running on different machines over a LAN or WAN, which is unlimited (well almost).

Maximum NetAuto Instances: This is the maximum number of NetAuto instances you can have running on one machine. The default is 5, but you can change it using NetOptions().

Net:MaxBinData: The maximum amount of data you can place in the self.packet.BinData string. (currently 16K).

NetName: A name that NetAuto uses to differentiate machines and instances from one another. The first NetAuto instance uses the hostname as the NetName, the second will use the hostname plus '2' and so on for the third instance etc.

NetSimple Objects: These are the objects that provide you with the ability to communicate straight down a socket connection, they are not bound by the NetAuto protocol, but require you to do a more work.

NetAuto Data Packet: This is the data packet that a NetAuto object sends to another NetAuto object.

NetAuto Protocol: This is the protocol (or communication standard) used by the NetAuto objects. This protocol was designed by CapeSoft and presents you with a robust, guaranteed delivery of packets across a LAN or WAN (Internet). (The "guaranteed delivery" includes resending packets, packet sequencing, and IP reconfiguration if you redial an ISP connection and are allocated a new IP number. Obviously no communication can happen if the network is physically unplugged, but NetAuto will recover when the network is re-established.)

NetAuto "I Can Do Packet": This is a small packet that allows other NetAuto programs to know what public services are being offered by the current NetAuto program.

Server: It cannot initiate a conversation - it only responds to incoming requests.

Streamed Socket / Packet: Connection orientated network communication (TCP). Used to send NetAuto data packets and also used by NetSimple (unless you turn of UDP mode)

Virtual: Clarion's Help says that when you set a method to VIRTUAL, it "allows methods in a parent CLASS to access methods in a derived CLASS". What this means is that when your parent object calls a function like Init it will call your Init() method in your derived instance. This is really useful as it lets you override what the Init function should do. In general most methods are VIRTUAL except when the parent method that you are overriding is not VIRTUAL. As a rule of thumb you can set all your derived methods to VIRTUAL and any that should not be VIRTUAL the compiler will display an error.
horizontal rule

bullet Submit a Support Question to CapeSoft (recommended reading)

Important: Before sending us a Support Question please have a look at the How to Get Support section, this will step you through a quick check list, that may lead you to the answer.

We've included a form here. It will generate an email and send it to CapeSoft Support. When you press the "Send" button you should get a warning like this:
Send warning screenshot
Just press the OK button to send it to CapeSoft.

NetTalk Support Request
 
Name: 
Product:  
Product version:  
(Don't say the "latest" - we
 won't believe you <g>)
(See Global Extensions NetTalk)
Clarion version:
(e.g. Clarion6.1 9026)
 
(See Clarion Help About)
Operating system:  
(e.g. XP SP2)
Can you repeat the
error in netdemo app?  
Have you created a
LOG file using
/netall?  
(Please email it to support@capesoft.com)
Steps to repeat Error:
Other information
  
(You can press OK when Internet Explorer brings up a warning)

 
 
     

Or alternatively you can contact CapeSoft Support at:
CapeSoft Support
  Email  
Telephone
+27 87 828 0123
Fax
+27 21 715 2535
Post
PO Box 511, Plumstead, 7801, South Africa
     



[End of document]