Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Getting an IP Address

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Getting an IP Address

    What do I use to find IP address of a computer?

    I have my login screen set up so that it grabs the "computer name" and the "user name" from the runtime computer, but I do not know what to use to get the computer's IP address?

    Thanks,

    Steven

    #2
    RE: Getting an IP Address

    If the IP addresses are being set by a DHCP server, you would need to run some kind of external utility. The only one I have used is IPCONFIG which is part of all Windows versions, I think.

    You could run ipconfig from your logon script and redirect its ouput to a file. Your challenge will be extracting the IP address since the format of the information varies from version to version of Windows and contains the IP address, the subnet mask and Default Gateway information.

    Finian
    Finian

    Comment


      #3
      RE: Getting an IP Address

      PS As an afterthought, I checked www.vbapi.com to see if there was an api call that might be used in a function like GetMachineName() but I don't see any.

      Finian
      Finian

      Comment


        #4
        RE: Getting an IP Address

        TRACERT (COMPUTER NAME)

        MIGHT HELP

        Comment


          #5
          RE: Getting an IP Address

          Why would you need it???

          Are you doing something in Alpha that needs IP routing? Is there some security reason for the IP address?

          Tom Henkel

          Comment


            #6
            RE: Getting an IP Address

            start menu,
            run winipcfg [enter]

            Comment


              #7
              RE: Getting an IP Address

              I want to "grab" it in order to track where a user is logging in from. The idea is to get the IP address when the user does a "login" and save it along with a bunch of other stuff in a user log txt file

              Comment


                #8
                RE: Getting an IP Address

                If you want to track IP's you probably already know this but for others who read this:

                If the workstations are getting the IP via DHCP from the server, the IP has the potential for change when the lease expires. So 10.1.1.35 can be computer A this week and computer B next week. If the DCHP does not have expiration dates (I don't recommend that) or static IP's (permanently set) then you could track it.

                Personally I would use the machine name instead. Not real how to get that name into A5, but the machine name would stay constant.

                Mick

                Comment


                  #9
                  RE: Getting an IP Address

                  "Not real how to get that name into A5, but the machine name would stay constant."

                  Mick:

                  Somewhere in www.learn alpha.com there is a simple function called GetMachineName which works just fine in all versions of Windows through XP Pro.

                  Finian
                  Finian

                  Comment


                    #10
                    RE: Getting an IP Address

                    Finian,

                    A search of learn alpha.com does not find the function. I think you posted it here at one time. Unfortunately, I have had mixed results with it. Sometimes it works, and other times it doesn't. Maybe I copied the post incorrectly. Could you repost a working copy.

                    Jerry

                    Comment


                      #11
                      RE: Getting an IP Address

                      Steve,

                      Here's an idea back from the old DOS days.

                      As long as your users are on a Microsoft operating system you could add the following to a batch file:

                      ipconfig > test.txt

                      This will run ipconfig and write the results to a text file called test (change this name and location as you need).

                      Now use Xbasic to extract the IP address and any other info you may need. The text file will always be in the same format so you won't have to worry about the information moving around in the file.

                      Let me know if this helps.
                      Jeffrey Wolfe

                      Open Source Solutions
                      Phone: (757) 819-4230
                      Fax: (888) 300-5994
                      E-mail: [email protected]

                      Comment


                        #12
                        RE: Getting an IP Address

                        HI Jerry:

                        I thought it was there somewhere.

                        The following works on all versions of Windows through XP:

                        '=========
                        function GetMachineName as C()
                        declarestruct text c255text
                        declarestruct length L1length
                        Declare kernel32 GetComputerNameA L(text)(length)
                        temp.text="" 'create a dot variable, or pointer, to text
                        len.length=255 ' do same with length
                        result=GetComputerNameA(temp,len) 'pass 2 pointers to GetComputerNameA
                        GetMachineName=temp.text
                        end function
                        '=========

                        Finian
                        Finian

                        Comment


                          #13
                          RE: Getting an IP Address

                          Steve,

                          IPConfig will not work on all the OS. To get the IP address you need to use Winsock.

                          I do this in Delphi. Go to Microsoft Tech Support and look for Q154512. There are code samples there. I believe X-basic can make calls to the windows API, if so them covert the code sample from VB to X-basic.

                          If you wish, I can post my code here from Delphi so you can try to covert it to X-Basic.

                          Let me know.

                          RF- ARS Motorola

                          Comment


                            #14
                            RE: Getting an IP Address

                            Fortunately all of the macj=hine have Static IP addresses, but I see what everyone is saying and so I will stick with the machine name.

                            Thanks everyone

                            Steven

                            Comment


                              #15
                              RE: Getting an IP Address

                              Finian

                              Checked my code and it is exactly the same. I cut and pasted the code in your post and manually renetered the code, both with no luck. I still get a blank result. This is using v4.5 build 267 on WinME. I tried this on other computers, one with WinME and three others with Win98 and got the same empty result. I even tried it with A5v4.03.

                              Now for the weird part. I know I used the code in the past on a computer with Win95 and it worked. Maybe I just have goofy computers. Any ideas other than an exorcist?

                              Jerry

                              Comment

                              Working...
                              X