Is there a way for LabVIEW to know if the computer has an ethernet connection active?

I need to know in my VI if the computer has a network connection, to avoid trying to connect through TCP/IP when the connection is not available. I would prefer to know if there is a connection available rather than rely on errors coming from the TCP/IP functions not being able to connect.
Windows instantly knows when a network cable is unplugged. Is there a function in LabVIEW that can similarly instantly detect a connection?
Or, does anybody know if there is a Windows-provided dll that contains the function that the taskbar indicator uses to know if there is a connection present. If there is, then I could call the dll from LabVIEW and know the connection status.
Thanks.
Alejandro

Hi there,
there`s an API
unsigned long WNetAddConnectionA(CStr lpRemoteName, CStr lpPassword, CStr lpLocalName);
in mpr.dll.
lpRemoteName the address of a network resource (e.g. "\\YOURSERVER\YOURDRIVE")
lpPassword may be NULL
lpLocalName should be NULL, otherwise the API maps lpRemoteName to the drive you specify in lpLocalName (e.g. lpLocalName = "e:")
if all is ok, the API returns 0, otherwise some errorcodes.
more info can be found here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wnet/wnet/wnetaddconnection.asp
best regards
chris
Best regards
chris
CL(A)Dly bending G-Force with LabVIEW
famous last words: "oh my god, it is full of stars!"

Similar Messages

  • Is there a way for Flex to detect whether the Java Plug-In is installed?

    Hi All,
    Need your help.
    Is there a way for Flex to detect whether the Java Plug-In is
    installed? This may be require a JavaScript External-Interface. Can
    we get if the Java Plug-In is installed and if so, whether it is
    JRE 1.6.X ?
    Regards,
    Amit

    Not knowing what server your app will run on... but something
    like that can be done relatively easy serverside with for instance
    ImageMagick if you run PHP.
    Otherwise, look into Bitmap programming.

  • A word document was emailed to me.  I can open the document without a problem.  Is there a way for me to type on the document.... to fill out the form?  When I click the fields, the virtual keyboard does not appear.

    A word document was emailed to me.  I can open the document without a problem on my iPad 2.   Is there a way for me to type on the document.... to fill out the form?  When I click the fields, the virtual keyboard does not appear.

    If you want to edit a word document then you will need an app on your iPad that supports word so that you can copy them to it via 'open in' e.g. Apple's Pages app or a third-party app such as Documents To Go or QuickOffice HD

  • My computer broke so is there a way for me to put all the music from my iPod Classic onto my new computer

    My computer broke so is there a way for me to put all the music and videos from my iPod Classic onto my new computer.

    Yes...
    For iTunes purchases...
    Launch iTunes on the new computer. From the iTunes menu bar click Store > Authorize This Computer
    Now from the menu bar click File > Transfer Purchases from...
    Fro non iTunes purchases see Zevoneer's post here > Moving files from Ipod to Itunes: Apple Support Communities

  • Is there a way for 2 ipods to share the same downloaded podcasts?

    Is there a way for 2 ipods to share the same downloaded podcasts?
    Instead of having to download 2 sets and storing 2 sets?

    Sync them both to the same iTunes library.

  • Is there any way for my ipad to piggyback the internet from my iphone when i am not in a wifi area... The guy at the ATT

    Is there any way for my ipad to piggyback the internet from my iphone without having to purchase a "plan" from ATT&T....The guy at the store said that I had to purchase a new plan with "so much" GB per month and loose my unlimited amount that I am grandfathered into with my current plan... any thoughts?

    Unfortuneatly, you would have to give up your unlimited plan. In the US you would have to get the 2GB plan for $25 and add the teathering plan for $20 more.  The teathering plan would give you another 2GB of data for a total 4GB.

  • I have 3 computers...Window PC, PowerBook G3 (old) and MacBook Pro. I use firefox for all of them and have for quite some time. Is there a way for them all to use the same toolbar? Each of them have differnet bookmark/ settings etc.,

    I have 3 computers...Window PC, PowerBook G3 (old) and MacBook Pro. I use firefox for all of them and have for quite some time. Is there a way for them all to use the same toolbar? Each of them have differnet bookmark/ settings etc.,

    Open Media Encoder and add your Sequences:
    File > Add Premiere Pro Sequence
    Navigate to your Premiere Project and select it in the list.
    You can then select multiple Sequences from the Project (Ctrl+Click)
    and load them all at once into Media Encoder and apply
    the same encoding preset to all Sequences at the same time.

  • Is there a way to get lightroom to search the computer for catalogs like aperture does?

    Is there a way to get lightroom to search the computer for catalogs like aperture does? I've switched over from Aperture to Lightroom, and i liked how in Aperture when i went to open "other library" it would basically scan all connected drives for them, and show me when last opened and what version. Is there a way to do this with Lightroom, either in program or by a third party app?

    The user interface is on a level of elementary PC software
    something I have deteced till now
    no free moving workspace windows
    no search function for the whole catalog
    no support of mpg files in the archive
    no chromatic appararture correction
    second screen sometimes gets lost, when moving between screens
    no automatic creation of collection ( very risky direct interfacing with the original file system )
    wrong counting of objects in catalog folder when creating virtuel copies
    What worked good is the import of the APERTURE Archive ( 40000 objects ) took me one night and its there with the above obsticles!!! I am using just three days and I have to say
    not user friendly
    not workflow supporting
    risky user interfacing with masters
    As JimHess stated, there is no risk working with the masters.
    Chromatic aberation correction is available in Lightroom, searching the entire catalog is available in Lightroom.
    With regards to your other comments, the idea that Lightroom should work the same (or very similar) to Aperture is one that you should remove from your thoughts. It will only get you into trouble. Lightroom is not Aperture and will not work the same, and has different underlying principles, and so its pointless to think you will be able to do everything the same way you did it in Aperture. You need to be open to Lightroom's features, and Lightroom's way of doing things. I agree with JimHess that it takes most people a while to learn Lightroom's way of doing things, but your patience will be rewarded.

  • Is there a way to play itunes music with the computer shut?

    Is there a way to play itunes music while the computer is shut?

    Not without either an external monitor and keyboard, or using a hack. If you want to try an hack app, look into:
    http://www.macupdate.com/app/mac/22211/insomniax
    Use at your own risk.
    Regards.

  • My iPhone 4s screen is cracked and can't slide to unlock it.  Several of the icons are not working as well.  Is there a way to recover my photos if the phone has never had a back up or synced with another device?

    My iPhone 4s screen is cracked (due to being dropped) and I can't slide to unlock it.  Several of the the icons on screen will not work either.  Is there a way to recover my photos if the phone has never had a back up and never been synced with another device?

    kitts1979 wrote:
    My iPhone 4s screen is cracked (due to being dropped) and I can't slide to unlock it.  Several of the the icons on screen will not work either.  Is there a way to recover my photos if the phone has never had a back up and never been synced with another device?
    No in order to backup to iTunes, you would need to unlock your phone.
    In order to import pics to your computer you would need to unlock your phone.

  • My ipod is stuck on do not disconnect, and it won't respond when plugged in to imac or wall.  Is there a way to restart it without using the computer?

    My ipod is stuck on do not disconnect, and it won't respond when plugged in to imac or wall.  Is there a way to restart it without using the computer?

    You can reset your iPod with these instructions:  http://support.apple.com/kb/HT1320

  • Is there a way for Labview to take control of a file that is already in use

    Is there a way in LabView to programatically take control of a file in use by another process?  I wish to write data to files that may be opened by another process, this data is time sensitive and acquired continuously so having my process wait until the file is available is not feasible.
    There should not be any other software accessing these files but sometimes windows is looking at them for some reason and I'm not sure how to make windows let go of them.  This does not accur often but it is annoying.

    Axehandler wrote:
    Is there a way to find out which program/service might be opening these files?
    Yes, use handle or process explorer from sysinternals. (see also).
    How is your labVIEW program structured? Could it be that your LabVIEW program itself holds on to the file from e.g. a previous file IO operation? Make sure references don't become invalid (e.g. via a "use default if unwired output tunnel) which would prevent the file from getting closed properly for example. Your program should open the file once at the start of the program and keep it open for the duration of the run. This way you should not have any intermittent problems accessing it.
    LabVIEW Champion . Do more with less code and in less time .

  • Hey hi i am a iOS developer just wanted to know is there a way that i can know that the user of my app has deleted my app plzz reply its really urgent......

    iOS5 iphone 4s
    I recently developed a App and wanted to know has the user deleted the app???
    The Scenario is like
    Consider a User ......
    In my App he adds 100 tasks and scedules it for APNS on a daily basis
    and deletes the app
    and on the other day again downloads the app he gets the apns for all 100 tasks though no tasks are present,
    as the tasks are mapped on apple Device Tokens.
    So Please help me on the issue........

    If you are a developer, then this should be posted to the developer forums.
    The question has nothing to do with using an iPhone in the Enterprise (i.e. a Corporate environment).

  • In old firefox the zoom out stayed. Is there a way for this to happen on the new one too?

    When I play on some sites I like them to be zoomed out so I can see more at once. But every time I change the screen I'm using it zooms back to the original. Is there a way to save the setting so I don't have to scroll so much?

    You can use one of these extensions to set a default font size and page zoom on web pages:
    * Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    * NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/
    Check that you aren't running Firefox in permanent [[Private Browsing]] mode

  • Is there any way to use my iphone through the computer?

    Today at work, my phone screen, which was already cracked, got messed up to the point where the screen is getting false touch signals. It is resonating from the top left of the screen and traveling down the fracture and making the phone impossible to use. I can barely open the lock screen, and there is no way to access any of the apps (including the actual call aspect). I want to know if there is a way for me to be able to use my phone through my computer, at least to be able to access my contact list and turn off an alarm I had set for tomorrow which I would prefer not to go off,since I would never be able to actually deactivate it...
    My problem makes it impossible to even shut off the phone, and since I use it as my house phone as well, it would really be amazing of there was some way to work it through the computer. I also am wary about letting the battery run dry because I want to be able to see if people are trying to contact me.
    Any help is appreciated, thanks!

    This is not a feature of the iPhone or iOS.
    Replace the screen or device.

Maybe you are looking for