CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: aneesh.joy

Search: Search took 0.02 seconds.

  1. Replies
    5
    Views
    847

    Re: Single instance app and multi logons

    Thanks for the suggestions.

    But that does not completely solve my problem. I can not run multiple instances in any case.

    In the suggested method each user will have one instance of the app...
  2. Replies
    12
    Views
    1,258

    Re: Searching a Process

    There is another alternative.. WMI.

    You can issue a WMI query like,

    SELECT ProcessId FROM Win32_Process WHERE Name = 'babylon.exe'

    That will return process id's associated with each instance...
  3. Replies
    5
    Views
    847

    Single instance app and multi logons

    Hi all,

    I have a single instance application which is started automatically
    on user logons.

    Single instance is maintained using a global mutex lock.

    Now the problem i m facing when running...
  4. Replies
    1
    Views
    471

    Capturing window messages

    Hi all,

    How can I capture/tap window message of another application ?
    GetMessage() documentation says it can get WM_* of current thread
    only.

    In MS Spy++ we can get all messages of a selected...
  5. Replies
    3
    Views
    636

    Disabling print menu from applications

    Hi all,

    I have a problem where I want to disable the print option from all applications.

    After I do this setting , all print menu of all apps like notepad, word, etc. should be disabled.

    Is...
  6. Replies
    24
    Views
    22,600

    Re: Convert char[100] to LPTSTR

    Sine OP has agreed for static way of allocation,
    I assume the following.

    1. The function should return a valid pointer or NULL after
    its done.

    2. Does not neccesarily require a char type...
  7. Re: Detect the locally logged on user from a service

    Check,

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

    "DefualtUserName" is the current username

    You can get it easily with Registry functions.


    Cheers.
  8. Replies
    1
    Views
    839

    Re: Monitoring printers

    I found a solution for this.

    Open local print server with OpenPrinter(NULL, &hPrinter, NULL)
    and get notification handle on it using FindFirstPrinterChangeNotification

    This was the clue ! :)
    ...
  9. Replies
    1
    Views
    839

    Monitoring printers

    Hi all,

    I have a print monitoring application that monitors available printers
    while it starts. Its working fine.:)

    Now I want to improve it to monitor newly added printers while its running....
  10. Re: how terminate a sub process when parent crashes

    I did it. ( Of course with your help )

    My parent application has a named pipe. ( Its was there !)

    I created a worker thread ( in child ) to open this pipe and check for
    its validity at...
  11. Re: how terminate a sub process when parent crashes

    Well, that also has a point.

    But I think windows registry is a better place for such a variable.

    I have already implemented code to kill zombies ( in unix terms ).
    And start fresh ones, when...
  12. Re: how terminate a sub process when parent crashes

    Thanks. The idea is good.

    But I think the over head to lookup parent exe is more and
    it makes the child dependend on parents image name.

    I will go for this only if I could not find any other...
  13. Replies
    2
    Views
    1,172

    Re: Consumes more memory

    Run a memory leak detector on you program.

    GlowCode is one such tool.
    http://www.codework.com/glowcode/product.html


    Regards
  14. Re: how terminate a sub process when parent crashes

    I have one more addition to the above.

    I thought the the handle inheritance feature of CreateProcess() can be
    used in this situation, since the child process is a console application waiting for...
  15. Re: how terminate a sub process when parent crashes

    Yes. If the application is not crashing everyting is working fine.
    I can start and stop child process.


    Think of this situation. If kill the **parent** application from Windows Task Manager,...
  16. Re: how terminate a sub process when parent crashes

    I m confused !

    What part of code should we put in try{}catch(){} ?

    Regards
  17. Re: how terminate a sub process when parent crashes

    Thanks.

    But that does not solve to the problem.

    I want to terminate the child process when the parent application
    crashes ( Exceptional cases ).

    In that case I dont have a chance to call...
  18. how terminate a sub process when parent crashes

    Hi guys,

    I have a windows service application that spwans a sub process.
    The sub process is a console application that waits for console input.

    Now my problem is that I want to terminate the...
Results 1 to 18 of 18


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)