Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2002
    Posts
    6

    Grin Call DLL Function

    Hello,

    I am trying to find if the application that I intend to install is already running on the system. For this I try to call the 'FindWindow' API from user32.dll.

    Everytime I try to do so the OS gives me an error that that the program had performed an illegal operation and terminates.

    DLL file name: %SysDir%\User32.dll
    Function name: FindWindowA
    Function parameters: "MyApp",""
    Return value type: Long
    Store return value in variable: %Found%
    Default value: 0

    Can any one help???

  2. #2
    Join Date
    Jul 2001
    Location
    Indigo Rose Software
    Posts
    1,834

    Re: Call DLL Function

    I'm not really sure about calling the User32.dll, however I just wanted to propose an alternate solution, depending upon what you intend to do once you get this information.

    For example, if your intension was to have this application closed, you could use the "Close Program" action instead. Is that a possible solution for you?
    Darryl
    Indigo Rose Corporation

    Product Guides: AMS80 | SUF9 | TU30 | VP30 |MSIFACT |DeltaMAX

  3. #3
    Join Date
    Dec 2002
    Posts
    6

    Lightbulb Re: Call DLL Function

    Hello,

    Yes, indeed. I can use 'Close Program' action to find my program and close it.

    But, this is a very simple example of what I would like to achieve.

    What I really want is to find the value of Service Pack Version of Windows NT so that I can inform the user to install the requisite Service Pack prior to installing my software.

    Thanks.

  4. #4
    Join Date
    Jul 2001
    Location
    Indigo Rose Software
    Posts
    1,834

    Re: Call DLL Function

    If I'm not mistaken, I think you can find service pack information in a Registry entry. Try the following location:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\CDSVersion

    That may be what you are looking for.
    Darryl
    Indigo Rose Corporation

    Product Guides: AMS80 | SUF9 | TU30 | VP30 |MSIFACT |DeltaMAX

  5. #5
    Join Date
    Dec 2002
    Posts
    6

    Re: Call DLL Function

    Thanks Darryl,

    That's what I wanted. It did the trick !!!

    Mandark.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts