I'm trying to access Window Handle (HWND) in Labview. This is an argument of a DLL. Also I need to get a pointer of an image buffer.

Call library function in Labview:
=================================
Hi all,
I'm trying to access a DLL using Call library function in Labview.
1) I have problems in obtaining the window handle (hDC) of an object in Labview.
2) Also to get the pointer of an image buffer.
thanks
Code Warrior
Take life as it comes! you may never know what's gonna happen Tommorrow

Bob Y. wrote:
I'm trying to do something similar right now and coming to the same problems. I am trying to get the image from a Nikon DXM1200 camera that is mounted on a microscope. It has its own commands and capture card and is not playing well with the imaq stuff. I am using their SDK in an effort to get the images into LabVIEW.
As I said, I am having the same types of problems. I managed to wrap everying into a dll and into a .net assembley, but I have been unable to figure out a way to get it into LabVIEW. I can call either of these things from LabVIEW to make an image capture. But, I have been unable to transfer that image into LabVIEW. I also have been unable to get enough windowing information to get the information into LabVIEW.
I am not sure what Code Warrior is doing, but here is why I have been tracking this thread with great interest.
Thanks for the thread,
Bob
You might want to look at http://www.hytekautomation.com/products.html. They have a Nikon interface for LabVIEW and since you already have the SDK, the issue mentioned on their site won't be a problem for you. It is for sure much more cost effective to pay them some money for that interface than trying to develop an interface yourself. The issues are quite involved and even if you knew quite some stuff about LabVIEW memory management and its internal C programming interface (and you can get quite some information from looking at the NI-IMAQ VIs too, eventhough they are anything but a nice example for good programming style), it is a work counting into weeks to get it done right.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Hello, I am away and I am trying to access my iMac remotely.  Is this possible?

    Hello, I am away and I am trying to access my iMac remotely.  Is this possible?

    You might check these out for help:
    AirPort, Back to My Mac- Accessing shared USB volumes using the FAT filesystem on some AirPort Extreme or Time Capsule
    Setting up and using Back to My Mac with AirPort Express, Extreme or Time Capsule
    OS X- Using and troubleshooting Back to My Mac with your iCloud account
    Supported router devices for Back to My Mac
    AirPort- Troubleshooting Back to My Mac issues related to an AirPort base station or Time Capsule
    Setting up and using Back to My Mac with AirPort base station or Time Capsule
    Mac OS X 10.7 Help- Share your computer’s screen using Back to My Mac
    Mac OS X 10.7 Help- Use Back to My Mac

  • I just updated my Mac to the new op system and when I tried to open my Ai it gave me this message, "To open "Adove Illustrator CS5.1 you need to install the legacy java SE 6 runtime."

    I just updated my Mac to the new op system and when I tried to open my Ai it gave me this message, "To open "Adove Illustrator CS5.1 you need to install the legacy java SE 6 runtime." I updated my Java to 8 and it still won't open. I tried to update my Ai to 11...it won't update.

    Steven,
    The right way/order is to update the OP, then reinstall the applications.
    For the Java SE,
    http://support.apple.com/kb/DL1572
    Some have found that the page may turn up blank to start with, so it may be necessary to reload the page.
    Others have found that it may depend on browser. Specifically, a switch from Safari has solved it in one case.

  • Referred to start menu whe trying to access windows updates

    When I try to access windows update from Firefox browser I am sent to start menu and windows update for windows 7. I am trying to avoid this for security sake. Windows is having the most problems and also google on security issues which is why I am using Firefox forinternet security. Not even the Norton my supposed security I am paying for can provide security for yahoo mail or windows. Yet I am forced to access under windows update. Am I secure if I leave the firefox browser up when I access windows update from my start menu? Or is there a way around this?

    Hi @khamm56 ,
    Thank you for visiting the HP Support Forums and Welcome. I have looked into your issue about your HP Notebook and issues with screen flickering and freezing.  If the Notebook works in safe mode with no issues it is either driver or software related.
    Can get to safe mode with command prompt?
     F11 upon startup choose safe mode with Networking.
    Then you can do a system restore. System restore will help if something automatically updated and did not go well on the Notebook. I recommend doing this for at least 2 weeks prior to this happening.
    When performing a System restore please note remove any and all USB devices. Disconnect all non-essential devices as they can cause issues.
    I hope this helps.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • Trying to access Windows 2003 Server share with Mac OS 9.04

    Hi
    I cannot connect to a Windows 2003 Server share on my 2003 domain. I can access the share with my MacBook (10.4.9) & my G4. I have File Services for Mac installed & can ping the server from all OS 9 Mac.
    Can anyone give me some tips?
    MacBook     Administrator

    How are you trying to connect to the server? Via AppleTalk or IP? (What utility are you using to ping the server from the Mac OS 9 machine?) Since you're not providing any information about error messages you're receiving or the symptoms of your problem I can only provide the following information.
    If you're selecting the server from a list in the Chooser and clicking the OK button then the connection should switch to IP automatically. Make sure your Mac has TCP/IP enabled and is receiving an IP address or that you have an appropriate IP address hard-coded. You can try forcing an IP connection by entering the IP address or DNS name of the server in the Chooser rather than selecting it from the list in the Chooser.
    Or you can try forcing an AppleTalk connection by selecting the server in the Chooser and holding down the Option key as you click the Connect button. If you're asked to enter your name and password then you're communicating properly with the server. This is, however, a very slow connection compared to IP.
    Finally, be sure you update to the latest version of Mac OS 9, which is 9.2.2 <http://docs.info.apple.com/article.html?artnum=75288>.
    Hope this helps! bill
    1 GHz Powerbook G4   Mac OS X (10.4.9)  

  • Time Machine Backup Trying to Access Windows Exchange

    I have an iMac that used to have access to a Windows Exchange email account. That email account has now been deleted as it caused too many conflicts. However, when I now access Time Machine my iMac tries to reconnect to the old Exchange server with an old password and that locks me on the Exchange email account as I assume it keeps attempting multiple logins. Unfortunately I dont have control over the Exchange account so I have to have that reset everytime I use iMac Time Machine. Is there ay way around this? Many thanks

    Try resetting Time Machine. A4 in first article.
    Time Machine Troubleshooting
    Time Machine Troubleshooting Problems

  • How am i able to get all my photos from my Iphone to my windows PC, I have done the import and there is still more photos i need to get off my phone, its a new PC?

    I have just bought a new computer..I have an old Iphone 3GS, i would like to now put everything that is on my Iphone, onto my new computer. The new compter does not have anything on it at the moment.... but if i do a back up i dont wanna loose anything that is on my iphone, as there are many many photos, on it, about 2500 photos.
    Is there anyway i am able to do this... Please let me know as soon as possible, I have already dont the windows import, but that only  imported the photos from my camera roll, this is not good enough as i would like ALL my photos to appear.
    Thank you 

    See Recover your iTunes library from your iPod or iOS device.
    tt2

  • Access Denied when trying to access shared folders on the server with administrative privileges

    I have problem accessing shared folder on the server machine from Windows 7 machine even if I try to access it with administrative privileges (server Administrator account). I will try now to explain better my situation.
    In my company, we have small network infrastructure with one main server machine (HP ProLiant server) with Windows Server 2012 R2 installed and couple of desktop machines. The network is administrated by me.
    On Windows Server we have installed and setup DHCP, DNS, Remote Access and Routing, File and Storage and Active Directory services. Desktop machines are having Windows 8.1 Pro, Windows 8.1 or Windows 7 Home Premium installed on them. In Active
    Directory I have created domain, User groups and Users for employees in my company and so far, I didn't added desktop machines to the domain.
    Also, I've created one folder on the server which should contain different projects data for network users and I have set access permissions and security for this folder and shared it on the network (I've added couple of users to one user group and I
    gave Full control to this group over this folder). When I try to access this folder from network, I've been asked for login credentials (normally), where I just type in one of users username and password who has been given access permissions to (who is member
    of group with full control over the folder). From Windows 8.1 Pro and Windows 8.1 machines I can access and work on this folder without any problems.
    The problem comes with Windows 7 machines. On Windows 7 machines (I have also tried this with Windows 7 Ultimate in VMWare) I can access server, I can see its shares, but as soon I try to access folder I've created for projects, I get Access Denied message
    with request for User login credentials. Whichever user account I use (even servers main Administrator account) I keep getting this message over and over and I'm unable to access it at all.
    I have also tried to access the server through VPN (from local or outside) but I'm getting the same error again. Also I've tried to add these Windows 7 machines to the domain and login with domain user but the result is the same. Turned off both firewalls
    (on server and desktop machines, which I know is unnecessary, but lets try it), still same case. I've tried couple more things with registry editor on desktop machines which I found on different forums and websites but still no luck. And now I don't know
    what else I can do.
    Does anyone knows what's the problem here, have I set something wrong, have not set something I should?

    Hi MeipoXu,
    thanks for your response. I will first answer on your question.
    Yes, the main issue is that we can see the folder when we access the server but we cannot access its contents from Windows 7 machines. I have tried on two machines, one with Windows 7 Home Premium version and the other one with Windows 7 Ultimate version
    and the situation is the same.
    As you recommended, I've checked Network Discovery and File and Printer Sharing and the situation is next: File and Printer Sharing is turned on all layers (Private, Public and Domain) while Network Discovery is off for all layers too. I don't know if this
    is normal thing but Network Discovery cannot be turned on in Windows Server (I'm able to select Turn on Network Discovery and apply the changes, but when I get back to this settings page, I again see that it's turned off, so I assume this can't be changed
    at all).
    I also tried with icacls in command prompt and everything seems to be ok there regarding permissions. Share permissions are set to Full control to Everyone and Security permissions are set to Full control only for Administrators and the user group I've created
    for employees in my company. The confirmation for this is that on Windows 8 machines you can access this folder without any problem and without getting any message connected with access permissions with any user account within this user group. This share is
    created through File and Storage Services service in Server Manager panel.
    And then something came up on my mind. I went in Server Manager to check shared folder settings in File and Storage Services and under Settings page I saw that "Encrypt data access" has been enabled (I enabled this option because I thought
    I will get more security with this option). I asked my self what would happen if I disable it, tried it and now everything works ok on Windows 7 machines too. Now I assume that Windows 7 doesn't have this feature implemented or there are some
    settings which needs to be set on Windows 7 machines to make this encryption thing work with Windows Server. So basically, I will let this feature off for now until I find out more about it and how to implement it to work with all operating systems.
    I want to thank you once more for your kind help!

  • Netfile error when trying to access Windows2000 file systems

    Hi,
    I'm trying to access Windows 2000 files with the NetFile applet, but I get the following error:
    NetFile error: win interface software not found...please install and configure for accessing windows hosts.
    I'm running the portal server 6.2, and installed the 3rd party softwares as described in the installation guide.
    In the log files, I see the following errors.
    Any help is greatly appreciated !
    "2004-01-19 14:40:55" "Win interface software not found. Please install and configure for accessing Windows hosts., User - stephane.bouffouix."
    srapNetFile.access "Not Available " INFO uid=test,ou=people,o=company,dc=aca-it,dc=be /10.33.3.12 uid=test,ou=people,o=company,dc=aca-it,dc=be 10.33.3.12
    and:
    01/19/2004 12:35:15:951 PM WET: Thread[service-j2ee,5,main]
    ERROR: Error in determining if host is Win type
    com.sun.portal.netfile.servlet.java1.NetFileException: Win interface software not found.
    at com.sun.portal.netfile.servlet.java1.XFileFactory.newXFileInstance(XFileFactory.java
    :50)
    at com.sun.portal.netfile.servlet.java1.AddSystemProcessor.isWinHost(AddSystemProcessor
    .java:440)
    at com.sun.portal.netfile.servlet.java1.AddSystemProcessor.determineHostType(AddSystemP
    rocessor.java:415)
    at com.sun.portal.netfile.servlet.java1.AddSystemProcessor.determineHostType(AddSystemP
    rocessor.java:405)
    at com.sun.portal.netfile.servlet.java1.AddSystemProcessor.addSystem(AddSystemProcessor
    .java:200)
    at com.sun.portal.netfile.servlet.java1.NetFileServlet.doAdd(NetFileServlet.java:1090)
    at com.sun.portal.netfile.servlet.java1.NetFileServlet.doGetPost(NetFileServlet.java:56
    1)
    at com.sun.portal.netfile.servlet.java1.NetFileServlet.doPost(NetFileServlet.java:215)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperVa
    lve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:1
    18)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)

    Hi again,
    To complete the description of the problem, here follows the excpetion I found in the log file /var/opt/SUNWam/debug/srapNetFile.
    Is there any configuration of Samba needed ? (I have no smb.conf file, but nothing says in the manuals that I have to...).
    Thanks for you help! (Hoping that finally someone will answer me, which is what I expected from a user group :-)
    ERROR: Win interface software not found.
    01/27/2004 01:48:49:083 PM WET: Thread[service-j2ee,5,main]
    ERROR: Unknown host
    java.net.UnknownHostException: isthas-sv02
    at java.net.InetAddress.getAllByName0(InetAddress.java:1004)
    at java.net.InetAddress.getAllByName0(InetAddress.java:969)
    at java.net.InetAddress.getAllByName(InetAddress.java:963)
    at java.net.InetAddress.getByName(InetAddress.java:883)
    at com.sun.portal.netfile.servlet.java2.AddSystemHandler.detemineHostInetAddress(AddSystemHa
    ndler.java:294)
    at com.sun.portal.netfile.servlet.java2.AddSystemHandler.addSystem(AddSystemHandler.java:90)
    at com.sun.portal.netfile.servlet.java2.SerializedRequestProcessor.handleRequest(SerializedR
    equestProcessor.java:270)
    at com.sun.portal.netfile.servlet.java2.SerializedRequestProcessor.processRequest(Serialized
    RequestProcessor.java:205)
    at com.sun.portal.netfile.servlet.java2.NetFileServlet.handleRequest(NetFileServlet.java:238
    at com.sun.portal.netfile.servlet.java2.NetFileServlet.doPost(NetFileServlet.java:207)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.j
    ava:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)

  • [SOLVED] DBus error when accessing "Windows Network"

    I'm getting an error when trying to access "Windows Network" from Nautilus after last Gnome (2.22 -> 2.24) update:
    Unable to mount location
    DBus error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
    Please tell me if you need me to post any more info/logs.
    Thanks in advance
    Last edited by DingoMD (2008-10-22 08:07:36)

    Are those with a problem using share level security on the samba server?
    Have you tried accessing the share using smbclient? (smbclient //server/share)
    I have been receiving the original dbus error for some time now.
    I am using share level security on the server.
    Using smbclient results in a segfault. Using nautilus also results in an error from libsmbclient which can be seen in one of the log files.
    [mythtv@tvee ~]$ smbclient //sirschmoopy/shared
    Enter mythtv's password:
    Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.5.1]
    Server not using user level security and no password supplied.
    Segmentation fault
    There is a samba bug which looks similar but it only affects people with ipv6 disabled. I have disabled and enabled ipv6 several times and the errors persist.
    I think it may be related to this bug: https://bugzilla.samba.org/show_bug.cgi?id=7250
    I haven't tried the patch provided yet.

  • UnsatisfiedLinkError - Trying to access a DLL from Java

    I am trying to use the Java Native Interface (JNI) to run some C++ code from Java. I tried a simple test program to teach myself that, and it worked perfectly. However, now that I'm tackling a bigger project (A data acquisition program), I get an UnsatisfiedLinkError in the line that calls the function from the DLL.
    Here is the stacktrace: Exception in thread "AWT-EventQueue-0" java.lang.Error: java.lang.reflect.Invoca
    tionTargetException
            at org.jdesktop.application.ApplicationAction.actionFailed(ApplicationAc
    tion.java:859)
            at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(App
    licationAction.java:665)
            at org.jdesktop.application.ApplicationAction.actionPerformed(Applicatio
    nAction.java:698)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
    95)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
    a:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:236)
            at java.awt.Component.processMouseEvent(Component.java:6263)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
            at java.awt.Component.processEvent(Component.java:6028)
            at java.awt.Container.processEvent(Container.java:2041)
            at java.awt.Component.dispatchEventImpl(Component.java:4630)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2475)
            at java.awt.Component.dispatchEvent(Component.java:4460)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
    ad.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
    java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(App
    licationAction.java:662)
            ... 26 more
    Caused by: java.lang.UnsatisfiedLinkError: fileiotest.dllinterface.startget()V
            at fileiotest.dllinterface.startget(Native Method)
            at fileiotest.dllinterface.start_daq(dllinterface.java:26)
            at fileiotest.FileIOTestView.startrun(FileIOTestView.java:680)
            ... 31 moreI have made sure that the DLL is in the classpath, using both the -classpath tag and by setting the PATH variable. Is something wrong with my DLL itself, perhaps?

    Yes, I have.
    I didn't include the code yet because I thought if someone had similar trouble, there might be something obvious I am overlooking and they wouldn't even need to see the code. I can provide it, however.
    This is the C++ DLL
    // consoledaq.cpp : Defines the entry point for the console application.
    #include <windows.h>                    /* Compiler's include files's */
    #include <string.h>                  
    #include <stdio.h>
    #include "cbw.h"
    #include "stdafx.h"
    #include "dllinterface.h"
    #include "jni.h" //can copy or give full path
    #include <math.h>
    BOOL APIENTRY DllMain( HANDLE hModule,
                           DWORD  ul_reason_for_call,
                           LPVOID lpReserved
        return TRUE;
    #define BOARD_NUM      0                /* Number of A/D board as defined with InstaCal */
    #define BUF_SIZE       10048            /* Size of buffer */
    #define NUM_SECS       10                /* Number of secs to collect data */
    #define ADRANGE        BIP5VOLTS        /* A/D voltage range */
    #define TIMER_NUM      1                /* Windows timer used by this program */
    static HGLOBAL  MemHandle32;       
    /* Variables for AinScan */
    static unsigned short *ADValues;    /* Win32 pointer to A/D buffer */
    static HGLOBAL   ADMemHandle;
    static short     ADCurStatus;       /* Current status for D/A scan */
    static long      ADCurCount;        /* Current count for A/D scan  */
    static long      ADCurIndex;        /* Current index for A/D scan  */
    int              ADOptions;
    long       Count, Rate;
    float      Voltage, Voltage2;
    unsigned short CurValue, CurValue2;
    JNIEXPORT void JNICALL
    Java_daq_startget(JNIEnv *env, jobject obj)
         cbErrHandling (PRINTALL, STOPALL);  /* Set library's error handling */
         ADCurStatus = RUNNING;
         ADCurIndex = 0l;
         ADCurCount = 0l;
         /* Allocate A/D Windows buffer */
         ADMemHandle = cbWinBufAlloc ((long)BUF_SIZE);
         /* Allocate a local WIN32 buffer to hold A/D Data */
         MemHandle32 = GlobalAlloc(GMEM_FIXED | GMEM_DDESHARE, BUF_SIZE *sizeof(short));
         /* Get a 32-bit pointer to the A/D WIN32 buffer */
         ADValues = (unsigned short *)GlobalLock(MemHandle32);
         /* Start up background A/D scan */
         Count = BUF_SIZE;
         Rate = BUF_SIZE / (NUM_SECS * 2);
         ADOptions = BACKGROUND | CONTINUOUS;
         cbAInScan (BOARD_NUM, 0, 1, Count, &Rate, ADRANGE, ADMemHandle, ADOptions);
    JNIEXPORT void JNICALL
    Java_daq_stopget(JNIEnv *env, jobject obj)
         cbStopBackground(BOARD_NUM, AIFUNCTION);  /* Stop A/D subsystem background scan */
         if (ADMemHandle)                 
              cbWinBufFree (ADMemHandle);   /* Free allocated memory */
         if (MemHandle32)
              GlobalFree (MemHandle32);
    JNIEXPORT jfloatArray JNICALL
    Java_daq_getpoint(JNIEnv *env, jobject obj)
         jfloatArray theArray;
         if (ADCurIndex >= 0)
              /* Copy Data from memory to 32 bit memory buffer */
              cbWinBufToArray(ADMemHandle, &ADValues[ADCurIndex], ADCurIndex ,2);
              CurValue = ADValues[ADCurIndex];
              CurValue2 = ADValues[(ADCurIndex + 1)];
         else
              CurValue = 0;
              CurValue2 = 0;
         jfloat tmp[2];
         theArray =  env->NewFloatArray(2);
         cbToEngUnits(BOARD_NUM,ADRANGE,CurValue,&Voltage);                      
         cbToEngUnits(BOARD_NUM,ADRANGE,CurValue2,&Voltage2);
         tmp[0] = Voltage;
         tmp[1] = Voltage2;
         env->SetFloatArrayRegion(theArray, 0, 2, tmp);
         return theArray;
    }And this is the Java class:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package fileiotest;
    * @author Owner
    public class dllinterface {
        public native void startget();
        public native float[] getpoint();
        public native void stopget();
        static {
         System.loadLibrary("daqdll");//This is firstJNI.DLL
         /*if generated by borland
         System.loadLibrary("firstjni");//This is firstjni.dll
        public static void start_daq()
            dllinterface DI=new dllinterface();
            DI.startget();
        public static void stop_daq()
            dllinterface DI=new dllinterface();
            DI.stopget();
        public static float[] get_data_point()
          dllinterface DI=new dllinterface();
          float newtempfloat[];
          newtempfloat = DI.getpoint();
          return newtempfloat;
    }

  • JNI: get Window-Handle of JFrame

    Hello,
    I'm calling a DLL method (written in VC), that needs a Window-handle (HWND) as parameter. How can I get the Handle of my JFrame to pass it into the DLL function?
    All samples are designed for getting the HWND of a Canvas. But obviously it does not work with any kind of Frame.
    Can somebody tell me ?
    Thank you, Lars
    P.S. I'm working with SUN 1.4

    see this one, i was looking for same thing:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=238779

  • I am trying to install windows on my mac via bootcamp, and it says I need to download Windows Support Software. I tried, but it says "Download can not continue. The Windows Support Software is not available.

    I am running OSX 10.6.8 Snow lepard I am trying to install windows on my intel imac 20in late 2006  via bootcamp, and it says I need to download Windows Support Software. I tried, but it says "Download can not continue. The Windows Support Software is not available. I bought the Imac secend hand and did not get the install dvd's with it What can I do?

    You don't need to download the Windows support software, because in Snow Leopard, they are only available as a download for the Late 2010 MacBook Air.
    Instead, you have to buy Mac OS X Snow Leopard. The Snow Leopard disc contains the Windows drivers for your Mac, so you have to install them after finishing the Windows installation

  • "error while trying to access the service"

    I am trying to convert a pdf file to an excel file.  I get a completely unhelpful message that says  "error while trying to access the service" .
    What does this mean and how do i fix it?

    Hi sd433m,
    Thank you for posting on the Adobe forums. If you are already subscribed to the service, kindly try the steps mentioned below.
    1) Open Adobe Reader  Edit>preferences
    2) Go to Adobe Online services>change the email address to the one you have subscribed the service with
    3) Go to identity> change the email address there as well
    4) Click OK
    5) Restart the Adobe Reader and try to access the service again.
    If you have not subscribed to the service please do that as, we do not offer trial for Create PDF.
    Thanks,
    Vikrantt Singh

  • Trying to access 10gr2 database from sqlplus utility but it connects to 11g

    Hi All,
    I am facing below issue while access 10gr2 database from sqlplus.
    I am having two oracle homes on one server one belongs to 11gr2 and another belongs to 10gr2.
    I want to access a 10gr2 database through sqlplus utility.but instaed of connecting to 10gr2 it is connecting to 11gr2 after I enter a user name and passowrd.
    I have set all the env variables such as oracle_home ,oracle_sid and path with respect to Oracle 10gr2.
    Can you please let me kno what I need to do to connect to 10gr2 database and not 11gr2 database through sql plus.
    Let me know if I need to give any more details on this.
    Best Regards,
    Dipti S

    Hi Rocky,
    I got the resolution.
    I made a mistake by creating an oracle instance/service(e.g. fsdmo) when Oracle_home was pointing to 11gR2 Directory.so that service was refering to 11gr2 oracle home.
    hence when I was setting oracle_sid(fsdmo) and trying to access database instance from 11g sqlplus utility ,it was directing to 11g and not 10g since oracle service was pointing to 11g.
    So now after chnaging the oracle home directory to 11g,I am creating a service and its working fine.
    thank you so much for responding.
    hope I am clear with my reply.
    Best Regards,
    Dipti S

Maybe you are looking for