Jump to content

Search the Community

Showing results for tags 'service'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • General Development
    • uniGUI Releases & Roadmaps
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
    • Third Party Components
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 3 results

  1. Being new at uniGUI I created one of my first system in desktop mode. Now I want to take that same application and get it running under a Windows service. If I create a new service type application with nothing in it, it looks like the app is launched using this code if not Application.DelayInitialize or Application.Installing then Application.Initialize; Application.CreateForm(TUniServiceModule, UniServiceModule); Application.Run; From an earlier post, I have set up my project with DEFINES like this When running in VCL, this it how things are started and all works well {$IFDEF UNIGUI_VCL} ReportMemoryLeaksOnShutdown:=True; // Optional. Application.Initialize; TUniServerModule.Create(Application); Application.CreateForm(TUniServiceModule, UniServiceModule); Application.Run; {$ENDIF} When running as a service, I'm assuming this is how things are started. {$IFDEF UNIGUI_SERVICE} if not Application.DelayInitialize or Application.Installing then Application.Initialize; Application.CreateForm(TMyServiceClass, MyServiceClass); // Get from your service module. Application.Run; {$ENDIF} I'm assuming that I have to kick off the project through the ServiceModule? I'm not sure what to change this line to: Application.CreateForm(TMyServiceClass, MyServiceClass); // Get from your service module. If I change to this, and I open the application, I just get a blank browser and it looks hung. Application.CreateForm(TUniServiceModule, UniServiceModule); BTW: I was able to get the application installed as a service and am able to start and stop the server without issues.
  2. Standalone Server can run another application. ------------------------------------------------------------- Procedure WinExecAndWait(CommandLine:String); var ComLineBuffer: array[0..512] of char; StartupInfo: TStartupInfo; ProcessInfo: TProcessInformation; Re:Cardinal; begin StrPCopy(ComLineBuffer,CommandLine); FillChar(StartupInfo, Sizeof(StartupInfo), #0); StartupInfo.cb := Sizeof(StartupInfo); StartupInfo.dwFlags := STARTF_USESHOWWINDOW; StartupInfo.wShowWindow := SW_HIDE; if CreateProcess(nil, ComLineBuffer, { pointer to command line string } nil, { pointer to process security attributes } nil, { pointer to thread security attributes } True, { handle inheritance flag } CREATE_NEW_CONSOLE or { creation flags } NORMAL_PRIORITY_CLASS, nil, { pointer to new environment block } nil, { pointer to current directory name, PChar} StartupInfo, { pointer to STARTUPINFO } ProcessInfo) { pointer to PROCESS_INF } then begin WaitforSingleObject(ProcessInfo.hProcess, INFINITE); GetExitCodeProcess(ProcessInfo.hProcess, Re); CloseHandle(ProcessInfo.hProcess); { to prevent memory leaks } CloseHandle(ProcessInfo.hThread); end; end; ------------------------------------------------------------------------ Windows Service Server can run not another application. Thanks.
  3. Hi, I currently have a project that i created as a service, is there a easy way to convert the project to a ISAPI module? Best regards Christian J
×
×
  • Create New...