Will the steps be the same for Win Mobile as depicted here for "Windows NT/Windows 2000"? OR, is there a different step(s) for creating a service on Win Mobile 6/7.
ReplyIf possible can you pls give the step by step procedure to develop an NT service and procedure to install...
11122Reply
situation: a service (works fine, thanks to the demos here) and a Dialog-exe (MFC-Dialog with visualc++6) should communicate each-other. i do not mean service-communication via SMC to stop or start a service, i mean interconnection for dataexchange or send fast information. a kind of PostMessage(..) with lparam to access data directly (but PostMessage() does not work in my service). Is there a way?
I successfully used shared memory as described here to communicate between the service and an application: http://www.codeproject.com/KB/threads/Win32IPC.aspx http://www.codeproject.com/cpp/Win32MRW.asp I only removed the event stuff from the demo code as I didn't need it. (Sorry for the bad formatting, but this forum seems not to support line breaks.)
ReplyI would also really appreciate if you can provide feedbacks on the question by gutdat. I am also having the same problem. Any inputs would be great! :) Thanks.
Replycan it. where can i find out what they can do and how to fix them?
i do not find a normal way with debug-tools, so i use normal ofstream-class to write status an results in a file and look them with an editor. additional i use a lot try-and-catch clauses to track down an error. it is a stupid way but works.
ReplyThis article is very good for beginners like me who must make Windows Service applications from now. Very consise and to the point,easy for understand. Thanks Anish.
ReplyOriginally posted by: geecka
to create a simple service is easy...
hi,
i want to create a service in a dll that run under svchost service but i didn't find any docs about this type of service (what function to export,how the dll service comunicate with SCManager ....);
If you find any information, please, share it with me! I'm intrested in this question too, very much!
ReplyOriginally posted by: ZHEFU ZHANG
Hi, just as the title. My service is not interactive with desktop, but I need to know when the user logon his account. Thanks ahead for replying
start a kernel timer and do your checking routines there every few seconds... i.e.,you can check system_user. i used to do that.
ReplyOriginally posted by: ppychu
I cannot find any field in the structure that takes
in a desc. for the service. WHen looking
at the services GUI window, it seems that all 3rd party
services (other than Microsoft) has no description.
Any gurus can help???
Thanks
Originally posted by: Sudhir
How to add dialog box to NT service?
(Specifically in Borland C++ builder.)
T&R,
Sudhir
Originally posted by: aliho
How can connect to the Database through the ODBC API in service?
I'am already have some code, but it does not work in service, it works in based on dialog program.
there is a code:
SQLHENV henv;
SQLHDBC hdbc;
SQLRETURN retcode;
retcode = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv);
if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
retcode = SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0);
if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
retcode = SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
SQLSetConnectAttr(hdbc,SQL_LOGIN_TIMEOUT,(void*) 5, 0);
retcode = SQLConnect(hdbc, (SQLCHAR*) "iwdsn", SQL_NTS,(SQLCHAR*) "SYSDBA", SQL_NTS, (SQLCHAR*) "masterkey", SQL_NTS);
if (retcode != SQL_SUCCESS){
short i = 1, MsgLen;
SQLCHAR SqlState[300] ;
SQLINTEGER NativeError;
SQLCHAR Msg[300];
while ((retcode = SQLGetDiagRec(SQL_HANDLE_DBC, hdbc, i, SqlState, &NativeError,
Msg, sizeof(Msg), &MsgLen)) != SQL_NO_DATA) {
i++;
}
return -1;
}
}
SQLDisconnect(hdbc);
}else
SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
SQLFreeHandle(SQL_HANDLE_ENV, henv);
}