retrieve ip of local Pc

Recommended Posts

There is no built in way in DAQFactory. However, if you can find some information on the internet on how to retrieve it using C/C++, we could put it into a DLL that you could load with extern() into DAQFactory for you pretty easily.

Why do you need the local address?

Link to comment
Share on other sites

I thought of another way:

1) create a .bat file with this command:

ipconfig > c:\ipadd.txt

ipconfig retrieves the current ips on your system (among other things). The > redirects the output of the command to a file.

2) Use this command in DAQFactory to run the batch file:


where c:\test.bat is the name of your batch file.

3) Use the File. functions to open, read and parse that file (c:\ipadd.txt). The tricky part is on systems with multiple ethernet cards. You'll see a bunch of different adapters and have to figure out how to parse which one to use.

Link to comment
Share on other sites

  • 5 months later...

I succesfully use this function on remote pc that download data from remote instrument.

In this location I have internet server that automatically change the ip address every time the connection is lost and good again.

They can not assign a fix ip address to the pc.

So I let DF read the temporany ip address and let send it to me by email.

In this way I am able to reach the pc over internet by DF and by other remote control software.

Many thanks!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.