rsanford Posted July 14, 2011 Share Posted July 14, 2011 I noticed the addition of a "ServiceModule" when using the wizard to create a Windows Service Application project. What's the purpose of this module? Is the Main form, MainModule and ServerModule in a service app implemented the same as in a StandAlone project? Thanks, Robert Quote Link to comment Share on other sites More sharing options...
rsanford Posted July 14, 2011 Author Share Posted July 14, 2011 Also, can a standalone application be converted to a service application? Thanks again Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 14, 2011 Administrators Share Posted July 14, 2011 It is just like the Service module when you create a standard Delphi service application. It is a descendant of TService. It gives you additional control over service initialization/termination and allows you to set service Name and other service related properties. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 14, 2011 Administrators Share Posted July 14, 2011 Also, can a standalone application be converted to a service application? Thanks again Only if you manually migrate all forms and modules from standalone project to a newly created service project. Quote Link to comment Share on other sites More sharing options...
andersa@ellenshoej.dk Posted July 14, 2011 Share Posted July 14, 2011 I just tried migrating my application to a service. I can compile and install the service and run it, but when I test it in the browser, it gets stuck on loading forever. The application works fine as a standalone application and as an isapi dll. I used these steps: I created a new project using the application wizard and saved it to a new folder. I then moved the project files and the service module file back to my application project folder. Then I imported the project to the application project group. This makes it use the servermodule, mainmodule and mainform from my existing application in the new service project. Finally I added each other form, datamodule and unit to the project. The project was then compiled and did so without any errors. I installed it as administrator and started the service. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 14, 2011 Administrators Share Posted July 14, 2011 I just tried migrating my application to a service. I can compile and install the service and run it, but when I test it in the browser, it gets stuck on loading forever. The application works fine as a standalone application and as an isapi dll. I used these steps: I created a new project using the application wizard and saved it to a new folder. I then moved the project files and the service module file back to my application project folder. Then I imported the project to the application project group. This makes it use the servermodule, mainmodule and mainform from my existing application in the new service project. Finally I added each other form, datamodule and unit to the project. The project was then compiled and did so without any errors. I installed it as administrator and started the service. Do you see a blue screen or a white blank one in browser? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 14, 2011 Administrators Share Posted July 14, 2011 Can you paste contents of your .dpr file here. Quote Link to comment Share on other sites More sharing options...
andersa@ellenshoej.dk Posted July 14, 2011 Share Posted July 14, 2011 White, with Loading... text in upper right corner. The barebones service application works, before I convert it and import my own files. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 14, 2011 Administrators Share Posted July 14, 2011 White, with Loading... text in upper right corner. The barebones service application works, before I convert it and import my own files. Doen ExtRoot point to a valid path? Quote Link to comment Share on other sites More sharing options...
andersa@ellenshoej.dk Posted July 14, 2011 Share Posted July 14, 2011 Thanks for the tips. I did some cleanup of the dpr file. Some unnecessary forms had snuck in from the import. I also copied the ext folder to the expected location. Everything seems to work now! Hmm.. UniForm.Position := poMainFormCenter doesn't appear to be working. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.