Dynamically Loading VI using DLL
Hi all,
In Labview, I have made a GUI and a library for interfacing to a device. I have compiled this to an .exe and it all work well.
I haved compiled these exposed VIs into a DLL using LV2012 and written a small C++ program that is linked to my DLL. The problem I am having is that when I run my "begin" function (it calls some dynamically loaded VIs), I get Error 7 Path not found. Now, I imagine that this is something to do with either me not including the dynamic VIs when I compile the DLL (which I am sure I have done) or, the paths somehow being changed. When I load my VI, I use a relative path constant e.g. "UserCommands\Device1\Device1CommandFactory.vi" that gets converted to an absolute path.
What do I need to do in order to get the DLL to load the VI properly?
Thanks in advance
I'm not trying to load a front panel VI dynamically. I load a "server" vi that interfaces with the device. I also dynamically load my device class. I do this because, the DLL should be able to interface with 2 different devices.
I've added the error source as an output of my begin vi and I can see that the error occurs when trying to load my device class. It's in german sorry
Get LV Class Default Value.vi<APPEND>
<b>Vollstõndige Aufrufkette:</b>
Get LV Class Default Value.vi
myDevice_Interface.lvlib:LoadDeviceFromAbsolutePath.vi
myDevice_Interface.lvlib:LoadDevice.vi
myDevice_Interface.lvlib:begin.vi
myDevice_Interface.lvlib:begin.vi.ProxyCaller
<b>Klasse wurde versucht, hier zu laden:</b>
C:\Users\myname\Desktop\myDevice_Interface_DLL_Example\myDeviceInterface.dll\myDevice Interface\Devices\myDevice1\myDevice1.lvclass
I have included the class in the source data tab when I compile the DLL. I do specify the path to find the class as Devices\myDevice1\myDevice1.lvclass. Where should it be looking?
Similar Messages
-
How to Dynamically Load jvm.dll without setting PATH
Please help, invoking CreateJavaVM via a function pointer is returning -3, but I'm not sure why.
When my PATH is setup up to include the jvm.dll and I invoke JNI_CreateJavaVM() directly, it works fine. But I want it to work regardless of my PATH setting, so I am trying to use LoadLibrary and dynamically load the jvm.dll and then a function pointer to invoke CreateJavaVM().
The LoadLibrary returns non-NULL result, the GetProcAccress() returns non-null, but when I invoke the pointer to the CreateJavaVM call, it returns -3. I know -3 is JNI_EVERSION error, but any ideas what is wrong with the code below, such that it would give me this error?
Currently my code is as follows:
typedef jint (JNICALL CreateJavaVM_t)(JavaVM **pvm, void **env, void *args);
JavaVM *m_jvm;
JNIEnv *m_env;
SetDllDirectory(L"C:\\Program Files\\Java\\jdk1.6.0_20\\jre\\bin\\client");
HINSTANCE hVM = LoadLibrary(L"jvm.dll");
if ( hVM == NULL ) {
// report error
CreateJavaVM_t *pfnCreateJavaVM = (CreateJavaVM_t*)GetProcAddress(hVM, "JNI_CreateJavaVM");
#ifdef JNI_VERSION_1_6
char cpChars[1024] = {0};
sprintf_s(cpChars, "-Djava.class.path=%s", classPath); // classpath is defined elsewhere
JavaVMOption options[1];
options[0].optionString = cpChars;
JavaVMInitArgs vm_args;
vm_args.version = JNI_VERSION_1_6;
vm_args.options = options;
vm_args.nOptions = 1;
vm_args.ignoreUnrecognized = JNI_TRUE;
pin_ptr<JNIEnv*> env = &m_env;
pin_ptr<JavaVM*> jvm = &m_jvm;
int result = pfnCreateJavaVM(jvm, (void**)env, &vm_args);
// This is where the failure occurs. result is -3 for some reason here...why?For some reason, pfnCreateJavaVM is returning -3, but I'm not sure why? Any ideas what is wrong with this code, such that it would give me a -3?
Thanks in advance,
Billwkoscho wrote:
For some reason, pfnCreateJavaVM is returning -3, but I'm not sure why? Any ideas what is wrong with this code, such that it would give me a -3?As an experiment try using a different jvm.dll from a different location. From my box there are several different jvm.dll under my jdk install dir. -
I downloaded Firefox 4 yesterday. I used it and had no problems. I started my computer today and clicked the Firefox icon and got the message "The procedure entry point NS_Set DLL Directory could not be located in dynamic link library Xul.dll" .I tried to shutdown and restart and got the same message.I use Norton Security. Could it not recognize Firefox 4 and done this?
'''Edit: '''That was a lot of questions. You might want to just re-run the Firefox 5.0.1 installer to see whether that corrects what appears to be a mismatch of files. I suggest saving the installer to the desktop, restarting Windows to ensure that all file locks are released, and then running the installer. As always, you can download from here: http://www.mozilla.com/firefox/all.html
In your other post, you wrote "I just downloaded FireFox 5.0 today, and none of the icons on my desktop will open. This is the message that I receive. The procedure entry point NS_Set DLL Directory could not be located in dynamic link library Xul.dll."
Can you describe what happens in these different scenarios:
(1) Start Firefox with its own program icon. Error dialog, but Firefox runs normally after you dismiss it? Or no error? Or Firefox won't start?
(2) Firefox not running, double-click shortcut to web site on desktop. Error dialog but Firefox loads the page after you dismiss it? Or Firefox doesn't load the page? Or Firefox never loads??
(3) Firefox running, double-click shortcut to web site on desktop. Error dialog but Firefox loads the page after you dismiss it? Or Firefox doesn't load the page? Or Firefox dies??
(4) Double-click unrelated desktop shortcut. Does this give an error as well?
If you've noticed effects with links in documents or emails outside of Firefox, that could be a clue as well. -
Message
"Firefox.exe. The procedure entry point sqlite3_ob_status could not be located in the dynamic link library mozsqlite.dll"
Appears as soon as I try to use Firefox. Kit in Toshiba Net book.
No problems of this type before.Thank you. I'm going to investigate saving my itunes library to the icloud and then re-trying the Stellar Phoenix recovery now the error messages have gone. If the Stellar doesn't work then I will try the advice in your link. I really appreicate the help you've given me - at least I have my itunes library back! I'm kind of resigned to re-loading my CDs back on - something to keep my busy in the winter months!
I'll let you know how I get on, but it will probably be a few days.I'm not very technical so I have to wait for my husband to get in from work to help me with this side of things. He's been busy working on the Olympics, so I he hasn't had much spare time for a while!
Michelle -
error 126 can not load library "DLBAPRP.DLL" using defaults. this message appears when we try to print from our web bookmarks or any acrobat or pdf files
That error seems to be new with Firefox 4 - never heard of it with earlier versions of Firefox, but it goes back many years in various Windows programs.
See this [http://www.google.com/search?client=ubuntu&channel=fs&q=DLBAPRP.Dll&ie=utf-8&oe=utf-8 search]. -
I have windows 7 and after updating Itunes to the latest version, I get this error message...
The procedure entry point uloc_getLocateeForLCID_4_0 could not be located in the dynamic link library icuuc40.dll.
I have tried repairing and reinstalling even deledted Itunes and did a re-install but keep getting the same error message.
what can I do to fix this error?Taken at face value, you're having trouble with an Apple Application Support program file there. (Apple Application Support is where single copies of program files used by multiple different Apple programs are kept.)
Let's try something relatively simple first. Restart the PC. If you're using Vista or 7, now head into your Uninstall a program control panel, select "Apple Application Support" and then click "Repair". If you're using XP, head into your Add or Remove Programs control panel, select "Apple Application Support", click "Change" and then click "Repair".
If no joy after that, try the more rigorous uninstall/reinstall procedure from the following post. (If you've got XP, although the procedure is for Vista and 7, just read "Computer" as "My Computer", read "Uninstall a program control panel" as "Add or Remove programs control panel" and assume the system is 32-bit, and you'll be doing the right things.)
Re: I recently updated to vista service pack 2 and I updated to itunes 10.2.1 and ever -
Dynamic Load Plan creation using scripting
Hello All,
We have a requirement to create load plans dynamically i.e using script groovy. Idea is that we will store interface scenarios in a table and then script will read these scenarios an create dynamic load plans. Now following are my question.
1) Is it possible to create load plans through script ? (different blogs on net claims that you can do anything or everything whatever ODI studio can do)
2) Any pointer what API to use for this task ? I am very new to scripting and have zero idea about how to go about it . if possible please suggest sample script to create load plans (I can see some sample to create interface,folder etc on net.)
Thanks in advance for your reply.
Thanks & RegardsODI SDK apis allows dynamic creation of Loadplans. Oracle Fusion Middleware Java API Reference for Oracle Data Integrator
Studio too uses these APIs for LP related operations so you should be able to do using these whatever studio allows.
You can find SDK samples at Oracle Data Integration Sample Code -
when I start firefox browser an erroe message appear that contain this text "the procedure entry point_except_handler4_common could not be located in the dynamic link library msvcrt.dll" I am using windows XP in English
== This happened ==
Every time Firefox opened
== start mozila firefoxThis issue can be caused by a problem with the file c:\windows\system32\dwmapi.dll
The file dwmapi.dll is a Vista file and should not be present in Windows XP.
See also [tiki-view_forum_thread.php?forumId=1&comments_parentId=417674] -
When you try to load Firefox 6.0 the following error message is thrown and browser will not load:
The procedure entry point sqlite_libversion_number_IP could not be located in the dynamic link library mozqlite3.dll."The procedure entry point QTCF_CRUniCharGetUnicodePropertyDataForPlane could not be located in the dynamic link libray QTCF.dll."
That one is usually caused by a misplaced older version of QTCF.dll.
If you've got a 32-bit vista, first look to see if there's a copy of QTCF.dll lurking in your C:\Windows\system32\ folder. If you find one there, drag it out onto the desktop.
If you've got a 64-bit vista, first look to see if there's a copy of QTCF.dll lurking in your C:\Windows\sysWOW64\ folder. If you find one there, drag it out onto the desktop.
Now try launching iTunes again. Does it launch properly this time? -
Build applications with dynamic loaded subVI's as dll
I want to build an application with some subVI's. The target would be to have an *.exe from the topVI and a seperate file for every subVI (I suppose this will then be a *.dll file)
The topVI uses the "call by reference node" with a "type specifier VI refnum" reference.
The path of the subVI's is read from a textfile and the subVI's are called dynamicly, all subVI's have the same connector layout.
Until now I was not able to generate a *.exe file wich is able to dynamicly call subVI's which are not included in the *.exe file (I tried with *.vi, *.llb and *.dll versions of the subVI's).
Building this application with all subVI's included in the *.exe is no problem and works fine, but is not what I want.
The target would be to have the possibility to update only some subVI's without the need to build the whole application again.
This way of working would increase the flexibility to have different combinations of versions a lot.
I am using LV8.2.
Is my question anyway possible and if yes can somebody tell me how?
Thanks!Hello,
A SubVI is actually what you call a sub-routine in text-based programming languages.
So when you build an executable from a VI with SubVI's, it will simply build everything into one exe file.
That's normal behaviour.
If you would like to use dll's for flexibility, than you have to build VI's seperately for every dll you want to build.
These dll's can than be called from within you main application executable.
This practice is often used by system integrators to protect there code otherwise than a larger executable, but mainly because of easy maintenance.
That is what I think you are also looking at.
So what you would like to do is perfectly possible and common practice, you may only have to change your top view of the actual application.
Best regards,
Joeri
National Instruments
Applications Engineering
http://www.ni.com/ask
Make our forums great:
If you like the answer, don't forget to "Kudos!".
"Accept the Solution" if your question is answered! -
Alpha transparency borders on dynamically loaded images for use with textures
Hi there folks. Well, I have been beating my head over this
and am hoping one of you can help me out.
Essentially I have 16bit images that are loaded into my
shockwave application at run-time. These images are user defined
which means that I will not know their size ahead of time. Once the
images are loaded I then create textures and apply them to various
shaders. Ok, all of this works just fine. What I need to do though
is create an alpha transparent border around the images, so when I
apply them to their surfaces I only see the image and nothing
around it. I am doing this because these images will only appear at
specific parts on a surface, textureRepeat will be false, and many
models will be stacked in the same exact location using the same
model resource. I have everything working, but I cannot figure out
the alpha part for the life of me. Also, when I test the alpha
based image by itself it works just fine. It is not until I try and
combine the 16bit (converted to 32bit at run-time) image that I run
into problems.
I have tried:
- Creating a 32bit alpha image in Fireworks with a
transparent border and a black rect for the inside. I then copy the
dynamic image over the alpha image (only after going from 16bit to
32bit in imaging Lingo) and leave a little room at the edges for
the transparency. Well, I get a crazy amount of streaks here even
when I try to up the trans border by around 24 pixels on each side.
- Using another similiar alpha based image as a mask with
copyPixels and extractAlpha/setAlpha like this... (code is a little
rough here)
newImage = new(#bitmap)
newImage.name = "place_Test"
newImage.image = member("place").image
newAlpha = new(#bitmap)
newAlpha.name = "AHH"
newAlpha.image = image(newImage.image.width + 24,
newImage.image.height + 24, 32)
newAlpha.image.useAlpha = true
newAlpha.image.copyPixels(member("vase").image,
newAlpha.image.rect, member("vase").image.rect)
newAlphaInfo = newAlpha.image.extractAlpha()
newAlpha.image.useAlpha = false
--reverse dark to light
iAlphaReverse = image(newAlpha.image.width,
newAlpha.image.height, 8, #grayscale)
iAlphaReverse.fill(iAlphaReverse.rect, rgb(0,0,0))
iAlphaReverse.copyPixels(newAlphaInfo, iAlphaReverse.rect,
newAlphaInfo.rect, [#ink : #reverse])
--newAlphaInfo.copyPixels(iAlphaReverse, newAlphaInfo.rect,
iAlphaReverse.rect, [#ink:#subtractpin])
newAlphaMask = iAlphaReverse.createMask()
rescaleAbs(newImage, newImage.image.width,
newImage.image.height, "place_Test", 32)
destImage = member("place_Test").image.duplicate()
destImage.fill(destImage.rect, rgb(0,0,0))
newAlpha.image.useAlpha = false
destImage.copyPixels(newImage.image, newImage.image.rect,
newImage.image.rect, [#maskImage:newAlphaMask, #ink:#add])
destImage.setAlpha(iAlphaReverse)
destImage.useAlpha = true
member("place_Test").image = destImage
I apologize for the messy code. I have cut and pasted from
all over the place and am getting confused. In any case, I think I
am making this harder then it needs to be and hope someone can
help.
Thank you in advance,
DaveHi, you can try using other texture layer as mask on the same
shader. As usually you create the texture from a dynamic loaded
image, then apply this texture to the shader on the texture list
index 1 (textureList[1]). Next part does the job, create other
texture from a 32 bits image with the alpha information and fill
all pixels with white color, this is very important because the
second texture layer will be multiply with the first texture layer.
This texture set its render format to rgba8888. Apply the mask
texture to the same shader at texture list index 2, verify that the
blendFunctionList index 2 is #multiply.
I include the code of a project that use this masking
approach:
property pMember
property pEarthSphere
property pNightSphere
property pLastTransform
on beginSprite me
pMember = sprite(me.spriteNum).member
me.setupWorld()
end
on setupWorld(me)
pMember.resetWorld()
repeat with i = pMember.light.count down to 1
pMember.deletelight(i)
end repeat
vEarthModelResource = pMember.newModelResource("EARTH MODEL
RESOURCE", #sphere)
vEarthModelResource.radius = 50.000
vEarthModelResource.resolution = 20
vEarthTexture = pMember.newTexture("EARTH TEXTURE",
#fromCastMember, member(3,1))
vEarthShader = pMember.newShader("EARTH SHADER", #standard)
vEarthShader.emissive = color(255,255,255)
vEarthShader.flat = TRUE
vEarthShader.transparent = FALSE
vEarthShader.textureList[1] = vEarthTexture
pEarthSphere = pMember.newModel("EARTH MODEL",
vEarthModelResource)
pEarthSphere.shaderList = vEarthShader
vNightModelResource = pMember.newModelResource("NIGHT MODEL
RESOURCE", #sphere)
vNightModelResource.radius = 50.2000
vNightModelResource.resolution = 20
vNightTexture = pMember.newTexture("NIGHT TEXTURE",
#fromCastMember, member(4,1))
vNightTexture.quality = #lowFiltered
vNightTexture.nearFiltering = FALSE
vNightTexture.renderFormat = #rgba8880
vNightShader = pMember.newShader("NIGHT SHADER", #standard)
vNightShader.emissive = color(255,255,255)
vNightShader.flat = TRUE
vNightShader.transparent = TRUE
vNightShader.textureList[1] = vNightTexture
vMaskNightTexture = pMember.newTexture("MASK NIGHT TEXTURE",
#fromCastMember, member(6,1))
vMaskNightTexture.renderFormat = #rgba8888
vNightShader.textureList[2] = vMaskNightTexture
vNightShader.textureModeList[2] = #wrapPlanar
pNightSphere = pMember.newModel("NIGHT MODEL",
vNightModelResource)
pNightSphere.shaderList[1] = vNightShader
pNightSphere.parent = pEarthSphere
end
on exitFrame(me)
pEarthSphere.rotate(0.0,0.1,0.0)
me.moveMaskNightTexture()
end
on moveMaskNightTexture(me)
vRotationVector = - pEarthSphere.transform.rotation
pNightSphere.shaderList[1].wrapTransformList[2].rotation =
vRotationVector
end -
error meessage "the procedure entry point _objc_init_image could not be located in the dynamic link library objc.dll" Any suggestions? so I canot open icloud control panel.
i ahve same problem
-
When I boot my computer I get error box stating "The procedure entry point _NSConcreteStackBlock could not be located in the dynamic link library CoreFoundation.dll. I have completely removed iTunes and related programs and reinstalled them several times. Doesn't fix the issue. Any ideas on how to fix this?
You should have one copy of CoreFoundation.dll in C:\Program Files\Common Files\Apple Application Support or C:\Program Files (x68)\Common Files\Apple Application Support if this is a 64-bit Windows.
The detailed file properties should be as shown.
If the file you have is correct check to see if there is another copy in the main iTunes folder. If so delete it and see if that helps.
Otherwise try uninstalling/deleting folders/reinstalling iTunes again. See Troubleshooting issues with iTunes for Windows updates for more details. Your issue looks a bit like it might be a variation of the issue in the first box.
Also worth checking that you have uninstalled the MobileMe control panel and any third party software that might try to talk to iTunes.
tt2 -
2 days ago, I got a message about upgrading to Firefox 4.0. I didn't do it immediately, due to lack of time. Later that day, I tried to open Firfox & got the message: Firefox can't start because xul.dll is missing. Reinstall the program to fix this. I tried several times to open Firefox & got the same result. I tried rebooting. Same result. So I opened Internet Explorer & went to the Firefox website & followed the instructions to download Firefox 4. After that, I used it last night & left my laptop hibernating last night, then continued to use it this morning. Then I closed Firefox. When I next tried to reopen Firefox, I got the new message: The procedure entry point NS_SetDllDirectory could not be located in the dynamic link library xul.dll. Again, I can only access the internet with Internet Explorer. Also, I have a done a good many Windows updates over the last 2 days as well. What can I do to get Firefox to open? Thank you for your help.
This is what I did to resolve this problem. First, I uninstalled Firefox 4 & removed the Firefox folder left behind. I made sure to NOT select the option to delete personal information. Next, I backed up all of the important files on my computer. Next, I upgraded my Windows 7 to Service Pack 1, which was pending in my updates folder. Then, I went to Mozilla's website & downloaded Firefox 4 again, making sure to select only the Firefox browser and not Thunderbird too. http://www.mozilla.org/ When prompted to close any open programs, I closed Internet Explorer (which I had used to get to the Mozilla website) and I disabled my Norton anti-virus. I then completed the installation & it works just fine now. It loaded all of my personal data, such as bookmarks, it remembered my password, etc. It's fine for my needs, as I'm not a heavy user of special add-ons & plug-ins. Some of those may not work yet with the new version.
-
I downloaded the latest version of iTunes on my PC. Now I cannot open iTunes. I receive the following error message: "The procedure entry point AVCFAssetCreateWithByteStreamAndOptions could not be located in the dynamic link library AVfoundationCF.dll" After pressing the "OK" button I receive a second error message: 'iTunes not installed correctly. Please reinstall iTunes. Error 7 (Windows error 127)". I've uninstalled iTunes and reinstalled to no avail. I've also eliminated the temp files (per suggestions on the trouble-shooting page) and no luck. I also tried system restore and that did not fix the problem. Any thougths on a repair?
Taken at face value, you're having trouble with an Apple Application Support program file there. (Apple Application Support is where single copies of program files used by multiple different Apple programs are kept.)
Let's try something relatively simple first. Restart the PC. Head into your Add or Remove Programs control panel, select "Apple Application Support", click "Change" and then click "Repair".
If no joy after that, try the more rigorous uninstall/reinstall procedure from the following post. (Although the procedure is for Vista and 7 and you've got XP, just read "Computer" as "My Computer", read "Uninstall a program control panel" as "Add or Remove programs control panel" and assume the system is 32-bit, and you'll be doing the right things.)
Re: I recently updated to vista service pack 2 and I updated to itunes 10.2.1 and ever since I did that my itunes won't open any more. Itunes starts but before anything loads a
Maybe you are looking for
-
My computer has died and will not be working ever again. Problem is, i have all of my songs on that computer in my itunes library as well as on my phone. Now i want to add some songs to my phone from some new cds and it tells me i will loose all my s
-
Using a dll in the JNI dll defined
Hello, I'm new to JNI and I have managed to compile and run a simple Hello world program, now this is my problem: The C++ code I'm using need to make calls to some dlls (msado15.dll and cdoex.dl) so that I have a function doing this (I have tested th
-
Plugged in iPhone to update, now MBP won't boot up
I have a MBP Unibody (late 2008) running OS 10.5.8 and a 3G iPhone - everything was working fine until today when I plugged in the iPhone to update to OS4.1 - iTunes wouldn't open and gave me a weird message about installing a new version. Tried agai
-
Skype for Business client not responding after audio/video/screen sharing
Hi Everyone, I have a strange situation in my organisation. We have more than 200 clients and we are using Lync 2013. When Skype for Business (SFB) came out I tested it and found one problem - every time when I trying to make a audio or video call or
-
OEM in Linux and Unix Memory difference on Deployed OC4J Container
I have 2 Oracle 9iAS environments 1 each for production and test. My Prod servers are on AIX (Unix) My Test server is on Linux Under Enterprise Manager If I create an OC4J container exactly the same in both and deploy an application exactly the same