How can i find out from one of my app running on two separate machines that they are running on a particular machine

Posted on 2003-03-29
Medium Priority
Last Modified: 2010-05-01
I want to run my client applications on different machines.
But when a new client application is run on new machine, i want to verify that the IP addresses i have are running my app or not.

Question by:Syed Irtaza Ali
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

robertlees earned 375 total points
ID: 8232355
I'm not entirely sure I know what you are asking, but if you want to restrict your app to only certain computers, then you need your app to be able to identify what the client computer is called.

Put the following declaration in a module...

Public Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" _
      (ByVal lpBuffer As String, nSize As Long) As Long

Then do the following in Form_Load...

    Dim lng As Long
    Dim strComputerName As String

    lng = 256
    strComputerName = Space(lng)
    Call GetComputerName(strComputerName, lng)
    strComputerName = Left(strComputerName, lng)

You can then test strComputerName to see if it is in the list of acceptable clients.

Author Comment

by:Syed Irtaza Ali
ID: 8241258
how can i get the computer IP address if the users uses FileOpen dialog to select a file from a remote computer.

Expert Comment

ID: 8531368
Hi nomehero,
This old question (QID 20567284) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question