UnsatisfiedLinkError for JNI DLL compiled with vs2008 express

I am trying to create a JNI DLL using Visual Studio 2008 Express.
I have read several places where -MD causes JNI problems but from what I've read, I need this option to create the DLL properly.
The DLL does get built cleanly and I have created a simple C application (obviously not calling the JNI functions themselves but the other functions that are in the DLL). This application runs with no problems.
As soon as I try to use the DLL with JNI, I get an UnsatisfiedLinkError: Can't find dependent libraries.
I have used Dependency Walker on the C application I created and it finds no errors; however, if I run it on the DLL itself, it does report an error trying to find msvcr90.dll which is in the winsxs directory under c:\windows so I assume this is the problem dependency.
I am running this on the same computer that has Visual Studio 2008 Express SP1 installed. This is a Windows XP Service Pack 3 computer running JDK 1.6.0_14.
Any help would be greatly appreciated.
Thanks

Right or wrong, I include some library files into my link statement (it's the only way I could find to clear up your question). I link in some standard window libraries as well as some of my own DLL whose functions are used by this DLL. I use a makefile to build my code.
Here is a compile statement and the link statement for my DLL:
cl.exe -I c:\progra~1\micros~1.0\vc\include -I c:\progra~1\mi2578~1\windows\v7.0\include -I c:/progra~1/java/jdk1.6.0_14/include -I c:/progra~1/java/jdk1.6.0_14/include/Win32 -I S:/wlw/Develop/Src/Include -I S:/wlw/Products/Src/Include -I S:/wlw/Products/Src/Include -I S:/wlw/Products/Src/LibSrc/RTA/Client/Include/Example -I S:/wlw/Products/Src/LibSrc/RTA/Client/Include/System -I S:/wlw/Products/Src/LibSrc/RTA/Client/Include/User -I S:/wlw/Products/Src/LibSrc/RTA/Server/Include/System -I S:/wlw/Products/Src/LibSrc/RTA/Server/Include/User -DRTA_DLL -D_BIND_TO_CURRENT_VCLIBS_VERSION -Zp4 -DWIN32 -D__WIN32__ -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -D_USE_32BIT_TIME_T -D_CRT_SECURE_NO_WARNINGS -nologo -W3 -Od -EHsc -MD -Z7 -c buildDate.c
link.exe -incremental:no -nologo -debug kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib -dll -out:S:/wlw/Products/Obj/Win32/Lib/rta.dll -implib:S:/wlw/Products/Obj/Win32/Lib/rta.lib eipc_client.obj eipc_usersys.obj eips_pccc.obj eips_cnxn.obj eips_cpf.obj eips_encap.obj eips_iomsg.obj eips_rtasys.obj eips_timer.obj rta_utils.obj eips_userdf1.obj eips_userobj.obj eips_usersock.obj eips_usersys.obj jniRta.obj jniRtaPlc.obj jniRtaPlcAddress.obj qcRta.obj qcRtaPlcAddressLink.obj qcRtaPlcLink.obj qcRtaProcess.obj qcRtaRead.obj qcRtaSlcRead.obj qcRtaSlcWrite.obj qcRtaState.obj qcRtaTimer.obj qcRtaWrite.obj Q:/Develop/Obj/Win32/Lib/tcpipNet.lib Q:/Develop/Obj/Win32/Lib/linkList.lib Q:/Develop/Obj/Win32/Lib/stdUtils.lib buildDate.obj
mt -manifest S:/wlw/Products/Obj/Win32/Lib/rta.dll.manifest -outputresource:S:/wlw/Products/Obj/Win32/Lib/rta.dll;2

Similar Messages

  • X series with MHDDK for RTX 32bits compile with Visual C++ 6.0

    Hello,
    Can we compile the X series cards MHDDK for RTX 32 bits with the Visual C++ 6.0?
    I try to do it, but I can't. Is possible or not?
    Thanks,

    Hey,
    Sorry for the late reply.
    The blue screen is triggered randomly, without defining a place in the application.
    The link you provided we do not seem to correspond to our problem, we do not launch multiple threads repeatedly.
    Could you specify a time for the validation of MHDDK 64 bits for X series cards because without solving this problem, we can not use these cards to our real-time module?
    thank you

  • Setup wireless network for mac and pc with Airport Express?

    Mac Mini/OSX/10.8.2/Airport Express
    Question,
    I have my AIrPort Express setup for my Mac Mini and I have dell computer that I want to share the wireless network. Is it possible to setup a wireless network with my mini and the pc using only the AirPort Express? Is the Airport Express a wireless router?
    Thanks,

    If your Mac Mini is connecting to the Express using wireless, then this confirms that the device is working correctly. 
    The Express is a wireless router that can support up to 10 wireless connections, so your Dell computer should be able to connect assuming that its wireless card is working correctly, and the Dell indentifies the network and enters the correct wireless network password.
    If you are having difficulty with the Dell PC connecting, this Windows troubleshooting document might help:
    http://windows.microsoft.com/en-US/windows/network-connection-problem-help#netwo rk-problems=windows-8&v1h=win8tab1&v2h=win7tab1&v3h=winvistatab1&v4h=winxptab1

  • Cannot use DSL for wireless & phone simultaneously with Airport Express

    Hello, I've just moved and switched to DSL from cable modem.
    SBC DSL
    One phone jack with the supplied filter on it allowing connection to the phone and supplied wired router
    They provided a CD that configured the connection for me. In their ethernet connection it is not PPOE. Just DHCP. When I connect the laptop directly to the router via ethernet, I am able to surf and talk on the phone. When i connect the router to the Airport express and connect wirelessly, I can use either the phone or the internet. When I make a phone call the wireless drops.
    Does anyone have any idea as to why this happens?
    Thanks,
    Neobe

    It's a 2.4 GHz phone
    This is likely your problem.
    2.4GHz phones are notorious for interfering with WiFi networks, as they share the same frequency range.
    This is a very common problem.
    I would suggest switching to a 900Mhz, or a 5.8GHz cordless phone.

  • Looking for JDK binary compiled with debug info

    For some reason JTree.startEditingAtPath() is not doing what I expect, and I'd like to step through the JDK code to see what's going on. Back with Java 5 there were debug builds of the JDK that would let me do this. I've been searching, but cannot find the equivalent for Java 6. Are there still debug binaries out there I can grab (and not have to compile the JDK myself)?

    JDK is open source. Just get the source and step through it in your debugger.

  • Need a faster GPU for powermac G5 QuadCore with PCI Express

    Greez,
    i want to expanding my G5 QuadCore (PCI Express) with a Geforce 7800GT or GTX
    have someone an experiance with this videocards ?
    and is the new 7900 GT compatibel ?
    I need a fast GPU for animation, but the GeForce Quatro 4500 is much expensive !
    Thanks from Germany TiMovie

    Reginald,
    Welcome and you choose well, except in your video card. The 6600 is hopeless in Aperture if your running a medium-large library.
    Apple seems to run a monopoly on the video card side. Each card needs Apple specific firmware on it to work. So no PC cards don't work without modifications. Speaking of which some people apparently figured this out. Check this and the Aperture forums for more detail of a possible 3rd party option.

  • Debugging a JNI DLL created with Visual C++

    Hello.
    Due to the necessary libraries, I need to create a DLL in Visual C++ to be called from my Java class:
    System.loadLibrary("my_dll_name");
    But I've got a problem: I'm newbie in Visual C++ and I would like to debug the DLL, so when I press F5 (Go for Debug mode), I get the message "Please specify the executable file". Obviously, I've got a DLL, not an .exe or .com file.
    I would be extremely obliged if anybody could share any experience.
    Thank you very much.

    What you nee to do is this:
    Run your java app (in an IDE if poss.) and have it pause at some point (if its a command line app., wait for a key, if its a Swing app, you're ok, just wait for the app. to appear. Now start VC6 and go
    menus:
    Build/StartDebug/Attach to process. Ther should be one process calleed java. Attach to that. If your DLL has debug info in it, you should be able to navigae to the source and set breakpoints etc.
    Alternativly, you could just put OutputDebugString(...) (this is a Win32 function) statements in your DLL and use DBMON.EXE (from the win32 SDK) to look at the output.

  • How to compile a dll for JNI in the CMD correctly

    Now I find alot of old threads on using the mno command in cygwin to created dlls to use as an interface between c and Java, however I know this command is no longer available in cygwin and so I took the advid of downloading minGW and using this in the CMD instead.
    However every example I try to compile and run this way throws the unsatified link error when the native function is to be called by the Java program. I believe it must be a compiling error creating a mismatch between the native function and the function to be called.
    Here is the method I'm using to comile dlls for JNI, it is from the FAQ section of the minGw website:
    gcc -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at
    -Ic:/j2sdk1.4.1_02/include -Ic:/j2sdk1.4.1_02/include/win32
    -shared someJavaImp.c -o JavaImp.dll
    Is this how dll should be compiled? If not any suggestions?

    sudsey wrote:
    I know how to program well in C and Java, I just need to know the proper way to compile a dll for JNI.1. Get the MS IDE
    2. Create a dll project - it must NOT be a managed dll
    3. All done.

  • Relinking errors after installing 12.1.1 on XP with VC++ (VS2008 Express)

    Hi,
    I am facing a lot of relinking errors after installing 12.1.1 on XP with VC++ (VS2008 Express Edition).
    I had followed Oracle E-Business Suite R12 Installation Steps on Windows XP (Oracle E-Business Suite R12 Installation Steps on Windows XP and for VS2008 have followed metalink note MS Visual Studio 2008 and Visual C++ 2008 Express for Oracle E-Business Suite Release 12 on Windows [ID 1070674.1]
    After applying the patch from section 1 9491976, there are a lot of relinking issues as follows:
    =========================
    Relinking module 'ADCONV.exe' in product fnd ...
    gnumake -f
    D:/oracle/LADPCDEV/apps/apps_st/appl/admin/LADPCDEV/out/link_fnd_2360.mk
    D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin/ADCONV.exe
    Starting link of fnd executable 'ADCONV.exe' on Thu Apr 22 15:28:28 IST 2010
    D:/oracle/LADPCDEV/apps/apps_st/appl/admin/LADPCDEV/out/link_fnd_2360.mk:758:
    *** target pattern contains no `%'. Stop.
    Done with link of fnd executable 'ADCONV.exe' on Thu Apr 22 15:28:28 IST 2010
    Relink of module "ADCONV.exe" failed.
    See error messages above (also recorded in log file) for possible
    reasons for the failure. Also, please check that the Unix userid
    running adrelink has read, write, and execute permissions
    on the directory D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin,
    and that there is sufficient space remaining on the disk partition
    containing your Oracle Applications installation.
    Relinking module 'AFTBLGEN.exe' in product fnd ...
    gnumake -f
    D:/oracle/LADPCDEV/apps/apps_st/appl/admin/LADPCDEV/out/link_fnd_2360.mk
    D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin/AFTBLGEN.exe
    Starting link of fnd executable 'AFTBLGEN.exe' on Thu Apr 22 15:28:28 IST
    2010
    D:/oracle/LADPCDEV/apps/apps_st/appl/admin/LADPCDEV/out/link_fnd_2360.mk:758:
    *** target pattern contains no `%'. Stop.
    Done with link of fnd executable 'AFTBLGEN.exe' on Thu Apr 22 15:28:28 IST
    2010
    Relink of module "AFTBLGEN.exe" failed.
    See error messages above (also recorded in log file) for possible
    reasons for the failure. Also, please check that the Unix userid
    running adrelink has read, write, and execute permissions
    on the directory D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin,
    and that there is sufficient space remaining on the disk partition
    containing your Oracle Applications installation.
    Relinking module 'APPR60UE.dll' in product fnd ...
    Removing any existing temp directory
    rm -rf temp
    creating the temp directory
    mkdir temp
    changing permissions for the temp directory
    chmod 777 temp
    Getting the object file names for this APPR60UE.dll
    gnumake -f
    D:/oracle/LADPCDEV/apps/apps_st/appl/admin/LADPCDEV/out/link_fnd_2360.mk
    appr60ue.LIST
    D:/oracle/LADPCDEV/apps/apps_st/appl/admin/LADPCDEV/out/link_fnd_2360.mk:758:
    *** target pattern contains no `%'. Stop.
    Unable to get the objects for module "APPR60UE.dll".
    See error messages above (also recorded in log file)
    for possible reasons for the failure.
    adrelink is exiting with status 1
    =========================================
    Has anyone faced something similar in the past?
    Regards,
    Neeraj

    Hi Helios,
    That got resolved after I added the location of the dll in the PATH.
    Now i m getting LINK : fatal error LNK1181: cannot open input file 'LIB/KERNEL32.LIB'
    The log looks like:
    Relinking module 'fndcpesr.exe' in product fnd ...
    gnumake -f
    D:/oracle/LADPCDEV/apps/apps_st/appl/admin/LADPCDEV/out/link_fnd_5384.mk
    D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin/fndcpesr.exe
    Starting link of fnd executable 'fndcpesr.exe' on Thu Apr 22 17:35:31 IST
    2010
    D:/oracle/LADPCDEV/apps/apps_st/appl/admin/LADPCDEV/out/link_fnd_5384.mk:2908:
    warning: overriding commands for target
    `D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin/CMDCART.dll'
    D:/oracle/LADPCDEV/apps/apps_st/appl/admin/LADPCDEV/out/link_fnd_5384.mk:759:
    warning: ignoring old commands for target
    `D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin/CMDCART.dll'
    D:/oracle/LADPCDEV/apps/apps_st/appl/admin/LADPCDEV/out/link_fnd_5384.mk:2955:
    warning: overriding commands for target
    `D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin/FNDRTR45.exe'
    D:/oracle/LADPCDEV/apps/apps_st/appl/admin/LADPCDEV/out/link_fnd_5384.mk:1340:
    warning: ignoring old commands for target
    `D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin/FNDRTR45.exe'
    link.exe
    -MAP:D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin/fndcpesr.map
    -NODEFAULTLIB -NOLOGO -SUBSYSTEM:CONSOLE -ENTRY:mainCRTStartup
    -OUT:D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin/fndcpesr.exe
    D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/lib/fdpesr.obj \
         D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/lib/FNDCORE.lib
    D:/oracle/LADPCDEV/apps/tech_st/10.1.2/precomp/lib/msvc/orasql10.lib
    D:/oracle/LADPCDEV/apps/tech_st/10.1.2/precomp/lib/msvc/orasqx10.lib
    D:/oracle/LADPCDEV/apps/tech_st/10.1.2/RDBMS/lib/oraclient10.lib
    D:/oracle/LADPCDEV/apps/tech_st/10.1.2/RDBMS/lib/oracommon10.lib
    D:/oracle/LADPCDEV/apps/tech_st/10.1.2/NETWORK/lib/oranro10.lib
    D:/oracle/LADPCDEV/apps/tech_st/10.1.2/NETWORK/lib/oran10.lib
    D:/oracle/LADPCDEV/apps/tech_st/10.1.2/NETWORK/lib/oranl10.lib
    D:/oracle/LADPCDEV/apps/tech_st/10.1.2/lib/oranls10.lib
    D:/oracle/LADPCDEV/apps/tech_st/10.1.2/lib/oracore10.lib /LIB/MSVCRT.LIB
    /LIB/OLDNAMES.LIB "LIB"/KERNEL32.LIB "LIB"/USER32.LIB "LIB"/ADVAPI32.LIB
    "LIB"/WINSPOOL.LIB "LIB"/COMDLG32.LIB "LIB"/GDI32.LIB "LIB"/VERSION.LIB
    LINK : warning LNK4044: unrecognized option '/LIB/MSVCRT.LIB'; ignored
    LINK : warning LNK4044: unrecognized option '/LIB/OLDNAMES.LIB'; ignored
    LINK : fatal error LNK1181: cannot open input file 'LIB/KERNEL32.LIB'
    gnumake: ***
    [D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin/fndcpesr.exe] Error 157
    Done with link of fnd executable 'fndcpesr.exe' on Thu Apr 22 17:35:31 IST
    2010
    Relink of module "fndcpesr.exe" failed.
    See error messages above (also recorded in log file) for possible
    reasons for the failure. Also, please check that the Unix userid
    running adrelink has read, write, and execute permissions
    on the directory D:/oracle/LADPCDEV/apps/apps_st/appl/fnd/12.0.0/bin,
    and that there is sufficient space remaining on the disk partition
    containing your Oracle Applications installation.
    Regards,
    Neeraj

  • Debugging Jni Dll with VC6

    I'm having problems debugging my JNI DLL hosted by a tomcat application. Starting Tomcat under the vc debugger causes a lot of first chance exceptions (0c0000005) to be thrown by JVM.DLL. This happens before my jni dll is even loaded, here's a short dump :
    Nicht abgefangene Ausnahme in java.exe (JVM.DLL): 0xC0000005: Access Violation.
    Nicht abgefangene Ausnahme in java.exe (JVM.DLL): 0xC0000005: Access Violation.
    Nicht abgefangene Ausnahme in java.exe (JVM.DLL): 0xC0000005: Access Violation.
    Nicht abgefangene Ausnahme in java.exe (JVM.DLL): 0xC0000005: Access Violation.
    Nicht abgefangene Ausnahme in java.exe (JVM.DLL): 0xC0000005: Access Violation.
    Nicht abgefangene Ausnahme in java.exe (JVM.DLL): 0xC0000005: Access Violation.
    Geladene Symbole für "D:\Projekte\Applications\Winlog.web\tomcat\bin\JGimp.dll" überein. <----- my JNI DLL
    Nicht abgefangene Ausnahme in java.exe (JVM.DLL): 0xC0000005: Access Violation.
    Geladene Symbole für "D:\Projekte\Applications\Winlog.web\tomcat\bin\CGimp.dll"
    JVM seems to catch those itself, but needless to say, this is something that shouldn't happen.
    Any ideas ?
    Regards

    805541 wrote:
    Actually, this was a statement waiting for opinions...
    I can use VC2005, VC2008, WinDebug as well, same issue.
    And the real alternative is to have strict layering in the C code itself such that you shouldn't need to debug JNI itself at all.well, that's a strange comment. Is there any valid reason not to debug a jni DLL ?1. Because you can't. Say on a production system with strict install rules.
    2. Because you don't actually need to "debug" the JNI code itself because you maintain a strict boundary layer protocol. Thus bugs can normally only be expected in the functional C code (which allows for testing via other means.)
    3. Because it is difficult to do.
    And my favorite is because I would avoid JNI completely these days and instead use a separate executable that wraps the target functionality. Thus to discrete applications both which can be tested independently.
    When I used JNI in the past I never needed to use a debugger (because I followed item 2 in the above.)
    Other than that I can only see that you have two questions.
    1. You are asking if you are doing something wrong. You might suggest googling.
    2. You know you are not doing anything wrong and there is something 'wrong' with the VM. In that case get use to it. It isn't going away. Or at least not unless you have a sales contract and/or service contract with Sun/Oracle. And if you have that then this is site is not the appropriate way to use that.

  • JNI : Having issue with accessing C# dll

    Hi Everyone,
    Could you please tell me how to access C# dll using JNI.
    My code looks like below:
    public class JNISample {
         public native void Message();
    static{
              System.load("D:/*******/JNISample/dll/SampleDLL.dll");
              System.out.println("library loaded");
         public static void main(String args[])
              System.out.println("JNI sample example");
              new JNISample().Message();
    I created header file using command below
    javah -jni -classpath d:\*****\JNISample\src JNISampleI am getting below error:
    java.lang.UnsatisfiedLinkError: no D:/Applet/JNISample/dll/SampleDLL.dll in java.library.path
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)
         at java.lang.Runtime.loadLibrary0(Runtime.java:823)
         at java.lang.System.loadLibrary(System.java:1030)
         at JNISample.<clinit>(JNISample.java:16)
    Exception in thread "main"
    Could anyone please tell some suggestions?
    Thanks,
    Kavita
    Edited by: java_pgrm on Dec 2, 2009 9:36 PM
    Edited by: java_pgrm on Dec 2, 2009 9:38 PM

    java_pgrm wrote:
    I am really sorry to ask u such question.. What is .c file? Actually I am using c# dll. Java JNI requires a specific linkage which in general means that the JNI shared library must be written in C or C++.
    What happens in that shared library is up to you. However note that fairly recent posts on this forum indicate that there are some complications about correctly using a JNI shared library with C#. Somewhere there is a thread that discusses it.
    You might also consider just creating a separate executable with a comm interface (sockets, files, stdio) rather than using JNI. There are advantages to that including that it can't take down the VM (bad coding on your part in JNI can) and it is much easier to test.

  • Trouble with TestStand running VB DLLs compiles in separate threads

    I have an application that uses DLLs written in VB 6 to manipulate hardware. The hardware is Stepper Motors controlled via the NI CAN bus card, and two instruments controlled via the GPIB PCI card. I have written the two DLLs to use the same NI PCI GPIB and the same NI CAN BUS card. (One instrument per DLL and One Motor per DLL)
    Test stand is then creating the DLLs and running them in separate threads. I have the one DLL Call in a subsequence running as a separate thread, and the other DLL is in the main sequence. I have a GOTO step with preconditions set so that the main sequence only continues after the separate thread in the subsequence is finished.
    The problem I am having is that these D
    LLs work OK when I run them both in the VB debugger. The program even works when I run the main thread in the debugger, and the subsequence is run compiled.
    The problem is, that if I try to run both of these DLLs compiled It seems as if the subsequence DLL never executes.

    To Tuxamation -
    Nothing comes to mind as to why this would happen. VB 6 automation DLLs are used all the time for code modules.
    Note that when MSVB debugs a DLL, it is actually running the DLL as an EXE server within the MSVB process and not in TestStand's process that is using it. I typically found that there is typically a subtle difference in behavior between running the server as an EXE or DLL server.
    A simple way to determine if the TestStand call is reaching your DLL is to place a MsgBox function call in the DLL entry point and immediately return, ie. bybassing your existing code.
    So, if the call is being made to your DLL, you could then enable the Visual Basic project option on the Compile tab, "Create Symbol Debug Info" and recreate your VB DLL.
    You can then attach Microsoft Visual Studio (C++ debugger) to the TestStand process, open the file that contains the entry point in to DLL that TestStand calls, set a breakpoint, and see if the breakpoint is reached.
    Scott Richardson
    Scott Richardson
    National Instruments

  • What is the proper method to access exported functions in a DLL compiled for a CE (Arm) target?

    I have been trying without success to access functions in a DLL that is targetted for Windows CE.  My Labview application target is an Arm-based TouchPanel device.
    Solved!
    Go to Solution.

    Well, you can't load an ARM DLL into a VI that is loaded on Windows. The ARM DLL has a different object format, that the Windows loader doesn't know and even if it did, the Intel CPU can't interpret the ARM opcodes in that DLL.
    In order to be able to load and debug your application on your host system, you need to create a so called stub library. This is a DLL, compiled for the host system, that provides one equally named function for every function in the target DLL, that you want to call. You create such a DLL in Visual Studio, by taking the header file and adding an (empty) function body to each function you want to call, and then compiling this into a DLL.
    Of course you won't be able to debug the DLL call itself on the host system, unless you fill in some sensible functionality into the stub function yourself, but you can load the VI hierarchy and debug other aspects of your application.
    I haven't played with this specific part of mobile development yet but I believe that you can debug the VI in question from your host system when you start it under the mobile target. But you still need to provide the stub DLL, so that LabVIEW can load the VI into memory. The actual execution happens on the target and the data is transfered back to the host  system through a debug channel to be displayed in that VI, but the stub DLL is required so LabVIEW can load the entire VI hierarchy to allow debugging the VI.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Building regular DLL based on static libs compiled with _AFXDLL

    I am trying to build a regular DLL that depends upon a set of static libs I get from elsewhere. The static libs are compiled with _AFXDLL and _AFXEXT and /MD. (The static libs are used by a different application that uses shared MFC libs.)
    I can link the dll, but when it runs it fails to find CRuntimeType information for classes in those static libs. Specifically, some source in the static libs is calling:
    AFX_MODULE_STATE *afxs = AfxGetModuleState();
    and looking thru the afxs->m_classList which happens to be NULL. (There should be lots of classes there.)
    Currently my regular DLL is linking agains the static MFC libs.
    To be clear, I do not want to export any MFC classes from my dll, the MFC classes are only used internally by the static libs I'm linking my dll against. That's why I am using a regular (not mfx extension) dll.
    Do I need to link my dll with shared mfc? I have a fair amount of exported functions. I would have to add
    AFX_MANAGE_STATE(AfxGetStaticModuleState( ))
    to every exported function right?

    Ok, I've tried a few things and I know more of what's going on.
    I linked my dll with the shared mfc (_AFXDLL) and added the AFX_MANAGE_STATE(AfxGetStaticModuleState( )) to some of the exported functions to try it out. It switches to the dll's AFX_MODULE_STATE alright, but the class list is empty. If I break in the CWinApp initializer (before any exported functions are called) for the dll, the class list is there. So where did it go?
    Well I stepped thru in the debugger and here's what's happening:
    _CRT_INIT creates the AFX_MODULE_STATE for the dll and AfxClassInit() gets called lots of times to add the runtime class info. Looks like this is being done by static constructors in the static libs I'm linking my dll against. So far so good.
    Then after that, InternalDllMain comes along and calls AfxInitExtensionModule( state, ... )
    Here's the problem, AfxInitExtensionModule, in addition to modifing it's state argument like you would expect it to, it also has this curious line:
    pModuleState->m_classList.m_pHead = pModuleState->m_pClassInit;
    where pModuleState is the current (dll's) state. So my class list is wiped out because the m_pClassInit slot is NULL. The AFX_MODULE_STATE constructer sets the m_pClassInit member to NULL. Looks like it's supposed to be some kind of backup so I have no clue what AfxInitExtensionModule is doing what it's doing.
    Is this a bug or do I still not have something set up right???

  • HT4259 I have been trying for hours to extend my Extreme Gen 5 network with an Express Gen 2.  But no matter what I do or try, it doesn't work.  What does happen is my internet gets block somehow when the Express looks like it's set up and 'green' - no in

    I have been trying for hours to extend my Extreme Gen 5 network with an Express Gen 2.  But no matter what I do or try, it doesn't work.  What does happen is my internet gets blocked somehow when the Express is online and looks like it's set up perfect and 'green' - but no internet connection for anything even though the Extreme is green and the modem is good.  Once I disconnect the Express, everything is good again.
    I've tried LAN, WAN, though a switch, direct connect, Extreme set to Extend the network, the Express set to be an extension.  Most of the time I get an error trying to update the Express.  But when it seems to be set up perfect, the entire house can't get to the internet.  Just when it looks right, it is so wrong.
    If anyone can give me exact steps (e.g., "...from the Base Station menu, select the Restore Default Setting option" vice "...just restore the defaults..."), I would greatly appreciate it.  I'm left to the conclusion that the Express is faulty.  I've been using Airport Utility 6.2 from Mountain Lion on one computer and Airport Utility 5.6.1 from Snow Leopard on another computer (the latter give more control while the former just want you to 'forget' the Express).

    I finally got it working.  I was trying to set it up ethernet.  My biggest mistake was when the new Express came on, I did not select 'Continue' - I went straight to manual thinking that I would get the most setup options in manual mode.  So everything I initially tried always resulted in 'wireless'.  Even when I would update or restore default settings, the Express would not completely restart. Or sometimes I would get an error. So most of the time I had to unplug it.  So when it came back up, none of my changes were retained. But there were a lot of times when everything was green and appeared to be fine. But anytime the ethernet cable was plugged in, no more internet.
    So here's the weird part.  When I finally tried 'continue' (vice manual), I would get 4 options.  One would be 'ethernet' extended.  So I would select it, it gave me green lights, all looked good, and still the same problem.  This is when I got frustrated.  I thought I had exhausted all possible combinations.
    But somehow when trying continue again after another restore, I only got 3 options.  One was the same ethernet extended option (can't remember what the missing 4th one was).  And this time it worked - it gave me the big green circle with the checkmark saying it was successful.  I don't know what I did different, but I know now that it won't work if 4 options come up to choose from.  It will work if only 3 options come up.  And success if only verified by the big checkmark.  Had anyone anywhere said the checkmark declaring success is validation, then maybe I wouldn't have gone down so many rabbit holes thinking it should have been successful.
    As for which Airport Utility I prefer, 6.2 looks nice, but it would just ignore the Express and would want me to 'forget' it and would not let me edit it.  Airport Utility 5.6.1 was the one that I ended up using the most and finally had success with.  It still strikes me as odd that there is no manually way to pick ethernet, it can only be choosen following a 'restore defaults', and only from the 3-option list (the 4-option list had the same ethernet choice, but it no worky).
    Thanks for the response.  I really do appreciate it.
    Aiport Extreme Gen5 - internet access and router
    Airport Express Gen2 - connected via ethernet, extending my wireless
    - configured while connect directly to the Extreme, but now on a switch (16-port hub)
    Using Airport 5.6.1
    1) Restore Defaults from Base Station menu
    2) Following restart, Select Continue
    3) Of the 3 option presented, select 'ethernet.... extend network...'
      - if 4 options are present, may not work
    4) Wait for the green circle with the big white checkmark.
    5) Connected Express to the switch where a cable went to other end of house - works.
    Dead-zone went from 2mbps to 24mbps.
    I probably spent 4 hours chasing my tail in anger.  The correct way took about 5 minutes total.
    Thanks again.

Maybe you are looking for

  • Can I just add Time Capsule to my AEBS Wi-Fi network without making it the main connection to my Internet modem?

    Reason I ask: I have an AirPort Extreme that works great. I only want to use the Time Capsule to back up my wife's Macbook wirelessly. I don't want to go through the daylong hassle of trying to set up the Time Capsule as my base station and have to t

  • Using threads in a jsp page

    I would like to know wether any one had used threads in a jsp page like one thread gets the data from database while other shows some text saying "getting data from database" Thank you

  • Disable embedded closed captions from video Asset?

    Hello all, I have imported a H.264 file from Apple Compressor with embedded closed captions (not hardcoded I believe). Is it possible to disable them? The automatic formatting of the captions is not suitable, and I would like to use the native Encore

  • What do you plan to do with java

    I know this is a game development forum, but I had one question. What does everyone 'who is nice at java example abuse' (i'm not saying that no one else is nice, but he's name is the most catchyest) what do you plan to do with java. Do you really wan

  • Install drivers on macbook air

    Can't seem to install a particular driver on the macbook air running Boot Camp and Windows 7