Jump to content

Houmoller

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0

About Houmoller

  • Rank
    LAVA groupie

LabVIEW Information

  • Version
    LabVIEW 2012
  • Since
    2009
  1. Hi. I have a small program that help me move som specific files to specific folders. The filesize vary from 400MB to arround 10GB, they are transfered from a local disk to a netværk disk (mounted as z: drive) Currently I am using the MoveFileA function from the kernel32.dll, and it works fine. It requires two arguments, path from and path to, easy peasy. My problem/request is that I would like to have som sort of progress bar when moving large files. So I would like to monitor the size of the copied data. For this I think I should use the function MoveFileWithProgressA also from the kernel32.dll. from microsoft: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365242(v=vs.85).aspx I get: BOOL WINAPI MoveFileWithProgress( _In_ LPCTSTR lpExistingFileName, _In_opt_ LPCTSTR lpNewFileName, _In_opt_ LPPROGRESS_ROUTINE lpProgressRoutine, _In_opt_ LPVOID lpData, _In_ DWORD dwFlags); where we again have path from and to, then (arg3+4) I should give a pointer to a CopyProgressRoutine callback function - and some arguments for this function. My problem is, that I dont know what that means, and further more, I dont know how to get a file size number or something from this. I hope my problem/request is clear, I would like to have som help in understanding the CopyProgressRoutine callback function, and how to use it. (Windows 7 64bit) Regards Jørgen Houmøller
  2. Hello Lava-people Is it possible to have labview generate an event when a control is deselected? I have a search bar in my application. When the user selects the string-control, a connection to a database is established. When the user is done searching the database, and selects a new control, I would like to destroy the reference to the database thus freeing up the database. Is this possible? Hope you can help me. /Jørgen
  3. Hi lava, I hope you can help me with my problem. The problem that I want to solve (in a proper way) is the following: I have a list of all the *.dat files in a folder. I want this list to update every time a new *.dat file i created in that folder. I don't want to pool the folder constantly so I have solved this problem by using a dynamic event from a .NET action. This is all nice and great. My problem is, that if I change the folder, my dynamic event does not execute when a new file is added to the new folder. I have attached two snippets of the main part of the code. In the mainVI, I first setup some events. The events are then written to a global variable. It is this global that I use when broadcasting the event. In the watch_dir.VI the .NET event is setup. I look for files that are created, deleted, changed or renamed. (Most of the code is from Steve Chandler's nugget: http://forums.ni.com/t5/LabVIEW/My-First-Nugget-Directory-Changed-Event/m-p/1407552) I have tried initializing the different events when the folder is changed,but that does not seem to fix the problem. I hope I have made myself clear, but please dont hesitate in asking questions. I could off course just pool the number of files in the folder or something like that, but that doesn't seem right to me. I hope you can help me. -Jørgen
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.