Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

jinjiashan

@jinjiashan
About
Posts
15
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • learn how to learn
    J jinjiashan

    :)

    C / C++ / MFC tutorial question learning

  • learn how to learn
    J jinjiashan

    Do you think we don't need method to study C/C++, If you have a good way to study, you can catch c, c++, java, masm and many things quickly.

    C / C++ / MFC tutorial question learning

  • learn how to learn
    J jinjiashan

    Hi,all First,I think learning how to learn is important; Then the knowledge of major; When I study knowledge, I use the way of learning and I explore the way of learn; Do you think so?

    C / C++ / MFC tutorial question learning

  • a bother about windows service
    J jinjiashan

    :) thank you Snakefoot, I finish it;

    C / C++ / MFC debugging question

  • a bother about windows service
    J jinjiashan

    ?????

    C / C++ / MFC debugging question

  • a bother about windows service
    J jinjiashan

    who can help me?

    C / C++ / MFC debugging question

  • a bother about windows service
    J jinjiashan

    Hi,all I have a windows service program with a service,and I can use "myservice/service" in cmd.exe,it sucess! then,I can see the service in control pane,I also can start up this service; But, this service can't run my code;:confused:why?? the whole code here void yourfunction() { for (int a =0; a<10; a++) ::MessageBoxA(NULL, "ggg", "ghgh" ,MB_OK); } SERVICE_STATUS ServiceStatus = { SERVICE_WIN32_OWN_PROCESS | SERVICE_INTERACTIVE_PROCESS, SERVICE_STOPPED, SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_PAUSE_CONTINUE | SERVICE_ACCEPT_PAUSE_CONTINUE, 0,0,0,0 }; TCHAR szSvName[]=TEXT("Myservice1"); SERVICE_STATUS_HANDLE hStatus; SC_HANDLE SCMger; void WINAPI ControlHandler(DWORD request); void ServiceMain(int argc, char* argv); void CreateMyService() { SCMger=OpenSCManager(NULL,NULL,SC_MANAGER_ALL_ACCESS); CreateService( SCMger, szSvName, szSvName, SERVICE_START, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_IGNORE, TEXT("c:\\myservice1.exe"), NULL, NULL, NULL, NULL, NULL); } int main() { SERVICE_TABLE_ENTRY ServiceTable[2]; ServiceTable[0].lpServiceName = szSvName; ServiceTable[0].lpServiceProc=(LPSERVICE_MAIN_FUNCTION)ServiceMain; ServiceTable[1].lpServiceName = NULL; ServiceTable[1].lpServiceProc= NULL; if(StartServiceCtrlDispatcher(ServiceTable)==0)CreateMyService(); } //this fun also can't be debug,can't run void ServiceMain(int argc, char* argv) { hStatus = RegisterServiceCtrlHandler(szSvName,ControlHandler); ServiceStatus.dwCurrentState = SERVICE_START_PENDING; ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_SHUTDOWN; SetServiceStatus(hStatus,&ServiceStatus); ServiceStatus.dwWin32ExitCode = NO_ERROR; ServiceStatus.dwCheckPoint = 0; serviceStatus.dwWaitHint = 0; ServiceStatus.dwCurrentState = SERVICE_RUNNING; SetServiceStatus(hStatus,&ServiceStatus); yourfunction(); ServiceStatus.dwCurrentState = SERVICE_STOPPED; SetServiceStatus(hStatus,&ServiceStatus); } //this fun can't be debug,can't run void WINAPI ControlHandler(DWORD request) { switch(request) { case SERVICE_CONTROL_SHUTDOWN: ServiceStatus.dwCurrentState = SERVICE_STOPPED; SetServiceStatus(hStatus,&ServiceStatus); break; } }

    C / C++ / MFC debugging question

  • windows service
    J jinjiashan

    Hi, all I want to do a windows service program with vs2008, now, i want to know the steps to create windows service; and i want to know the theory about windows service; other,who can give a example?,hehe

    C / C++ / MFC tutorial question

  • timer control
    J jinjiashan

    Right key to the class,click "attribute", --->"message"--->"WM_TIMER" ::Settimer()

    C / C++ / MFC c++ tutorial question

  • Message Loop...
    J jinjiashan

    use SetWindowsHookEx Function,it can get the message which passed to the target thread you want to watch

    C / C++ / MFC question

  • How to use CListCtrl to handle message
    J jinjiashan

    thank you I try to do it

    C / C++ / MFC tutorial

  • How to use CListCtrl to handle message
    J jinjiashan

    Hi, all message can't be responsed? how to handle?

    C / C++ / MFC tutorial

  • How to use CListCtrl to handle message
    J jinjiashan

    thanks for all friends above; I have a class derived CListCtrl, I tend to use this class to access the item associated with this class. so I should use which message handle? all message can't be responded,why? class CMyList : public CListCtrl

    C / C++ / MFC tutorial

  • How to use CListCtrl to handle message
    J jinjiashan

    How to use CListCtrl to handle message

    C / C++ / MFC tutorial

  • tic tac toe
    J jinjiashan

    Hi,I don't have it,

    C / C++ / MFC game-dev
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups