Using tlb and DLL

Hi,
I was wondering how to use a tlb associated with a DLL in Labview.   I know the tlb has the function and bject prototypes and the DLL has the actual code.  Now question is, how do I create an object according to the tlb and the use this with the DLL?  Thanks
Yohan

more specifically...
The .tlb contains an interface (eg: ITestInterface) that is implemented by the .dll using the (visual c++ 8.0)  "implement interface" on a class defined in the .dll (eg: CConcreteTest)
The project that created this is a visual studio 8 c++ .dll project.  There is one interface defined and a separate class that uses the "implement interface" option in vc8. 
--> when importing this .tlb and .dll into a visual c++ project: I use a COM smart pointer (of type ITestInterfacePtr) and call the CreateInstance() function using the name of implementing class.
Also,
This is the code to load the .dll and
.tlb:
#import "..\drivers\vna\debug\vna.tlb"
no_namespace
IcVNABASEDriverPtr pVNA;
HRESULT hr = pVNA.CreateInstance("VNA.RS_ZVC");
pVNA->setAddress(20);

Similar Messages

  • Get "Creation Script" of the existing table ( in SQL database) using C# and without using SMO dlls

    Hi All,
    I need to get the "Creation Script" of the existing table using c# and without using SMO dlls (is it possible? I don't know).
    I.e. In SQL Management Studio -> right click on any table -> Script table as -> Create To  - > open in the new query editor window. This will give you the schema of the table with the constraints of the table.
    For E.g. In Northwind database, for the table "Categories", I would like to get it as show below
    USE [Northwind]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[Categories](
        [CategoryID] [int] IDENTITY(1,1) NOT NULL,
        [CategoryName] [nvarchar](15) NOT NULL,
        [Description] [ntext] NULL,
        [Picture] [image] NULL,
     CONSTRAINT [PK_Categories] PRIMARY KEY CLUSTERED
        [CategoryID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    I would like to get the same schema using c#. Please help.
    Thanks & Regards,
    Kalai.

    SMO is the easiest way to get this. This is what Management Studio uses. If you can't use SMO, get a Profiler trace of the queries that SMO executes when generating the script and execute the same using ADO.NET.
    Regards,
    Farooq Mahmud
    Support Escalation Engineer 
    •  Microsoft Health Solutions Group

  • How to distribute the serial core only with my exe and DLL applicatio​n using the Labview applicatio​n builder 8.21. I'm not interested having MAX and other components installed on the customer PC and in the program menu

    Since Labview ver 8.0 and later, I am not very happy with the new way the project installer is managing the additional drivers such as Serial.
    With LV 7.11 the serial components was included in the cab file and was installed on the target computer in a specific directory. The size of the distribution was pretty small and well suited for compact distribution.
    My LV application use only the serial object and with LV 8.21, if I include the serial 3.2 component, I get an enormus file including max, visa ... and a lot of fucky component I do not need.
    To distribute my application, I just need, the runtime engine and the serial driver as it was with the version 7.XX
    Looking for clever advises from you gentlemen!

    Thanks Dennis for you input
    My problem is in fact very simple. 3 years ago, I developped a software suite for X ray generator; My company is selling such generator all over the world and our control panel software and DLL (for OEM integrator) is based on Labview professionnal development plateform.
    To drive our generator, we just need to transfer ascii data using the strandard RS232 port still present on most of equipments used in the industrial area.
    Until LV version 7.11, there was no problem to include serial component in my distribution with a very reasonable size and transparency for the end user.
    with LV 8.xx (preparing a new release), I'm very disapointed to see, my distribution is increased of about for 10 Mo to 180 Mo just because I increase the serial component.
    May I mix a previous version of the serial component with LV 8.21?
    Should I change my source to Visa instruction only and merge visa runtime only to my distribution?
    is there any simple serial example based on visa and distributed with th application builder?
    I will appreciate your help in order to optimize my distribution
    Pascal 

  • How to generate and use Matlab(R2007) .dll's in Labview

    Is there a step-by-step example on how to generate and use Matlab(R2007)  .dll's in Labview.
    Our experimenal hardware is LabView-controlled and we want to pass
    images/2d intensity arrays to a more complex matlab program that will
    return an array of extracted data which we want to use in LabView again.
    Thank you
    Carsten

    I recommend having a wrapper created around the matlab dll that converts the datatypes for you. There is a lot of fooling around with pointers involved which is very difficult in LabVIEW. btw, this got much more complicated after Matlab 7. Essentially, you need to convert your inputs into mxArrays, and then add those mxArrays to an mxArray list that you pass by pointer into the matlab dll. You also need to create a mxArray list for the outputs from the dll which you will need to extract your data out of before converting it back into a LabVIEW supported datatype. It's a big hassle. We do this pretty often, but we have created a c library that handles all the conversions, so it is feasible for us. Unfortunately, I can't share the library, but hopefully this information will help you get where you want to be.
    Like I said, it would be easier if you can just get a c developer to write a wrapper for you to keep it simple in LabVIEW. Alternatively, you might try getting your m-code to work in Mathscript.
    Chris

  • How to Use Delphi and Nidaq.dll and DAQ_start to control daqcard700

    Iam using Delphi5 and Nidaq.dll and AI_read to control daqcard 700.
    Has anyone examples to use DAQ_op or DAQ_start and DAQ_rate ??

    Your question actually belongs in the Measurement Devices Multifunction IO category. In the future, you will find it beneficial to post directly to the appropriate category, as there are similar questions already posted, and others with similar interests may have answers to your questions.
    I am currently not aware of any examples with Delphi and NI-DAQ function calls. There are examples for using the ComponentWorks DAQ (ActiveX) controls with Delphi. Or, you can model your Delphi examples after the Visual C examples for the text-based NI-DAQ function calls. The operations for the NI-DAQ function calls would be the same in Delphi, and you would only need to use the appropriate syntax for the Delphi environment, as well as use the appropriate include file.
    You ca
    n install the Visual C examples and the Delphi support by following the KnowledgeBase entries below.
    KnowledgeBase 24DJMNPH: "How Do I Install Examples for Visual Basic, Visual C++, and Delphi with NI-DAQ 6.8 (or higher)?"
    KnowledgeBase 0UQFO1L7: "NI-DAQ and the Delphi Language Interface"
    Also, you will find the NI-DAQ User Manual and the NI-DAQ Help file vital to programming with the NI-DAQ functions.
    You can find the KnowledgeBase entries and manuals by going to the http://www.ni.com/support pages.
    Regards,
    Geneva L.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Compiling JMagick ( creation of dll using msys and mingw soft)

    Hi friends,
    I am getting UnsatisfiedLinkError exception when I tried to run my program..
    I used msys and mingw soft to compile dll.
    Please tell me what are the possibilities for this exception..
    Thank you very much..
    Regards,
    Krishna.

    Please do not shout.
    Because the end of the main() method does not always meen that the program has ended.
    To return a value from a java program use :
    System.exit(XX)where XX is an integer (the exit value that you get with $? in bash for example)
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Not able to create More than 1 Partition in USB Drive using kernel32 and DeviceIoControl

    I have successfully created 2 or more partitions in USB drive using DeviceIoControl in C++. Now I am trying to convert this code into C# using kernel32 and DeviceIoControl. But I am not getting more than 1 partition. Can anybody tell me what is wrong
    with this code?
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    namespace PartitionWrapper
    public class IOWrapper
    public static bool CreatePartitions(string selectedDrive)
    bool RetCode = false;
    try
    bool bSuccess = false;
    uint dwBytesReturned = 0;
    IntPtr hDisk = OpenVolume(selectedDrive);
    if (hDisk == null || hDisk == FSConstants.INVALID_HANDLE_VALUE)
    RetCode = false;
    goto FINAL;
    bSuccess = FSStructures.DeviceIoControl(hDisk, FSConstants.IOCTL_DISK_DELETE_DRIVE_LAYOUT, IntPtr.Zero, 0, default(IntPtr), default(uint), ref dwBytesReturned);
    // Get the partition information
    uint PartitionInfomations = (uint)(Marshal.SizeOf(typeof(FSStructures.DRIVE_LAYOUT_INFORMATION_EX)) + 3 * Marshal.SizeOf(typeof(FSStructures.PARTITION_INFORMATION_EX)));
    byte[] DBuffer = new byte[PartitionInfomations];
    GCHandle handle = GCHandle.Alloc(DBuffer, GCHandleType.Pinned);
    FSStructures.DRIVE_LAYOUT_INFORMATION_EX pDriveLayout = (FSStructures.DRIVE_LAYOUT_INFORMATION_EX)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(FSStructures.DRIVE_LAYOUT_INFORMATION_EX));
    IntPtr pDriveLayoutPtr = Marshal.AllocHGlobal(Marshal.SizeOf(pDriveLayout));
    Marshal.StructureToPtr(pDriveLayout, pDriveLayoutPtr, false);
    // bSuccess = FSStructures.DeviceIoControl(hDisk, FSConstants.IOCTL_DISK_GET_DRIVE_LAYOUT_EX, default(IntPtr), default(uint), pDriveLayoutPtr, PartitionInfomations, ref dwBytesReturned);
    pDriveLayout = (FSStructures.DRIVE_LAYOUT_INFORMATION_EX)Marshal.PtrToStructure(pDriveLayoutPtr, typeof(FSStructures.DRIVE_LAYOUT_INFORMATION_EX));
    if (bSuccess || dwBytesReturned != PartitionInfomations)
    RetCode = true;
    else { RetCode = false; goto FINAL; }
    pDriveLayout.PartitionEntry = new FSStructures.PARTITION_INFORMATION_EX[0x16];
    pDriveLayout.PartitionStyle = FSStructures.PARTITION_STYLE.MasterBootRecord;
    pDriveLayout.PartitionCount = 4;
    pDriveLayout.DriveLayoutInformatiton.Mbr.Signature = 0xA4B57300;
    pDriveLayout.PartitionEntry[0] = new FSStructures.PARTITION_INFORMATION_EX();
    pDriveLayout.PartitionEntry[0].PartitionStyle = FSStructures.PARTITION_STYLE.MasterBootRecord;
    pDriveLayout.PartitionEntry[0].Mbr.BootIndicator = true;
    pDriveLayout.PartitionEntry[0].Mbr.RecognizedPartition = true;
    pDriveLayout.PartitionEntry[0].Mbr.PartitionType = 0x0B;
    pDriveLayout.PartitionEntry[0].PartitionNumber = 1;
    pDriveLayout.PartitionEntry[0].StartingOffset = 32256;
    pDriveLayout.PartitionEntry[0].PartitionLength = 3221225472;
    pDriveLayout.PartitionEntry[0].RewritePartition = true;
    pDriveLayout.PartitionEntry[0].Mbr.HiddenSectors = 32256 / 512;
    pDriveLayout.PartitionEntry[1] = new FSStructures.PARTITION_INFORMATION_EX();
    pDriveLayout.PartitionEntry[1].PartitionStyle = FSStructures.PARTITION_STYLE.MasterBootRecord;
    pDriveLayout.PartitionEntry[1].Mbr.BootIndicator = false;
    pDriveLayout.PartitionEntry[1].Mbr.RecognizedPartition = true;
    pDriveLayout.PartitionEntry[1].Mbr.PartitionType = 0x0B;
    pDriveLayout.PartitionEntry[1].PartitionNumber = 2;
    pDriveLayout.PartitionEntry[1].StartingOffset = 32256 + 3221225472;
    pDriveLayout.PartitionEntry[1].PartitionLength = 2147483648; //2147483648;//3221225472;
    pDriveLayout.PartitionEntry[1].RewritePartition = true;
    pDriveLayout.PartitionEntry[1].Mbr.HiddenSectors = 32256 / 512;
    for (int i = 0; i < pDriveLayout.PartitionEntry.Length; i++)
    pDriveLayout.PartitionEntry[i].RewritePartition = true;
    try
    bSuccess = FSStructures.DeviceIoControl(hDisk, FSConstants.IOCTL_DISK_SET_DRIVE_LAYOUT_EX, ref pDriveLayout, PartitionInfomations, default(IntPtr), default(uint), ref dwBytesReturned);
    catch (Exception ex)
    if (bSuccess)
    RetCode = true;
    else { RetCode = false; }
    bSuccess = FSStructures.DeviceIoControl(hDisk, FSConstants.IOCTL_DISK_UPDATE_PROPERTIES, IntPtr.Zero, 0, default(IntPtr), default(uint), ref dwBytesReturned);
    if (bSuccess)
    RetCode = true;
    else { RetCode = false; }
    FINAL:
    // Close the disk handle.
    if (hDisk != null && hDisk != FSConstants.INVALID_HANDLE_VALUE)
    FSStructures.CloseHandle(hDisk);
    catch { return false; }
    return RetCode;
    private static IntPtr OpenVolume(string DeviceName)
    try
    IntPtr hDevice;
    hDevice = FSStructures.CreateFile(
    @"\\.\" + DeviceName,
    FSConstants.GENERIC_EXECUTE | FSConstants.GENERIC_READ | FSConstants.GENERIC_WRITE | FSConstants.FILE_SHARE_READ | FSConstants.FILE_SHARE_WRITE,
    FSConstants.FILE_SHARE_WRITE,
    IntPtr.Zero,
    FSConstants.OPEN_EXISTING,
    0,
    IntPtr.Zero);
    if ((int)hDevice == -1)
    throw new Exception(Marshal.GetLastWin32Error().ToString());
    return hDevice;
    catch { return FSConstants.INVALID_HANDLE_VALUE; }
    internal static class FSConstants
    public const uint FILE_SHARE_READ = 0x00000001;
    public const uint FILE_SHARE_WRITE = 0x00000002;
    public const uint OPEN_EXISTING = 3;
    public const int GENERIC_EXECUTE = 0x10000000;
    public const uint GENERIC_READ = (0x80000000);
    public const uint GENERIC_WRITE = (0x40000000);
    public static IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
    public const uint IOCTL_DISK_GET_DRIVE_LAYOUT_EX = 0x00070050;
    public const uint IOCTL_DISK_SET_DRIVE_LAYOUT_EX = 0x7C054;
    public const int IOCTL_DISK_UPDATE_PROPERTIES = 0x70140;
    public const int IOCTL_DISK_DELETE_DRIVE_LAYOUT = 0x0007c010;
    public const int IOCTL_DISK_CREATE_DISK = 0x7C058;
    internal static class FSStructures
    [DllImport("kernel32.dll", EntryPoint = "CreateFile", SetLastError = true)]
    public static extern IntPtr CreateFile(
    string lpFileName,
    uint dwDesiredAccess,
    uint dwShareMode,
    IntPtr lpSecurityAttributes,
    uint dwCreationDisposition,
    uint dwFlagsAndAttributes,
    IntPtr hTemplateFile);
    [DllImport("kernel32.dll", SetLastError = true)]
    public static extern int CloseHandle(IntPtr hObject);
    [DllImport("kernel32.dll", SetLastError = true)]
    public static extern bool DeviceIoControl(
    IntPtr hDevice,
    uint dwIoControlCode,
    [Optional]ref DRIVE_LAYOUT_INFORMATION_EX lpInBuffer,
    uint nInBufferSize,
    [Optional] [Out] IntPtr lpOutBuffer,
    uint nOutBufferSize,
    [Optional] ref uint lpBytesReturned,
    [Optional] IntPtr lpOverlapped);
    [DllImport("kernel32.dll", SetLastError = true)]
    public static extern bool DeviceIoControl(
    IntPtr hDevice,
    uint dwIoControlCode,
    IntPtr lpInBuffer,
    uint nInBufferSize,
    [Optional] [Out] IntPtr lpOutBuffer,
    uint nOutBufferSize,
    [Optional] ref uint lpBytesReturned,
    [Optional] IntPtr lpOverlapped);
    [StructLayout(LayoutKind.Sequential)]
    public struct DRIVE_LAYOUT_INFORMATION_EX
    public PARTITION_STYLE PartitionStyle;
    public int PartitionCount;
    public DRIVE_LAYOUT_INFORMATION_UNION DriveLayoutInformatiton;
    [MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Struct, SizeConst = 0x16)]
    public PARTITION_INFORMATION_EX[] PartitionEntry;
    [StructLayout(LayoutKind.Sequential)]
    public struct PARTITION_INFORMATION_EX
    [MarshalAs(UnmanagedType.U4)]
    public PARTITION_STYLE PartitionStyle;
    public long StartingOffset;
    public long PartitionLength;
    public int PartitionNumber;
    public bool RewritePartition;
    public PARTITION_INFORMATION_MBR Mbr;
    public PARTITION_INFORMATION_GPT Gpt;
    [StructLayout(LayoutKind.Sequential)]
    public struct PARTITION_INFORMATION_MBR
    public byte PartitionType;
    [MarshalAs(UnmanagedType.U1)]
    public bool BootIndicator;
    [MarshalAs(UnmanagedType.U1)]
    public bool RecognizedPartition;
    public uint HiddenSectors;
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    public struct PARTITION_INFORMATION_GPT
    public Guid PartitionType;
    public Guid PartitionId;
    [MarshalAs(UnmanagedType.U8)]
    public EFIPartitionAttributes Attributes;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 36)]
    public string Name;
    [Flags]
    public enum EFIPartitionAttributes : ulong
    GPT_ATTRIBUTE_PLATFORM_REQUIRED = 0x0000000000000001,
    LegacyBIOSBootable = 0x0000000000000004,
    GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER = 0x8000000000000000,
    GPT_BASIC_DATA_ATTRIBUTE_HIDDEN = 0x4000000000000000,
    GPT_BASIC_DATA_ATTRIBUTE_SHADOW_COPY = 0x2000000000000000,
    GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY = 0x1000000000000000
    [StructLayout(LayoutKind.Explicit)]
    public struct DRIVE_LAYOUT_INFORMATION_UNION
    [FieldOffset(0)]
    public DRIVE_LAYOUT_INFORMATION_MBR Mbr;
    [FieldOffset(0)]
    public DRIVE_LAYOUT_INFORMATION_GPT Gpt;
    [StructLayout(LayoutKind.Sequential)]
    public struct DRIVE_LAYOUT_INFORMATION_GPT
    public Guid DiskId;
    public long StartingUsableOffset;
    public long UsableLength;
    public int MaxPartitionCount;
    [StructLayout(LayoutKind.Sequential)]
    public struct DRIVE_LAYOUT_INFORMATION_MBR
    public uint Signature;
    public enum PARTITION_STYLE : int
    MasterBootRecord = 0,
    GuidPartitionTable = 1,
    Raw = 2

    Hello,
    in the links below you can found many informations to help you:
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa365730(v=vs.85).aspx
    http://www.codeproject.com/Articles/696388/Recover-Data-From-Corrupted-Drives-File-Systems-FA
    http://www.functionx.com/vcsharp/fileprocessing/drives.htm
    http://forums.codeguru.com/showthread.php?548305-partitioning-USB-Falsh-drive
    http://forums.codeguru.com/showthread.php?548169-USB-Flash-drive-Partitioning

  • How can I use the CFDAQ6004.dll in a embedded c++-application?

    Hi,
    I´m working on a reaserch project and I´m trying to write a embedded c++-aplication which reads from values the Compactflash Card CFDAQ6004 of NI. Can I use the cfdaq6004.dll to read from? If yes, how to?
    I hope anyone has a solution for me
    Best regards, Homi!

    Hi there,
    I know this post is very old but i guess many guys visit it when reading the topic or by googling about CFDAQ6004 driver. Unfortunately CFDAQ6004.dll is very low level driver that support several functions dealing directly with CF6004 card such as ATTset and ATTget... etc. as one can view in any PE explorer for Windows CE. After a month of testing and analysis, i have successfully write a dll based on CFDAQ6004.dll to open, configure, read, write analog/digital data from/to CF6004 card. The new library was given a name CF6004LIB.dll the following is comparison between my dll and daqmxbase driver:
            New Dll                                                                                     DAQmxbase driver
    1. Can be used inside any programming environment                        Can only be used inside Labview
        inc. eVC++ , VC++ .net, VC# .net, VB .net
    2. Support fully dynamic task configuration                                       Only static configration possible (dynamic task can be done with modified VIs)
    3. Remove a lot of overhead by accessing CF6004 directly                Puts a lot of overhead passing through GUI, objects, controls, ...etc.
    4. Support full error detection                                                           Some errors can not be catched
    5. Full sampling rate can be achieved 200 kS/sec                               system dependent (max. 130 kS/sec in hp ipaq 211 PDA)
    6. Support contiuous/limited sampling                                               continuous sampling is possible but at reduced rate`
    7. small in size < 10 kB                                                                    Minimum program size 600 kB
    Also, I have written some modified VIs for CF6004 including reduced (specifically used for CF6004 card ) VIs and dynamic task configrable VIs.
    Bye
    Jaf

  • How to get a handle which is used in c dll from  javax.smartcardio.card

    good afternoon
    i am using javax.smartcardio.card to operate a sim-card reader .
    but i have a dll which is call sim-card reader by handle.
    how can i get a handle from a javax.smartcardio.card object to pass to the dll
    next is the code .
    c dll prototype declaration
    char DoFormat([in] unsigned long P1�C[in] char * P2�C[in] bool P3,[in][out] char *P4)P1 is a handle
    java code:
    private boolean checkCardReader(boolean isopen)
    boolean r=false;
    try {
    javax.smartcardio.card card;
    TerminalFactory factory = TerminalFactory.getDefault();
    List terminalList = factory.terminals().list();
    terminal = (CardTerminal) terminalList.get(0);
    // establish a connection with the card
    card = terminal.connect("T=0");
    channel = card.getBasicChannel();
    //how can i get a handle which can be used by windows dll .
    }catch (Exception ex)
    System.out.println("Exception : " + ex);
    return r;
    *****************************************************************

    Presumably you are calling a C library method that returns a handle.
    Normally a handle will be a integer type value.
    With such a value you can cast it into a java integer type and then cast it back in different JNI code by passing it to those routines.
    A java long is as big as you can get and will hold most every normal type handle item. You should however verify sizes.

  • JVM Crash When Using JNI and COM

    I'm trying to call a DLL compiled from VB6 source code that I do not have access to. The VB6 code simply retrieves data from a DB2 database using ADO and my client code grabs that data and marshals it to my Java code. I'm attempting to achieve this using JNI and COM (without a third-party bridge). It works 75% of the time, but the other 25% of the time, the JVM crashes with the usual Hotspot crash log containing an access violation exception. However, I don't know what in my C++ code (VC++ 8) could be causing this except for passing a "wild" pointer to the code lying underneath the COM object interface. If that is the case, I don't know how I am doing that.
    The Java code that is calling my native method is running on Tomcat 5.5.25 and just to be safe, I am not allowing multiple threads to concurrently call the method in my JNI DLL (though I realize that this will kill performance). Once I can get past this problem, I'll do the COM interfacing on a worker thread in my native code so I don't screw up CoInitialize and CoUninitialize calls in the case the same thread is concurrently executing multiple calls to my native code.
    I've noticed that in most cases, the JVM crashes during my call to the pClsAccount->OpenConnection method. However, my DLL isn't what is listed on the top of the call stack, which is why I suspect the passing of a wild pointer, though I'm just taking a guess at that. Does anyone have an idea as to what's going on ?
    JNIEXPORT jobject JNICALL Java_CustomerInfo_nGetCustomerAccountInfo(JNIEnv *env, jobject customerInfo, jstring accountNumber, jstring iniFileName)
    jboolean isCopy;
    // Account info class and instance to be instantiated
    jclass accountInfoCls = NULL;
    jobject accountInfoObj = NULL;
    // The constructor ID of the accountInfoCls
    jmethodID ctorID = NULL;
    // Pointer to the interface for the ClsAccount COM object
    _clsAccount *pClsAccount = NULL;
    HRESULT hr;
    BSTR bstrIniFileName(L"");
    try
    const char *nativeAccountNumber = NULL;
    if (accountNumber != NULL)
    nativeAccountNumber = env->GetStringUTFChars(accountNumber, &isCopy);
    else
    jclass newExcCls;
    env->ExceptionDescribe();
    env->ExceptionClear();
    newExcCls = env->FindClass("java/lang/IllegalArgumentException");
    env->ThrowNew(newExcCls, "accountNumber passed in was null !");
    return NULL;
    // Initialization
    variantt varConnectionSucceeded = variantt(false);
    variantt varGetAccountInfoSucceeded = variantt(false);
    variantt varAccountNumber = variantt(nativeAccountNumber);
    bstrt bstrLastPaymentDate = bstrt();
    bstrt bstrLastErrorMessage = bstrt();
    bstrt bstrLastErrorNumber = bstrt();
    jlong jTotalDue = NULL;
    jlong jEstablishedDueDay = NULL;
    jlong jLastPaymentAmount = NULL;
    jstring jLastPaymentDate = NULL;
    jstring jLastErrorMessage = NULL;
    jstring jLastErrorNumber = NULL;
    jthrowable jException = NULL;
    const char *chLastPaymentDate = NULL;
    const char *chLastErrorMessage = NULL;
    const char *chLastErrorNumber = NULL;
    long long totalDue;
    long long lastPaymentAmount;
    long establishedDueDateDay;
    //Convert string from Java string to C string to VB string
    const char *nativeIniFileName = NULL;
    if (iniFileName != NULL)
    nativeIniFileName = env->GetStringUTFChars(iniFileName, &isCopy);
    else
    jclass newExcCls;
    env->ExceptionDescribe();
    env->ExceptionClear();
    newExcCls = env->FindClass("java/lang/IllegalArgumentException");
    env->ThrowNew(newExcCls, "iniFileName passed in was null");
    return NULL;
    bstrIniFileName = comutil::ConvertStringToBSTR(nativeIniFileName);
    CoInitialize(NULL);
    // Create an instance of the COClass with the interface over it
    hr = CoCreateInstance(__uuidof(clsAccount), NULL, CLSCTX_INPROC_SERVER, __uuidof(_clsAccount), (void **)&pClsAccount);
    if (hr == S_OK)
    varConnectionSucceeded.boolVal = pClsAccount->OpenConnection(&bstrIniFileName);
    &#12288;
    if (varConnectionSucceeded.boolVal == -1)
    varGetAccountInfoSucceeded.boolVal = pClsAccount->GetAccountPaymentInformation(&(varAccountNumber.GetVARIANT()));
    env->ReleaseStringUTFChars(accountNumber, nativeAccountNumber);
    // Extract all available account information from the ClsAccount object
    if (varGetAccountInfoSucceeded.boolVal == -1)
    totalDue = pClsAccount->TotalDue.int64;
    establishedDueDateDay = pClsAccount->EstablishedDueDateDay;
    lastPaymentAmount = pClsAccount->LastPaymentAmount.int64;
    bstrLastPaymentDate = pClsAccount->LastPaymentDate;
    chLastPaymentDate = comutil::ConvertBSTRToString(bstrLastPaymentDate.GetBSTR());
    jTotalDue = (jlong)totalDue;
    jEstablishedDueDay = (jlong)establishedDueDateDay;
    jLastPaymentAmount = (jlong)lastPaymentAmount;
    jLastPaymentDate = env->NewStringUTF(chLastPaymentDate);
    delete[] chLastPaymentDate;
    pClsAccount->CloseConnection();
    // Populate error fields if any errors occur
    bstrLastErrorMessage = pClsAccount->LastErrMessage;
    chLastErrorMessage = comutil::ConvertBSTRToString(bstrLastErrorMessage.GetBSTR());
    bstrLastErrorNumber = pClsAccount->LastErrNumber;
    chLastErrorNumber = comutil::ConvertBSTRToString(bstrLastErrorNumber.GetBSTR());
    jLastErrorMessage = env->NewStringUTF(chLastErrorMessage);
    jLastErrorNumber = env->NewStringUTF(chLastErrorNumber);
    delete[] chLastErrorMessage;
    delete[] chLastErrorNumber;
    const char* clsName = "com/nuance/merchantsmutual/businessentities/CustomerAccountInfo";
    // Find the Java class and the ID of its constructor
    accountInfoCls = env->FindClass(clsName);
    ctorID = env->GetMethodID(accountInfoCls, "<init>", "(JJJLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
    jException = env->ExceptionOccurred();
    if (jException != NULL)
    env->ExceptionDescribe();
    env->ExceptionClear();
    //Release all resources associated with the ClsAccount instance
    pClsAccount->Release();
    //Instantiate the class with the given parameters
    accountInfoObj = env->NewObject(accountInfoCls, ctorID, jTotalDue, jEstablishedDueDay, jLastPaymentAmount, jLastPaymentDate, jLastErrorMessage, jLastErrorNumber);
    jException = env->ExceptionOccurred();
    if (jException != NULL)
    env->ExceptionDescribe();
    env->ExceptionClear();
    else if (hr == REGDB_E_CLASSNOTREG)
    cout << "COM class not registered" << endl;
    else if ( hr == CLASS_E_NOAGGREGATION)
    cout << "COM class can't be aggregated" << endl;
    else if (hr == E_NOINTERFACE)
    cout << "No interface for COM class clsAccount" << endl;
    else if (hr == E_POINTER)
    cout << "*ppv pointer was NULL !" << endl;
    else
    cout << "Error occurred while creating COM object. HR is [" << hr << "]" << endl;
    // Free the BSTR because a new one was returned with a call to comutil::ConvertStringToBSTR
    SysFreeString(bstrIniFileName);
    // Release the string when it's no longer needed. MUST call if string won't be used
    // anymore or else a memory leak will occur
    env->ReleaseStringUTFChars(iniFileName, nativeIniFileName);
    CoUninitialize();
    &#12288;
    catch (_com_error &e)
    cout << "Encountered an exception in GetCustomerAccountInfo: Error was " << e.ErrorMessage();
    pClsAccount->Release();
    catch (...)
    pClsAccount->Release();
    return accountInfoObj;
    Edited by: Cthulhu76 on Jan 5, 2010 9:18 AM

    0x49202400 JavaThread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon [_thread_blocked, id=5340, stack(0x49bf0000,0x49c40000)]
    0x48a7e800 JavaThread "Thread-1" [_thread_in_native, id=5976, stack(0x48f00000,0x48f50000)]
    0x48a0dc00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3072, stack(0x48c60000,0x48cb0000)]
    0x48a09000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4988, stack(0x48c10000,0x48c60000)]
    0x48a07c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=3124, stack(0x48bc0000,0x48c10000)]
    0x48a07000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2572, stack(0x48b70000,0x48bc0000)]
    0x489f5c00 JavaThread "Finalizer" daemon [_thread_blocked, id=5752, stack(0x48b20000,0x48b70000)]
    0x489f4c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=2596, stack(0x48ad0000,0x48b20000)]
    0x003c6000 JavaThread "main" [_thread_in_native, id=4252, stack(0x00820000,0x00870000)]
    Other Threads:
    0x489f0400 VMThread [stack: 0x48a80000,0x48ad0000] [id=5624]
    0x48a18800 WatcherThread [stack: 0x48cb0000,0x48d00000] [id=1192]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 36288K, used 12762K [0x02940000, 0x050a0000, 0x07800000)
    eden space 32256K, 34% used [0x02940000, 0x0343af58, 0x048c0000)
    from space 4032K, 37% used [0x04cb0000, 0x04e2ba28, 0x050a0000)
    to space 4032K, 0% used [0x048c0000, 0x048c0000, 0x04cb0000)
    tenured generation total 483968K, used 7518K [0x07800000, 0x250a0000, 0x42940000)
    the space 483968K, 1% used [0x07800000, 0x07f57958, 0x07f57a00, 0x250a0000)
    compacting perm gen total 14080K, used 14016K [0x42940000, 0x43700000, 0x46940000)
    the space 14080K, 99% used [0x42940000, 0x436f0320, 0x436f0400, 0x43700000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x0040f000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin\tomcat5.exe
    0x7c800000 - 0x7c8c0000      C:\WINDOWS\system32\ntdll.dll
    0x77e40000 - 0x77f42000      C:\WINDOWS\system32\kernel32.dll
    0x77380000 - 0x77411000      C:\WINDOWS\system32\USER32.dll
    0x77c00000 - 0x77c48000      C:\WINDOWS\system32\GDI32.dll
    0x77f50000 - 0x77feb000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77c50000 - 0x77cef000      C:\WINDOWS\system32\RPCRT4.dll
    0x76f50000 - 0x76f63000      C:\WINDOWS\system32\Secur32.dll
    0x77ba0000 - 0x77bfa000      C:\WINDOWS\system32\MSVCRT.dll
    0x7c8d0000 - 0x7d0cf000      C:\WINDOWS\system32\SHELL32.dll
    0x77da0000 - 0x77df2000      C:\WINDOWS\system32\SHLWAPI.dll
    0x76290000 - 0x762ad000      C:\WINDOWS\system32\IMM32.DLL
    0x77420000 - 0x77523000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.3959_x-ww_D8713E55\comctl32.dll
    0x6d7c0000 - 0x6da10000      C:\Program Files\Java\jre1.6.0_07\bin\client\jvm.dll
    0x76aa0000 - 0x76acd000      C:\WINDOWS\system32\WINMM.dll
    0x7c340000 - 0x7c396000      C:\WINDOWS\system32\MSVCR71.dll
    0x6d270000 - 0x6d278000      C:\Program Files\Java\jre1.6.0_07\bin\hpi.dll
    0x76b70000 - 0x76b7b000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d770000 - 0x6d77c000      C:\Program Files\Java\jre1.6.0_07\bin\verify.dll
    0x6d310000 - 0x6d32f000      C:\Program Files\Java\jre1.6.0_07\bin\java.dll
    0x6d7b0000 - 0x6d7bf000      C:\Program Files\Java\jre1.6.0_07\bin\zip.dll
    0x6d570000 - 0x6d583000      C:\Program Files\Java\jre1.6.0_07\bin\net.dll
    0x71c00000 - 0x71c17000      C:\WINDOWS\system32\WS2_32.dll
    0x71bf0000 - 0x71bf8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71b20000 - 0x71b61000      C:\WINDOWS\system32\mswsock.dll
    0x5f270000 - 0x5f2ca000      C:\WINDOWS\system32\hnetcfg.dll
    0x71ae0000 - 0x71ae8000      C:\WINDOWS\System32\wshtcpip.dll
    0x76ed0000 - 0x76efa000      C:\WINDOWS\system32\DNSAPI.dll
    0x76f70000 - 0x76f77000      C:\WINDOWS\System32\winrnr.dll
    0x76f10000 - 0x76f3e000      C:\WINDOWS\system32\WLDAP32.dll
    0x76f80000 - 0x76f85000      C:\WINDOWS\system32\rasadhlp.dll
    0x4a6a0000 - 0x4a6ac000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib\CustomerInfoProxy.dll
    0x77670000 - 0x777a9000      C:\WINDOWS\system32\ole32.dll
    0x77d00000 - 0x77d8b000      C:\WINDOWS\system32\OLEAUT32.dll
    0x7c420000 - 0x7c4a7000      C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_E6967989\MSVCP80.dll
    0x78130000 - 0x781cb000      C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_E6967989\MSVCR80.dll
    0x777b0000 - 0x77833000      C:\WINDOWS\system32\CLBCatQ.DLL
    0x77010000 - 0x770d6000      C:\WINDOWS\system32\COMRes.dll
    0x77b90000 - 0x77b98000      C:\WINDOWS\system32\VERSION.dll
    0x75da0000 - 0x75e5d000      C:\WINDOWS\system32\SXS.DLL
    0x75e60000 - 0x75e87000      C:\WINDOWS\system32\apphelp.dll
    0x4dc30000 - 0x4dc5e000      C:\WINDOWS\system32\msctfime.ime
    0x4b0d0000 - 0x4b395000      C:\WINDOWS\system32\xpsp2res.dll
    0x71bb0000 - 0x71bb9000      C:\WINDOWS\system32\WSOCK32.dll
    0x4bbe0000 - 0x4bbea000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib\ClearTranProxy.dll
    0x745e0000 - 0x7489e000      C:\WINDOWS\system32\msi.dll
    0x71c40000 - 0x71c97000      C:\WINDOWS\system32\NETAPI32.dll
    0x4bc50000 - 0x4bc6c000      C:\WINDOWS\system32\DBNETLIB.DLL
    0x71f60000 - 0x71f64000      C:\WINDOWS\system32\security.dll
    0x76c90000 - 0x76cb7000      C:\WINDOWS\system32\msv1_0.dll
    0x76cf0000 - 0x76d0a000      C:\WINDOWS\system32\iphlpapi.dll
    0x761b0000 - 0x76243000      C:\WINDOWS\system32\crypt32.dll
    0x76190000 - 0x761a2000      C:\WINDOWS\system32\MSASN1.dll
    0x4bcf0000 - 0x4bcff000      C:\Program Files\Common Files\System\Ole DB\SQLOLEDB.RLL
    0x4a8a0000 - 0x4a8aa000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib\MIGI.DLL
    0x73570000 - 0x736c2000      C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib\MSVBVM60.DLL
    0x4a950000 - 0x4a9e2000      C:\Program Files\Common Files\System\ado\msado15.dll
    0x74a50000 - 0x74a6a000      C:\WINDOWS\system32\MSDART.DLL
    0x4c850000 - 0x4c8c9000      C:\Program Files\Common Files\System\Ole DB\oledb32.dll
    0x4dbb0000 - 0x4dbc1000      C:\Program Files\Common Files\System\Ole DB\OLEDB32R.DLL
    VM Arguments:
    jvm_args: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 5.5 -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 5.5 -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\endorsed -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 5.5\temp -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\logging.properties -Djava.library.path=C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MMI\WEB-INF\lib vfprintf -Xms512m -Xmx1024m
    java_command: <unknown>
    Launcher Type: generic
    Environment Variables:
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07
    [error occurred during error reporting (printing environment variables), id 0xc0000005]
    --------------- S Y S T E M ---------------
    OS: Windows Server 2003 family Build 3790 Service Pack 2
    CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 7 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3
    Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(4194303k free)
    vm_info: Java HotSpot(TM) Client VM (10.0-b23) for windows-x86 JRE (1.6.0_07-b06), built on Jun 10 2008 01:14:11 by "java_re" with MS VC++ 7.1
    time: Mon Dec 28 15:24:00 2009
    elapsed time: 600 seconds

  • How to use a C# dll in Labview?

    How can I use a C# dll in Labview 8.2? With the "Import Shared Library" Wizzard I need the header file which I don't have. Is there another way
    to use such .dll to import the functions created in C#?
    Thanks in advance
                                  Norick

    Norick,
    afaik there is no tool which provides you the possibility to create something like an instrument driver for .NET assemblies.
    Maybe we should take a look into terminology:
    - Instrument driver: This is a set of functionality, which provides the user with an easy to use API for a special instrument. Very often, the driver itself is written in C/C++ and provided as a DLL.
    - "Import Shared Library" Wizard: This wizard enables the user to create an own API for any C/C++ DLL (or compatible) for LabVIEW. This wizard requires the information on all exported functions; this info is contained in the header file. The result of the wizard is a set of VIs containing one Call Library Function Node each for each exported function.
    - .NET assembly (extension .exe OR .dll): This can be compared to ActiveX. So the way to program with .NET is similar to ActiveX. Maybe you want to take a look into the examples of LabVIEW regarding .NET...
    - Global Assembly Cache (GAC): All assemblies contained here are registered in the system. Every application can easily work with assemblies contained here.
    - Private assemblies: This would be the way to work with .NET assemblies which are built on your own. You have to select the .DLL-file itself and make sure that the file can always be found in the same (relative)folder of your application.
    hope this helps,
    NorbertMessage Edited by Norbert B on 02-21-2007 02:16 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Can't install due to "registry" and "dll" error messages.

    I can't install any Adobe products. This occured after a complete reinstall of my Windows XP - if that has anything to do with it. I have done a reinstall before without any problems.
    I keep getting error messages about "missing registry" and "dll"s.

    I tried to install again to see what the exact error message was, but now all I get is a Microsoft message that says "Adobe Flash Player Installer has encountered a problem and needs to close." I have been having other problems installing other products and have been getting messages like "Entry Point Not Found" followed by messages like"entry point...could not be located in the dynamic link library".
    I don't know exactly what "repaired" means in installing an OS. What I did was use my reinstall Windows OS disc and follow the instructions for a "clean" install. The prompts say that my files will be wiped out, and that programs will have to be reinstalled. When promted to pick a partition I always pick the default of a 50/50 split of the hard drive.

  • How to use a C# dll with JNI

    After a ton of issues, I finally got this working properly. I've come across a lot of forum posts about the various problems and VERY few answers so I thought I would post my solution here.
    To do this, you need to create a managed C++ layer in between C# and java. The JNI functions in C++ dll can make calls to the C# dll directly, and your java program can make calls directly to the native JNI functions. Some important notes on using C# classes in C++ are:
    -gcroot<CSClass ^> should be used on any objects that are instances of some C# class.
    -the symbol ^ should be used with all C# references (its the symbol for references)
    -gcnew should be used to allocate C# objects
    -in visual studio, add the C# dll as a reference rather than using #using <CsDLL.dll>
    -do not use #using <CsDLL.dll>
    The next issue is loading the libraries. By adding the folder your C++ dll is located in to the Djava.library.path VM argument, you can load your C++ library with System.LoadLibrary("Cppdll.dll"). You DO NOT need to load the C# dll in your java program. In fact, it will ignore you if you try. The problem with loading this dll is with how the CLR searches for referenced assemblies. The CLR First searches the DEVPATH environment variable (if the machine.config file has developer mode set to on), then it searches the GAC, then it searches the codebases, then it searchs the current executable's directory along with a list of definable subdirectories (probes).
    DEVPATH is a decent option, but it requires modifying the machine.config file to be in developer mode. Once that is done, it acts just like the PATH environment variable.
    If your C# dlls are strongly named, I would recommend adding them to the GAC or using codebases. However I have not done this and am not sure how.

    Hi,
    i have to use a c# dll in my java program .by following this link http://www.codeproject.com/KB/cross-platform/javacsharp.aspx i done that.but it is working for only one c# program.if i am trying to use a dll it is throwing error
    # An unexpected error has been detected by Java Runtime Environment:
    # Internal Error (0xe0434f4d), pid=3988, tid=3704
    # Java VM: Java HotSpot(TM) Client VM (11.0-b16 mixed mode, sharing windows-x86)
    # Problematic frame:
    # C [kernel32.dll+0x442eb]
    # An error report file with more information is saved as:
    # D:\Work\EclipseWorkspace\HelloInflux\hs_err_pid3988.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    Please help me out. i want a few steps to invoke a c# dll by using jni

  • Plugin issue after using SignPlugin and Reader-enabling

    Hi all,
    I would like to ask for a help with plugin that we have developed for Adobe Reader.
    We are running into an issue with the plug-in and I was hoping that you can help me out.  It looks like plug-in works perfectly in the Acrobat but we have an issue with getting it  to work with Reader as described below.  I would greatly appreciate your help.
    We have a problem with plugin after signing it using RIKLA certificate provided by Adobe and Reader-enabling.
    Our plugin has been developed to allow users to sign PDF XML data from Reader user interface using custom library (sign library) and msxml3.dll library ( to transform PDF form XML into custom XML format). Plugin target is Adobe Reader 9 and it has been tested using Adobe Acrobat 9 earlier. Recently we received RIKLA certification key and after we tried to sign plugin and use it in Reader we started to have problems.
    Plug-in, compiled directly from source code and installed in Adobe Acrobat 9 is working correctly. We haven’t experienced any issues and everything seems to be working properly.
    The same plug-in signed using SignPlugin tools from Acrobat SDK 9.1 (command SignPlugin -kp keypairFileName -cf Reader_Integrated_Key_FileName  MyPlugin.api) and RIKLA key is not working correctly in Adobe Reader 9.
    The problem appears when plugin is trying to access external library msxml3.dll and execute createProcessor() function.  The same function work properly in Adobe Acrobat 9 before sing plug-in with RIKLA key.
    Below there is fragment with code that doesn’t work in Adobe Reader after reader-enabling but works in Adobe Acrobat.
    Plug-in crushes in line pProcessor = pTemplate->createProcessor();.
    try{
      pProcessor = pTemplate->createProcessor();
    } catch(_com_error &e) {
      printf("Error setting XSL style sheet : %s\n",
             (const char*)_bstr_t(e.Description()));
      AVAlertNote("Error setting XSL style sheet");
      AVAlertNote(e.Description());
      exit(-1);
    Code that we use in catch() block lets us know that error source is “msxml3.dll” library.
    As we have discovered problem occurs only after Reader-enabling .api plugin file. Clear compiled .api file works properly in Adobe Acrobat 9 without any problems.
    We would like to know if you have experienced any similar issues? If yes, what have caused them?
    Why same plugin is working in Acrobat 9 before signing and after signing using provided certificate it stops working?
    Are there any restrictions of using external libraries in Reader that are not working there, and these restrictions are not obeyed in Acrobat?
    Any help would be greatly appreciated.

    Hi Irosent,
    Is there a way that Acrobat and Reader differentiate between library initialization?
    Would it be useful if I place any part of code or project configuration for you so maybe you will be able to help?
    Libraries that we use (our own dll files) we place in windows/system32 folder (there also exists msxml3.dll file that we use).
    Here are preprocessor definitions that we have defined:
    _AFXDLL
    _USERDLL
    READER_PLUGIN
    NDEBUG
    WIN_PLATFORM
    WIN32
    _WINDOWS
    WIN_ENV
    ACRO_SDK_LEVEL=0x00090000
    As for library msxml3.dll that we use in code we have:
    #import <msxml3.dll>  named_guids
    using namespace MSXML2;
      MSXML2::IXMLDOMDocumentPtr
              pXml(MSXML2::CLSID_DOMDocument);
      MSXML2::IXMLDOMDocumentPtr
              pXslt(CLSID_FreeThreadedDOMDocument);
      IXSLTemplatePtr pTemplate(CLSID_XSLTemplate);
      IXSLProcessorPtr pProcessor;
    Later there is a part of code that I have posted in first post and where plugin crashes.
    I would really appreciate your help.

  • How to package/inlcude C++ .exe and .dll files in a Java Web Start App?

    Hello,
    I have a Java Web Start application that runs fine if the application is only 1 .jar file.
    But I have a need to also run C++ .exe and .dll file from my Java application.
    I wonder if someone could please tell me how to package/include C++ .exe and
    .dll files in my Java web start application?
    Thank you and Best Regards,
    Akino

    You need to place the EXE and DLLs inside the jar.
    Java cannot execute them from the jar. They have to be extracted (see Class.getResourceAsStream) from the jar and copyied into the target machine file system, perahps to the temp directory. Now you can execute them using Runtime.exec() or ProcessBuilder.start().
    Edited by: baftos on Jan 14, 2011 6:49 PM

Maybe you are looking for