Using dll files
my application(applet) uses some dll files(native method but got the problem how to place the dll(into yhr user system) file when user loades the applet
if anybody knowing plz help me
i order work dll files the dll files d\should be placed inside the [system32[/b] folder if no path is set
if not we have to set the path for the dll files now how i can achive one of this in runtime
there no need to instal jmf file but we can take what ever requered class file and we can run the application (with some sequrity setting )
but my main problem is dll files if anybody having fix to this plz respond me
Similar Messages
-
How to use DLL files in java?
hi!
i am working on hardware based java programming. the drivers which i have are in dll format. the manufacturers dont have a java based driver api's for the hardware. i want to invoke the dll file using a bridge between windows invironment and jvm invironment. more over i am not preferring to use native interface interface and c program to tackle this problem.
is there a way out?Is it a COM dll? You could use JACOB. If it's not COM, there's also JNA which as I understand it, is simpler than JNI, although I've never used it
Edited by: georgemc on Aug 22, 2008 11:05 AM links not working at moment for some reason
Edited by: georgemc on Aug 22, 2008 11:10 AM -
if i have a DLL file and i want to use them in my program
is it possible to import them for example
import Node.DLL
or what , please tell me it's important for meYou can use the DLL file by using System.loadLibrary().
To use the functions in the DLL, you have to provide a JNI interface to it.
Here's a good link to a tutorial.
http://java.sun.com/docs/books/jni/html/start.html#769
Budyanto -
Can i use DLL file created by Fortran with the call libary function node
Can i use a DLL created by Fortran (Compaq Visual Fortran) with the call library function node in labview. If yes how do i create the DLL file if i have the Fortran code.
ThanksYes! Maybe these old post will help:
http://forums.ni.com/ni/board/message?board.id=170&message.id=88786
http://forums.ni.com/ni/board/message?board.id=170&message.id=109150
Good luck!
Message Edited by altenbach on 03-21-2006 02:35 PM
LabVIEW Champion . Do more with less code and in less time . -
hi,
i have a dll file thats present some function. i called DLL file from java . i got the some errors such as
Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up function 'USBIsConnected': The specified procedure could not be found.
but I hope with in that DLL the function present. here i have used java 1.6 version . kindly give the ideasYou need to have a good look at the JNI documentation.
It isn't nearly as simple as you appear to think. -
How can this be done?
Which classes should I use to do this?JNI
http://java.sun.com/j2se/1.4.1/docs/guide/jni/index.html
- Chris -
Can I use dll file in Developer/2000? If yes how can i use?
Tanks for your suggestion. It is working
sanaul.
yes,
Check out the documentation on the ORA_FFI package. -
Dynamically changing the name of the .dll file to load in call Library
Our current model is to use dll files as "plug-in" modules for instruments and a top layer test step calls the appropriate driver dll.
For instance
the TestStep is called with the kenmore.dll passed as a parameter so the kenmore.dll file is loaded, the functions are registered and the functions are called. Next the TestStep is called with whirlpool.dll as a parameter now the whirlpool.dll is loaded the functions are registered and the functions are called. This works very well in our current CVI/LabWindows environment. Now we plan to work with LabView, we wish to retain this model (as DLL files, there are advantages in our model for us). We have not found a way to load these dll files from LabView without hard coding the path and filenames in.
Any suggestions on how to dynamically change the path in the Call Library module, or another suggested method of loading the dll via LabView?
Thanks,John Stuart wrote:
Our current model is to
use dll files as "plug-in" modules for instruments and a top layer test
step calls the appropriate driver dll.
For instance
the TestStep is called with the kenmore.dll passed as
a parameter so the kenmore.dll file is loaded, the functions are
registered and the functions are called. Next the TestStep is
called with whirlpool.dll as a parameter now the whirlpool.dll is
loaded the functions are registered and the functions are called.
This works very well in our current CVI/LabWindows environment.
Now we plan to work with LabView, we wish to retain this model (as DLL
files, there are advantages in our model for us). We have not
found a way to load these dll files from LabView without hard coding
the path and filenames in.
Any suggestions on how to dynamically change the path in the Call
Library module, or another suggested method of loading the dll via
LabView?
Thanks,
As Ben has pointed out LabVIEW
scripting may be a possibility but you are going with that in highly
unsupported area. Also I happen to know that changing the library name
of a Call Library Node through scripting has produced unsupported
feature errors previous to LabVIEW 7.1 eventhough the method was there.
And LabVIEW 8 hides the whole scripting business behind the license
manager.
Another approach at least if the different DLLs do not change to often
thier functions and parameters would be to create a wrapper DLL. Have
it a method that loads the desired DLL and links its functions to
internal function pointers. Then when calling the actual function entry
points just redirect directly to the correct fucntion through that
function pointer. Since you are already working in CVI creating such a
DLL should be only a matter of taking out a little bit of your already
existing code and put it into a DLL project.
Rolf Kalbermatter
Message Edited by rolfk on 04-12-2006 07:40 AM
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Hi All!
I have 45 icons which are using in me project. I want to make .DLL file of those 45 icons. How can I do this? And after make the Dll file how can I use this?
Waqas,I download a sample file "d2kwutil_6_0_6_0.zip" from http://www.oracle.com/ which conatins .Dll, .Pll, .Fmb, .Fmx, .MMB, .MMx, .Res files.
I use this and Dll file is using this sample form but how, I dont know... What the exact solution is? Is it possible to use .Dll file using Forms 6i or Not?
Waqas, -
How to convert java class to dll file for using in Microsoft Technology(.n)
hey hemmj !!!!!!
nice replying , first of all i d like to say thanks for response me so frequently..... i like such type of guy... i d never forget ur online support.
hey buddy, i ve a problem with applet application...
i m working on java chat server build on swing applet. As it is chat server, it is divided into two parts, one is server application and other is client application. I want to run this server app on the client server and the basic thing with this site is that it is running on .net platform(Microsoft). and the other app ll running on the client machine or end user. Now the problem is that this site would run only if the server app ll be run on server. This server app ll open the socket of server, which ll listen the request of the user...... So, the requirement is to convert this java sever class file into dll file and register this dll file with the IIS server.So, It run and stop with the IIS server.
I ve already search the way to convert the java class file into dll file. This is possible in such way........... below code is for the java class file...
import java.net.*;
import java.io.*;
import java.util.*;
public class chatServer
public static void main(String args[]) throws Exception
ServerSocket sersoc=new ServerSocket(1234);// Any port number above 1000 should do
// as most ports below 1000 are used by system
Vector socvec=new Vector();
String data="";int i,j=0;
BufferedReader in;
//System.out.println("Listening of port " + sersoc.getLocalPort());
//System.out.println("Waiting for connections...");
while(true)
Socket soc=sersoc.accept();
socvec.addElement(soc);
chatServerReadThread csrt=new chatServerReadThread(socvec, soc);
in=new BufferedReader(new InputStreamReader(soc.getInputStream()));
PrintStream out=new PrintStream(soc.getOutputStream());
out.println("Connected to chat server");
out.flush();
data= in.readLine();
for(i=0;i<socvec.size();i++)
soc=(Socket)socvec.elementAt(i);
out=new PrintStream(soc.getOutputStream());
out.println(data + " connected");
out.flush();
//System.out.println(data + " connected");
csrt.start(); // error is comming from here..... plz help me.
class chatServerReadThread extends Thread
Vector socvec;
PrintStream out;
chatServerReadThread(Vector socvec, Socket soc)
this.socvec=socvec;
try
out=new PrintStream(soc.getOutputStream());
}catch(Exception e){}
public void run()
try
String data;
Socket soc;
BufferedReader in;
while(true)
for(int i=0;i<socvec.size();i++)
soc=(Socket)socvec.elementAt(i);
in=new BufferedReader(new InputStreamReader(soc.getInputStream()));
if(in.ready())
try
data=in.readLine();
if(data.charAt(0) == ']')
data = in.readLine() + " exited";
//System.out.println(data);
socvec.removeElement(soc);
for(int e=0;e<socvec.size();e++)
soc=(Socket)socvec.elementAt(e);
out=new PrintStream(soc.getOutputStream());
out.println(data);
out.flush();
else
for(int e=0;e<socvec.size();e++)
soc=(Socket)socvec.elementAt(e);
out=new PrintStream(soc.getOutputStream());
out.println(data);
out.flush();
}catch(Exception e){socvec.removeElement(soc);}
}catch(Exception e){e.printStackTrace();}
first i ve made the jar file of this class
jar cvf chatServer.jar chatServer.classafter getting the jar chatServer.jar. I ve opened the .net dos prompt and
type this command which ll make dll file automatically....
> jbimp /t:library chatServer.jar
And you'll see the following output:
Microsoft (R) Java-language bytecode to MSIL converter version 1.1.4322.0
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corp 2000-2002. All rights reserved.
Created chatServer.dll
I cant get the problem origin from where it is comming, when i tried to convert it into .dll file it shown an error that, it did not recongnized the method in first class
public static void chatServerReadThread.start() method
is not recognized by .net dos prompt commnad. But when i omit this method it gets created the .dll file. This start method is basically the default method of thread class that run the thread from the same class..
By vewing the code u can visulize the thing,, i ve marked the code from where the error is comming.
Plz do it as soon as possible, i ll waiting for ur reply......
I ll be really thanking u for that....
Thanx and regards
Niraj Kumar SinghI wonder if this will work:
jbimp /t:exe chatServer.jar
Your chatServer is an application that can be started from the commandline.
A dll is a library to be used in com, com+, other executables or .... -
Using call library function on a dll file created in an old version of labview
So I'm trying to update an old labview program to work in labview 2012. Everything converted over just fine but labview will always crashoverwrote some while using a library function in a DLL that was compiled using labview 8.5. Labview exits, stating that it vital memory area. It passes an array of data to the library call and an empty array for output. I thought I could get around this problem by changing my code to initialize the array being passed in so that it would be large enough to hold all the expected output. Now instead of overwritting areas of memory it shouldn't, I get a pop up message that says:
fatal internal error
memorymanager.cpp line 406
8.5.1.f5
So it appears because I don't have the ability to recompile the DLL file it runs off of the 8.5 runtime instead of the more recent one. Is there any thing I can do about this?rjpierce wrote:
So I've been trying to figure out a way around this on my own while waiting on a response. From what I'm reading, a dll created in one version of the labview runtime can't be used by a different labview runtime. Am I correct in this? I feel like I must be mistaken since that's basically the opposite of how a dll should work. If nothing else works I have access to the original code for the DLL but it requires the control and simulation toolkit. I would like to avoid having to recompile the DLL since it was put in to a DLL to avoid the need for the toolkit to begin with.
Your problem most likely is that you try to pass native datatypes to the DLL function? That only can work if the caller and callee use the same LabVIEW runtime engine. Otherwise the memory block created in the memory manager of the caller will be accessed by the memory manager in the callee and bad things happen. Instead you should define the DLL function to use standard C datatypes (Pointer to C array) and also make sure to allocate the according buffer in the caller for all output array parameters.
An even more elegant way would be to completely abandon the DLL approach and call the according functions directly in LabVIEW. Then you won't have the problems about mismatched runtime engines. Passing C array pointers to a DLL is less performant than passing native datatypes, but if you use native datatypes you have to make sure the DLL is compiled in the same LabVIEW version as the one you call it from.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Using a .dll file in Diadem2012
Dear folks,
I've got a .dll which was created using the Diadem GPI toolkit 10.2 and Microsoft Visual Studio 8.0, I guess. I'm currently using this DLL under Diadem 9.0.
Now I'd like to use this same DLL under Diadem 2012, but it won't work. When loading this DLL via the GPI-DLL loader, It only says .dll couln't be loaded, no further output, no more debug information...?
What can I do to load this DLL into Diadem2012, or do I have to code the whole DLL new?!
Thanks for your help in advance.
TimHi Walter,
thanks for your fast reply.
I tried to recompile that file in Visual Studio 10, because I had an old project file coded in Visual Studio 8. Unfortunately, that did'nt work. The .dll could not be built. So I'd like to try to install the runtime library.
I don't know under which visual studio version, the dll file was built, so what should I do? Install Visual Studio 8 and 6 and hope that the runtime library I need is installed then?
Thanks for your help.
Greets Tim -
Problem occured while creating a .dll file which has to be used in CIN
hi all,
i am a rookie in labview,iam getting an error while trying to build .dll file in vc++ 6.0 , i followed all the instructions available in labview "using External Code" manual,the error was as follows;
Compiling...
CINsample2.c
Linking...
Running LVSB Utility
The system cannot find the path specified.
Error executing c:\winnt\system32\cmd.exe.
sample1.dll - 1 error(s), 0 warning(s)
plz help.
santosh.
Regards,
santoshHi santosh,
It sounds to me that you are mistaking CINs (Code Interface Node) with
DLLs (Dynamic-Link Library). You mention that you want to create a DLL
in Microsoft Visual C++, but the errors you are getting are related to
CINs.
Don't worry! Here are my favorite links to getting started creating and using DLLs with Microsoft Visual C++ and LabVIEW:
How to Build a DLL with Visual C++
Creating and Calling LabVIEW DLLs with Various Data Types from Microsoft Visual C++
I hope that this helps you to get on the right path.
Have fun!
- Philip Courtois, Thinkbot Solutions -
Despite my best efforts, I am unable to remove iTunes 11.1.4 from my PC, this being made necessary because the original installation had a flaw and did not load properly. Effor to use the control panel, deleting dll. files, etc. all failed. And, of course, on startup, a window opens with the error and tells me find QTMovie.dll and delete it because this may be the source of the hangup. Also, in trying to delete iTunes, I get the additional message that I must get approval from the System Administrator to take this action. I am the System Administrator.
Any ideas would be welcomed.
Thank you.
James
<E-mail Edited by Host>Thank you for asking this question. I'm having the same issues.
Liz -
How to run a remote windows dll files and the drivers of the system using j
Dear Friends,
I need some valuable info regd how to run a remote windows dll files and the drivers of the system using java
reply regd thanking youPlease don't make duplicate posts like this.
Maybe you are looking for
-
Iphone 5s ios 7.01 - touchscreen typing
After the ios 7.01/7.02 update on my new iPhone 5s I am seeing typing issues. If the phone is in portrait mode and I hit any of the keys on the 2nd row from the bottom ("up arrow', z, x, c, v, b, n, m, "backspace") the keys under them will be pressed
-
Folders copy empty to an external drive
Since I've loaded Lion when I move a folder by copy paste or drag drop to an external drive only a blank folder moves across. When I tried it using command drag drop the files were lost altogether. Any ideas why this would happen? Thanks
-
How to execute a .cmd file in Solaris server
Hi all , How to execute a .cmd file in Solaris server. Thanks.
-
What applications are being used on this website to give the "flashy" look?
Hi Im useing the new dreamweaver, and im confident in creating a basic website, however I want to move up to the next level, so could any one please tell me what other products this company are using to create the effects? and maybe a little pointer
-
My husband and I use Home Sharing, and we can access each other's music (purchased under our own Apple IDs). Does iTunes Match support Home Sharing or do we both need an annual subscription for iTunes Match?