Threads and stop()

Hi
I am struggling with the deprecated stop() method.I have a requirement in which I have to stop the thread from whatever it is doing after X amount of time.I cant go the interrupt route as my code doesnt satisfy any conditions for the interrupt to work (For Ex. sleep() and wait() ; running in a loop ; etc).
Stop method seems ideal to me ; as it does the work I want ; but cant use it as its not a good programming practice.
Assigning Thread to null also doesnt work.
Any ideas.
Thanks
Pankaj

Hope this helps
The proper way to stop a running thread is to set a variable that the thread checks occasionally. When the thread detects that the variable is set, it should return from the run() method.
Note: Thread.suspend() and Thread.stop() provide asynchronous methods of stopping a thread. However, these methods have been deprecated because they are very unsafe. Using them often results in deadlocks and incorrect resource cleanup.
    // Create and start the thread
    MyThread thread = new MyThread();
    thread.start();
    // Do work...
    // Stop the thread
    thread.allDone = true;
    class MyThread extends Thread {
        boolean allDone = false;
        // This method is called when the thread runs
        public void run() {
            while (true) {
                // Do work...
                if (allDone) {
                    return;
                // Do work...
Alternatively declare a stop() method inside your thread or runnable class and call this method to set allDone variable to false.

Similar Messages

  • Long-running Batch eWay JCD - threading and stopping

    I have a requirement to poll for files on a remote server, every few seconds, almost continuously. Furthermore, without making a connections every polling interval. In other words, connect once and stay running, If a file is found, send a JMS message to another service that will process the file, but keep polling for more files. Thus, a long-running service. This will tie up the thread?
    Can I have an array of BatchFTP instances, and in each loop of the long-running process, check each connected instance for incoming files? Or can I only have one instance?
    If the domain is shutdown, will this service shutdown nicely, if it is still in its looping process? If not, I could check another 'command queue' for a shutdown command, but now I have to add code to the domain shutdown script to send that shutdown message to the command queue. Could I instead, somehow check the status of another service in the same project to see if it is shutdown, and therefore know to stop the loop and allow it to be shutdown? I saw an example of a JMX command to check the status of an object. Is that the best way to check the status of a jcd from inside another jcd?
    thanks, Pete

    Hi Chris and thank you,
    I also do not want to build and manage a long-running service, from a performance point of view. The owners of the target server want a file to be picked up as soon as it arrives (within 5 seconds), but they don't want FTP connections created and deleted every 5 seconds. They expect that we will make a connect() call, and then continually loop / poll using dirlist() method.
    When I look at this requirement I also think of re-using it as a generic service - as long as I have a long-running service, I might as well use it for any other long-running, open FTP connections to other servers/userids. So in the same jcd instance, I would connect to multiple FTP servers and execute a loop where I go through a list of FTP connections, and for each, I would go through a list of folders that should be polled (using dirlist method). So I only have one JCD running for a long time but it could have multiple FTP connections open. That is why I am thinking of using an array of BatchFTP objects.
    When your code shows a Scheduler eWay input, do you mean that the JCD will triggered by the first Scheduler message, but would then go into a loop, doing work, and performing a JMS.receive on that Scheduler queue for the 2dn, 3rd, .. nth Scheduler message? So because the jcd is still running, it still had all its objects and FTP connections (open), but its looping is controlled by the Scheduler message?
    I'm running 513u3. I am worried about shutdown. I think it might not listen to a shutdown command. So that is why I was thinking about putting in some code at the bottom of the loop that would check, somehow, if a shutdown is in progress.
    Peter

  • How to start and stop a progress-bar thread before/after the main thread

    hi. I would appreciate any kind of help on my request.
    I have this as my main() function
         public static void main(String[] args)
              SwingUtilities.invokeLater(new Runnable(){
                   public void run(){                              
                        Options op = new Options();
                        OdessaClient oc = new OdessaClient(op);     
                        oc.setVisible(true);                    
         }Whenever I try to start a simple JFrame with an indeterminate progress bar on it just before the main function and stop it somewhere after I get a StackOverFlow error
    Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
         at java.awt.Component.show(Component.java:1302)
         at java.awt.Component.setVisible(Component.java:1253)
         at com.client.CylonBar.hide(CylonBar.java:25)
         at java.awt.Component.show(Component.java:1302)
         at java.awt.Component.setVisible(Component.java:1253)
    ...and so on...How must I implement something like it?

    Not precisely that way, but just off the top of my head, you would have to have a handle to the proccess (server) in the first window, then have a monitor program that allows you take this handle and end it. I would make this monitor program be the gateway to starting and stopping your server. To run a .bat file you can use runtime.exec().

  • A problem with Threads and MMapi

    I am tring to execute a class based on Game canvas.
    The problem begin when I try to Play both a MIDI tone and to run an infinit Thread loop.
    The MIDI tone "Stammers".
    How to over come the problem?
    Thanks in advance
    Kobi
    See Code example below:
    import java.io.IOException;
    import java.io.InputStream;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.microedition.media.Manager;
    import javax.microedition.media.MediaException;
    import javax.microedition.media.Player;
    public class MainScreenCanvas extends GameCanvas implements Runnable {
         private MainMIDlet parent;
         private boolean mTrucking = false;
         Image imgBackgound = null;
         int imgBackgoundX = 0, imgBackgoundY = 0;
         Player player;
         public MainScreenCanvas(MainMIDlet parent)
              super(true);
              this.parent = parent;
              try
                   imgBackgound = Image.createImage("/images/area03_bkg0.png");
                   imgBackgoundX = this.getWidth() - imgBackgound.getWidth();
                   imgBackgoundY = this.getHeight() - imgBackgound.getHeight();
              catch(Exception e)
                   System.out.println(e.getMessage());
          * starts thread
         public void start()
              mTrucking = true;
              Thread t = new Thread(this);
              t.start();
          * stops thread
         public void stop()
              mTrucking = false;
         public void play()
              try
                   InputStream is = getClass().getResourceAsStream("/sounds/scale.mid");
                   player = Manager.createPlayer(is, "audio/midi");
                   player.setLoopCount(-1);
                   player.prefetch();
                   player.start();
              catch(Exception e)
                   System.out.println(e.getMessage());
         public void run()
              Graphics g = getGraphics();
              play();
              while (true)
                   tick();
                   input();
                   render(g);
          * responsible for object movements
         private void tick()
          * response to key input
         private void input()
              int keyStates = getKeyStates();
              if ((keyStates & LEFT_PRESSED) != 0)
                   imgBackgoundX++;
                   if (imgBackgoundX > 0)
                        imgBackgoundX = 0;
              if ((keyStates & RIGHT_PRESSED) != 0)
                   imgBackgoundX--;
                   if (imgBackgoundX < this.getWidth() - imgBackgound.getWidth())
                        imgBackgoundX = this.getWidth() - imgBackgound.getWidth();
          * Responsible for the drawing
          * @param g
         private void render(Graphics g)
              g.drawImage(imgBackgound, imgBackgoundX, imgBackgoundY, Graphics.TOP | Graphics.LEFT);
              this.flushGraphics();
    }

    You can also try to provide a greater Priority to your player thread so that it gains the CPU time when ever it needs it and don't harm the playback.
    However a loop in a Thread and that to an infinite loop is one kind of very bad programming, 'cuz the loop eats up most of your CPU time which in turn adds up more delays of the execution of other tasks (just as in your case it is the playback). By witting codes bit efficiently and planning out the architectural execution flow of the app before start writing the code helps solve these kind of issues.
    You can go through [this simple tutorial|http://oreilly.com/catalog/expjava/excerpt/index.html] about Basics of Java and Threads to know more about threads.
    Regds,
    SD
    N.B. And yes there are more articles and tutorials available but much of them targets the Java SE / EE, but if you want to read them here is [another great one straight from SUN|http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html] .
    Edited by: find_suvro@SDN on 7 Nov, 2008 12:00 PM

  • Application threads were stopped for a long time

    Hi, We have got the following problem.
    application threads were stopped for a long time after Minor GC hava finished. Minor GC takes usally less than 1sec but a time application threads were stopped tekes often 100 sec.
    What's jvm doing then? alternatively we want to get more information when Minor GC occured.
    gc.log
    33919.643: [GC 33919.643: [ParNew: 376030K->102916K(546176K), 0.1462336 secs] 1953320K->1680371K(4642176K), 0.1465861 secs]
    Total time for which application threads were stopped: 0.1557298 seconds
    Application time: 1.3021807 seconds
    34020.827: [GC 34020.827: [ParNew: 376068K->103166K(546176K), 0.3350141 secs] 1953523K->1681429K(4642176K), 0.3353194 secs]
    Total time for which application threads were stopped: 100.0714587 seconds
    Application time: 1.0932169 seconds
    34121.180: [GC 34121.180: [ParNew: 376318K->100333K(546176K), 0.3740967 secs] 1954581K->1680438K(4642176K), 0.3744228 secs]
    Total time for which application threads were stopped: 99.2983213 seconds
    Application time: 0.7258378 seconds
    34122.304: [GC 34122.305: [ParNew: 373485K->115425K(546176K), 0.9584334 secs] 1953590K->1696193K(4642176K), 0.9587701 secs]
    Total time for which application threads were stopped: 0.9823952 seconds
    machine spec and jvm option
    T2000 Solaris10 Sparc
    1cpu 8core 32thread 1GHz, 8GB Memory
    jvm 1.4.2_14
    -d64 -server
    -XX:NewSize=800m -XX:MaxNewSize=800m
    -XX:SurvivorRatio=1
    -XX:+DisableExplicitGC
    -XX:+UseConcMarkSweepGC
    -XX:+UseParNewGC
    -XX:+CMSParallelRemarkEnabled
    -XX:MaxPermSize=256m -XX:PermSize=256m
    -XX:+UsePerfData
    -verbose:gc
    -XX:+PrintGCDetails -XX:+PrintGCTimeStamps
    -XX:+PrintTenuringDistribution
    -XX:+PrintGCApplicationStoppedTime
    -XX:+PrintGCApplicationConcurrentTime
    -Xloggc:/opt/local/jj/jboss/server/fujiyama/log/gc.log
    -Xmx4800M -Xms4800M
    we attempt single thread GC or set 2400M for heap memory
    or -XX:UseParallelGC or set the following param
    -XX:NewSize=1000m -XX:MaxNewSize=1000m
    -XX:SurvivorRatio=6
    -XX:TargetSurvivorRatio=80
    -XX:MaxTenuringThreshold=20
    -Xmx4000M -Xms4000M
    but the situation wasn't improved.

    Hi Thanigaivel
    the above flag reports all the stop the world pauses not only
    those caused because of gc. Unfortunately, this flag has
    misleading name. Thanks for your info!!
    Can you think of any reasons other than GC that cause the stop the world pauses? How can I identify the reason? Are there any VM options to log all the activities that causes the "stop the world" pauses?

  • Java threads and WinLogon processes taking CPU!

    We are seeing a strange problem. We have a multi-threaded java application
    that is deployed on a Microsoft Windows 2000 server (SP4) with Citrix
    Metaframe XP (Feature release 2). When this application starts, we start to see
    multiple WINLOGON.EXE processes (20 plus) each taking up 1-2% of CPU -
    this raises the CPU usage on the server significantly, impacting performance.
    We have tested with JDK 1.3, 1.4, and 1.5 and see the same issues. If we
    run the java application in a single thread, we dont see the same issue.
    Has any one seen this problem before? Any suggestion on how this can be resolved?
    Thanks in advance!

    Thanks for your replies. This is a Citrix environment where there are 50 plus
    users logged in and there are 50 plus instances of Winlogon.exe always
    running. Most of the time the cpu usage of these processes is 0.
    We tried a multi-threaded program that lists files in a directory every few
    seconds. There are 40 plus servers in the farm that we are deploying this
    application on. We are seeing this problem on only some of the servers.
    If we run a single thread from main(), we dont see the issue. But if we spawn
    10 threads doing the scans periodically, we notice that as soon as all the threads
    start, the WinLogons appear to start to take up CPU. When we stop the java
    program, the WinLogon processes drop in CPU usage.
    Is it possible that Java and WinLogon share some dlls that could be triggering
    the WinLogon processes off?
    We have tried running the single thread and multi-threaded programs around
    same time and the correlation with the winlogons is clearly visible. If we add
    sleep() soon after we start a thread, the winlogons seem to kick in later.

  • Music starts and stops during playback of burned DVD

    I really need help with this problem...I made a slideshow and added music from itunes in the program IDVD. Once I burned the DVD the music will start and stop throughout the DVD and not at chapters as I read in other threads - but in random places on the DVD. The DVD sounds like it gets hung up and then starts again. This is my first project using IDVD, so any help would be great.

    Debra,
    Do your project have music purchased from iTunes? If so, that could be the cause of this problem. Music from iTunes is DRM-protected and can cause problems in playback. To take care of this, first burn all of your purchased music to a CD, then reimport in an aiff format. To do this, in iTunes, go to iTunes>Preferences>Advanced>Importing. Look for "Import using", and use the drop-down menu to select AIFF encoder.
    Good luck.

  • How to play and stop flv files through NetStream in AIR Application

    Hi,
    In a folder I have 'n' number of flv file, which are DRM protected. when the user try to play those files for the first time through my AIR application, it will prompt for username and password and gets the license/voucher from the server and store it in AIR Runtime. so that from the next time onwords it won't prompt for username and password as because it already has license/voucher.
         My problem is assume there are 500 files, such that for each file the user has to enter his credentials[username and password]. which is a stupid thing. I want to avoid this process by implementing this process internally/programetically. By playing/accessing each file through netstream from the folder and setDRMAuthenticationCredentials for that file and stop the stream. Here I am able to play each file but I am failed to stop it. I mean to say I will get the license for all the flv files internally[while loading my AIR application], such that user should not be interrupted for his credentials for each file.He should play as if he is accessing/playing a non-DRM protected file. I will be very thank full if any one help me out in this.
    public function init():void {
          connectStream();
          getLicenseForAllFiles();
          videoStream.addEventListener(DRMAuthenticateEvent.DRM_AUTHENTICATE, drmAuthenticateEventHandler);
          ppt_videoStream.addEventListener(DRMAuthenticateEvent.DRM_AUTHENTICATE, ppt_drmAuthenticateEventHandler);
            private function getFilesRecursive(rootFolderPath:String):void {
                //the current folder object
                var currentFolder:File = new File(rootFolderPath);
                //the current folder's file listing
                var files:Array = currentFolder.getDirectoryListing();
                //iterate and put files in the result and process the sub folders recursively
                for (var f = 0; f < files.length; f++) {
                    if (files[f].isDirectory) {
                        if (files[f].name !="." && files[f].name !="..") {
                            //it's a directory
                            getFilesRecursive(files[f].nativePath);
                    } else {
                        //it's a file
                        fileList.push(files[f].nativePath);
                        //Alert.show(""+files[0].nativePath);
                        var fileName:String = files[f].name;
                        if(fileName.indexOf("PPT_")!=-1){
                            ppt_videoStream.play(files[f].nativePath);
                            ppt_videoStream.pause();
                        videoStream.play(files[f].nativePath);
                        videoStream.pause();
                private function connectStream():void {
                    videoConnection = new NetConnection();
                    videoConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    videoConnection.connect(null);
                    ppt_videoConnection = new NetConnection();
                    ppt_videoConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    ppt_videoConnection.connect(null);
                    videoStream = new NetStream(videoConnection);
                    videoStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    video.attachNetStream(videoStream);
                    ppt_videoStream = new NetStream(ppt_videoConnection);
                    ppt_videoStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    ppt_video.attachNetStream(ppt_videoStream);
             private function netStatusHandler(event:NetStatusEvent):void {
                switch (event.info.code) {
                    case "NetConnection.Connect.Success":
                        //connectStream();
                        break;
                    case "NetStream.Play.StreamNotFound":
                        trace("Unable to locate video: " + videoURL);
                        break;
                private function drmAuthenticateEventHandler(event:DRMAuthenticateEvent):void {
                    videoStream.setDRMAuthenticationCredentials("adobe", "adobe", "drm");
                private function ppt_drmAuthenticateEventHandler(event:DRMAuthenticateEvent):void {
                    ppt_videoStream.setDRMAuthenticationCredentials("adobe", "adobe", "drm");
    Thanks
    Sudheer Puppala

    Hi,
    Please go through following links..this will help you:
    http://lucamezzalira.com/2009/02/28/create-pdf-in-runtime-with-actionscript-3-alivepdf-zin c-or-air-flex-or-flash/
    http://forums.adobe.com/thread/753959
    http://blog.unthinkmedia.com/2008/09/05/exporting-pdfs-in-flex-using-alivepdf/
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • ITunes will not launch, does reading itunes library and stops

    Repaired itunes a couple of times & no luck. Installed fresh itunes download, installs itunes, does reading itunes library and stops.  Plug in iphone 5s & ipad, does reading itunes library and stops, no luck. What's up with the program?

    Bill Marcy wrote:
    As a side note, because you seem much more knowledgeable than I, is there some way to clone your settings and then reinstall them after wiping and reinstalling the OS?
    you could use e.g. _*Carbon Copy Cloner*_ to clone your current system to an external HD, then use +setup assistant+ (which launches when you start up the freshly installed OS for the 1st time) to migrate user account and network settings from the clone.
    that should not bring over any corrupted file (hopefully).
    you can use the instructions in [this|http://web.me.com/pondini/AppleTips/Setup.html] user tip. i would recommend not to migrate applications and +other files and folders+ but re-install 3rd party software manually (one by one) and do the same for all other data.
    here's a helpful thread: _*where important data is stored*_ (one correction to this link: iCal data is stored in ~/library/calendars).
    as for your iTunes library, with the clone connected, copy the entire iTunes folder (not just the iTunes music folder) from <MacintoshHD>/users/<yourname>/music on the clone to <MacintoshHD>/users/<yourname>/music on the new install.
    JGG

  • Pause and Stop implementation in streaming audio

    Hi,
    I am building a program that transmits audio over a TCP connection(using ServerSocket and Socket classes). My problem is that I am not being able to correctly implement the 'Pause' and 'Stop' option. Let's go into more details:
    When the "Play" button is clicked, following line is invoked:
       Play(){
         dataOut.write(fileToPlay.getBytes());
         // write the name of file requested to dataOut, and dataOut is the TCP socket's OutputStream
         //initilized as dataOut = dataSocket.getOutputStream
         controlOut.write( PLAY_REQUESTED_FILE);
         //an int argument, server interprets this and reads the dataOut
         //and sends the audio bytes after encoding
         Player P = new Palyer (dataIn, controlIn);
         PlayerThread pt = new Thread(p);
         pt.start();
    }                    the Player class's run method is:
    public void run() {
            stopReq = false;
         //here the line object is opened and started.
         int nBytesRead = 0;
         new Thread(stat).start(); //this thread gives continuos statistics of bandwidth used
         while (nBytesRead != -1) {
               nBytesRead = dataIn.read(buf);
               //some decoding of buf goes on here
                line.write(decoded, 0, decoded.length);
    }          The server works in a very similar fashion:
         when the PLAY_REQUESTED_FILE command is recieved, if invokes this play method:
              File f = getFileName(dataIn); // this gets the file name from input stream of the sockt
         Streamer s = new Streamer(f, dataOut);
         StreamerThread st = new Thread(s);
         st.start();
              the Streamer class's run method is:
              while (fis.available() != 0 ) {
              fis.read(dataBuffer);
              //fis is the stream to read the File object passed to constructor
              //some compression happens here and then,
              dataOut.write(dataBuffer);
              please help me implement the stop and pause options(the client GUI has the pause and stop buttons in place).
         as always, help is greatly appreciated,
         thanks in advance
         Ishwar

    thank you for your reply captfoss, i see that you're always the first one to reply, i am really grateful for that.
    yes, i have already written code for issuing the stop and pause command, but i don't know how exactly one should implement them. i mean, i sure there'll have to to be some sort of lock object on which notify( ) and wait( ) methods will have to called, but i am not being able to do that. . something similar (but not same) thing has been discussed here http://www.javalobby.org/java/forums/t18465.html at the end of the page, please help as i have tried everything i can and still it adamantly refuses to work..

  • Is there a way to Start and Stop OC4J through Services

    Currently we are starting and stopping OC4J manually through the Dos command prompt on our servers. We are interested in making it a Services where we can start and stop OC4J thourgh the services option on the control panel in windows. Any suggestions would be greatly appriciated.
    Thanks!
    Chad

    This has been discussed several times in this forum. One of the thread is
    How can I set the export path in Form Builder 6i?
    yes, you can use Windows Resource Kit or some third party freeware to do so.
    regards
    Debu

  • How to start and stop a server

    I am doing some sockets programming.
    Now, when I want to get the TomCat 4 server running for instance, I would have to run the startup.bat or startup.sh file. To stop the server I run the shutdown.bat or shutdown.sh file.
    Can I do the same thing in Java?
    That is, in one window, I run a program: C:\>java myserver start
    The server starts running and holds there.
    In another window, I run another command: C:\>java myserver stop
    and the server in the other window stops.
    I am thinking the server would be running in a thread. When I shut it down, I close the thread just like in the Applet Clock example.
    I've tried this but it doesn't work.
    Can anyone please advise.
    Thanks.
    Anthony.

    Not precisely that way, but just off the top of my head, you would have to have a handle to the proccess (server) in the first window, then have a monitor program that allows you take this handle and end it. I would make this monitor program be the gateway to starting and stopping your server. To run a .bat file you can use runtime.exec().

  • How to Start and Stop Processes?

    How to Start and Stop Processes?
    Im trying to create a program which allows me to Start and Stop (and Restart) GameServers. I will then expand on this so i can start and stop them through a web applet with build in useraccounts.
    Currently the way we do this is to log into the server using a RemoteAssistance. Which is not very safe as the users have the abbility to do anything on the server and potentially corrupt it.
    Below is my code for how i start the servers. But i dont know how i would stop the process.
                    private void startServers()
                   for(GameServer gs : servers)
                        int ID = Integer.parseInt(gs.getID());
                        if(isChecked(ID))
                             try
                                  String cmd[] = gs.getStartString();
                                  Runtime.getRuntime().exec(cmd);
                                  int sleepPeriod = Integer.parseInt(sleepField.getText());
                                  Thread.sleep(sleepPeriod*100);     
                             catch(Exception e)
                             System.out.println(e);
                   }//end of iterator
                   JOptionPane.showMessageDialog(null,"All Selected Servers Have been started.","Servers Started",2);     
         }//end of startserversAnyhelp would be great thanks.

    Using the process class would give you a nicer API, but using destroy isn't a nice way to shutdown a process. Its like killing the process with your task manager. You should make a connection in some way with the game server and tell it to shutdown in stead (gracefull termination).

  • How to start and stop a queue in ECC??

    Dear all,
    I have a problem regarding the Start and Stop of queues in ECC. Whenever I change the data in ECC (for example extension of a material to a new distribution chain, or Creating a quotation which has to trigger a corresponding quotation in CRM), replication is not happening to CRM. On analysis of the outbound queue in ECC, we are finding corresponding ernties for the material / quotation. On dbl cliking an entry, we are able to see the queue in STOP status. When tried to reset status and activate, system throws a message saying GENERIC STOP SET.
    1) How to overcome this problem?
    2) How to START or STOP a queue (for Eg: R3AD*) in ECC? 
    Please respond.
    Every point you share will fetch so many points / lot many smiles to you (No surprises.. I am plagerizing the famous quote on SDN)
    Regards,
    Rajesh

    Dear Chandra,
    Thanks for ur quick response. I have awarded you a sixer. Ofcourse, the content is much richer than that. But if i award 10, thread has to be closed. So that stopped me from awarding that
    Dear all,
    Can someone else share their views?
    Regards,
    Rajesh

  • How to control the line in--- PLAY and STOP ?

    Hi,
       This is the  volume control library downloaded  from NI wed site .It is help for my task.
       My task is to control the line in with LabVIEW, for example STOP, PLAY and adjust volume with LabVIEW button.Though the example I see the volume control can  be enablement.But I don't know how to design the PLAY and STOP button.
       I see it is similar to the volume control.There is function to control the the PLAY and STOP in the system Library-winmm.dll. I don't know  whether all I think is right.I have the following serial question. How to use the function?How to understand the system Library?I can't acquire some information  from it and I don't know the input and output parameter in the funcion.
       Can any one help me out please?
       I'm sorry that my English is poor.
       Thanks.
     lizhi
    Attachments:
    VolCtrl.llb ‏193 KB

    I assume you are referring to audio line-in volume control and lerft-right balance...
    If so, then check out this thread:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000D83A0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
    Look at the info near the bottom from Paul S & Spectre. They talk about "winmm.dll"
    -cheers-
    JLV

Maybe you are looking for