Re: [twsocket] Throttling solution - Integrate Dan's throttler into ICS?
Hi Dan Did you update it for V6 ? Or currently it only work for V5 ? Thanks Marc At 17:22 2006-12-10, you wrote: >Hi Jack, > >You should be able to derive your own class from TWSocketServer which >instantiates throttled sockets instead of regular ones. Then you don't have >to modify ICS code. I did it for the FTP server component, I can upload it >somewhere if you want. Let me know if you do this and maybe you could make >the code available to others. > >Regards, >Dan -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Freeze when using smtp after recreating itsparentform
I have not paid very much attention to this duscussion, but I want to say something about using ICS on many diffent computers and different platforms. My company have made software based on ICS that run on W95, W98, NT, W2000, WXP and Vista. The components used is HttpCli, SMTPCli, HtmlSMTPCli, POP3Cli, HttpServer, SocketServer and WSocket (including the SSL-versions of the components). I have no problems on any platforms. The only time I have had problems, have been other components that needs for example Mime32.dll or other dll's that come from installing programs that is not standard in the platform. Or maybe to old winsock. Some times I have had trouble when freeing a component from inside an eventhandler for the component, or freeing a form that contains a component that is still working, but that is bad programming, even if it made problems only on some of the platforms. Regards Bjørnar > > am not willing to accept that it isn't possible to use ICS > components > > on "all" computers. > > I won't accept that too, but nobody from this list has > confirmed the problem and nobody seems to know how to solve > it. So it would help a lot if you could find the error condition. > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Freeze when using smtp after recreating itsparentform
Henrik, > am not willing to accept that it isn't possible to use ICS components > on > "all" computers. I won't accept that too, but nobody from this list has confirmed the problem and nobody seems to know how to solve it. So it would help a lot if you could find the error condition. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Freeze when using smtp after recreating itsparentform
Hi Arno and thanks for Your effort! I'm sorry to say that Your answer doesn't promote ICS at all. I don't possess enough knowledge about winsock and smtp to be absolutely sure but I am not willing to accept that it isn't possible to use ICS components on "all" computers. (You can see the answers on Your questions in Your message below.) If I can't be sure it's going to work on the majority of my customers computers I can not use ICS smtp components. So, since I really like ICS I go at it once more; These are the known facts: - Everything works on all tested computers if we let one smtp component exist at _all_ time when the application is running. (It doesn't have to be the one used to send the emails. See my work around code). As I said I have almost no knowledge about smpt communication (that's why I use ICS) but isn't this a tell tail about the error that obviously can appear in the component under certain circumstances...? - The recreate approach (create the component when needed and free when ready) works on all computers using other smtp components, for instance with Indy. (Indy has problems with Swedish characters in the subject so I must switch to use some other smtp component. I already use ICS in another application so I would very much like to use ICS in all of my application.) - Arno: Even if we don't understand _why_ it works: Is there any harm using the strange work around I attached earlier? (Just to bee on the safe side on computers where the component error may show...) Sorry to bother You all with these emails. I really appreciate all the help I get! Best Regards Henrik -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För Arno Garrels Skickat: den 12 december 2006 18:40 Till: ICS support mailing Ämne: Re: [twsocket] Freeze when using smtp after recreating itsparentform Henrik, I still guess that it's caused by any crap process running on this box. Why else does it not happen on other computers as well? [Henrik]: It does happen on other computers. I assure You that the one I use were I get the same freeze as my customer, has no real-time protection software, internet security suites or malicious software, anything like that. I don't know the Norman software, but have you tried to uninstall it? [Henrik]: This is not the problem as You can read in my earlier posts. (FYI: It's a widespread Antivirus software from Norway.) I would also check the auto-started processes as well and turn them off one after the other. Then I would search for strange processes in the process list that do not exist on the other, working boxes. That's at least worth a try. [Henrik]: Even though my opinion I wrote early in this mail, that I can't check this on all my customers computers, I've checked this on my test computer. Everything seems ok. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html Henrik wrote: > Hello Wilfred! > > Yes, I get the same behavior when running the application from within > the IDE. So I traced the code up until the application stops to > respond. > (And > yes, we mean the same thing: the application freezes or hangs so that > You can't quit and You can not move or close the window.) > > The trace disappears in the function > WSocket_Synchronized_WSAAsyncSelect in WSocket.pas. You can see the > actual line where something happens in the code snippet below: > > function WSocket_Synchronized_WSAAsyncSelect( >s: TSocket; HWindow: HWND; >wMsg: u_int; lEvent: Longint): Integer; begin > SaveTrace('Start WSocket.pas: function > WSocket_Synchronized_WSAAsyncSelect'); > > if @FWSAAsyncSelect = nil then > @FWSAAsyncSelect := WSocketGetProc('WSAAsyncSelect'); > > SaveTrace('Hang on the line below this row: Result := > FWSAAsyncSelect...'); > > Result := FWSAAsyncSelect(s, HWindow, wMsg, lEvent); // <-- > Something happens here > > SaveTrace('Hang on the line obove this row: Result := > FWSAAsyncSelect...'); > SaveTrace('End WSocket.pas: function > WSocket_Synchronized_WSAAsyncSelect'); > end; > > Does this make any sense? > Best Regards > Henrik > > > > Ps. If there by any chance is someone who want a bit more "in depth > facts", I also attached the following trace logs :-) > > I added the SaveTrace procedure seen in the snippet above at the first > line and the last line of the following functions and procedures: > WSocket.pas: function XSocketWindowProc > WSocket.pas: procedure TCustomWSocket.WndProc > WSocket.pas: procedure TCustomWSocket.WMAsyncGetHostByName > WSocket.pas: procedure TCustomWSocket.TriggerDNSLookupDone > SmtpProt.pas: procedure TCustomSmtpClient.WSocketDnsLookupDone > WSocket.pas: procedure TCustomSocksWSocket.Connect; > WSocket.pas: procedure TCustomWSocket.Connect > WSocket.pas: function WSocket_Synchronized_WSAAsyncSelect > > So after the ConnectButton in the example is pressed I get the > following res
Re: [twsocket] Service dependency problem re-occurred.
Thanks, I found the problem: I was calling the below function to edit service description (which TServiceApplication cannot do automatically) in OnStart of the service! BOOL ReconfigureService(BOOL fDisable, LPSTR lpDesc, const String &serviceName) // from // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/opening_an_scmanager_database.asp // and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/changing_a_service_configuration.asp { SC_LOCK sclLock; LPQUERY_SERVICE_LOCK_STATUS lpqslsBuf; SERVICE_DESCRIPTION sdBuf; DWORD dwBytesNeeded, dwStartType; BOOL bSuccess=TRUE; SC_HANDLE schSCManager; SC_HANDLE schService; // Open a handle to the SC Manager database. schSCManager = OpenSCManager( NULL,// local machine NULL,// ServicesActive database SC_MANAGER_ALL_ACCESS); // full access rights if(NULL == schSCManager) return false; // Need to acquire database lock before reconfiguring. sclLock = LockServiceDatabase(schSCManager); // If the database cannot be locked, report the details. if (sclLock == NULL) { // Exit if the database is not locked by another process. if (GetLastError() != ERROR_SERVICE_DATABASE_LOCKED) { // printf("LockServiceDatabase failed (%d)\n", GetLastError()); return FALSE; } // Allocate a buffer to get details about the lock. lpqslsBuf = (LPQUERY_SERVICE_LOCK_STATUS) LocalAlloc( LPTR, sizeof(QUERY_SERVICE_LOCK_STATUS)+256); if (lpqslsBuf == NULL) { // printf("LocalAlloc failed (%d)\n", GetLastError()); return FALSE; } // Get and print the lock status information. if (!QueryServiceLockStatus( schSCManager, lpqslsBuf, sizeof(QUERY_SERVICE_LOCK_STATUS)+256, &dwBytesNeeded) ) { // printf("QueryServiceLockStatus failed (%d)", GetLastError()); return FALSE; } //if (lpqslsBuf->fIsLocked) // printf("Locked by: %s, duration: %d seconds\n", //lpqslsBuf->lpLockOwner, //lpqslsBuf->dwLockDuration); //else // printf("No longer locked\n"); LocalFree(lpqslsBuf); } // The database is locked, so it is safe to make changes. // Open a handle to the service. schService = OpenService( schSCManager, // SCManager database serviceName.c_str(), // name of service SERVICE_CHANGE_CONFIG); // need CHANGE access if (schService == NULL) { // printf("OpenService failed (%d)\n", GetLastError()); return FALSE; } dwStartType = SERVICE_AUTO_START; //(fDisable) ? SERVICE_DISABLED : SERVICE_DEMAND_START; // Make the changes. if (! ChangeServiceConfig( schService,// handle of service SERVICE_NO_CHANGE, // service type: no change dwStartType, // change service start type SERVICE_NO_CHANGE, // error control: no change NULL, // binary path: no change NULL, // load order group: no change NULL, // tag ID: no change NULL, // dependencies: no change NULL, // account name: no change NULL, // password: no change NULL) )// display name: no change { // printf("ChangeServiceConfig failed (%d)\n", GetLastError()); bSuccess = FALSE; } else // printf("ChangeServiceConfig succeeded.\n"); sdBuf.lpDescription = lpDesc; if( !ChangeServiceConfig2( schService, // handle to service SERVICE_CONFIG_DESCRIPTION, // change: description &sdBuf) ) // value: new description { // printf("ChangeServiceConfig2 failed\n"); bSuccess = FALSE; } else // printf("ChangeServiceConfig2 succeeded\n"); // Release the database lock. UnlockServiceDatabase(sclLock); // Close the handle to the service. CloseServiceHandle(schService); return bSuccess; } //--- It simply got the service hanging during system boot if service type was auto. Just FYI. BTW, the function is useful in adding the description but it should be called after install or a few mins. Best Regards, SZ On 12/13/06, Arno Garrels <[EMAIL PROTECTED]> wrote: > Fastream Technologies wrote: > > Hello, > > > > Our clients using Windows 2003 complain that the lastest beta is > > causing hangs during boot up and then reboots and goes into a loop. > > This is a HTTP/FTP server installed as system service and running with > > administrative rights. It depends only to Tcpip. I noticed tha
Re: [twsocket] Service dependency problem re-occurred.
Fastream Technologies wrote: > Hello, > > Our clients using Windows 2003 complain that the lastest beta is > causing hangs during boot up and then reboots and goes into a loop. > This is a HTTP/FTP server installed as system service and running with > administrative rights. It depends only to Tcpip. I noticed that when > it is trying to run, it blocks alg.exe to execute and this is a cycle > of waiting (cyclic dependency). You can also specify a LoadGroup, that is the name of the load ordering group of which your service is a member. The startup program uses load ordering groups to load groups of services in a specified order with respect to the other groups. The list of load ordering groups is contained in the following registry value: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ServiceGroupOrder Also check value of property ErrorSeverity (dwErrorControl). http://msdn.microsoft.com/library/en-us/dllproc/base/createservice.asp?frame=true http://support.microsoft.com/?scid=kb%3Ben-us%3B102987&x=9&y=13 Have you tried a service-depency on RPCSS? --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be