Get the 1097 error when trying to call a Labview DLL

I had to write a wrapper DLL to use some functions in the DLL to a third party, and I'm having a few problems. I created an executable to test my code and it works fine, but when I try to execute the same function in the DLL that I created in Labview, I get error 1097. I read through most of the posts on this forum about this issue, but none of the proposed solutions are working for me. I'm sure this isn't a question of transfer settings to COLD LAKE because I changed the function so it only accepts a single entry (a number he obtains from a Subvi, which came from the third-party DLL, this entry is working with a bunch of other functions, so I don't think that is the question).

I have attached the C code that creates the wrapper, but I don't know how it is useful without familiarity with the functions of the original DLL. I hope that someone can spot something basic I am out of my code, but please let me know if I need to call something else.

I use a Labview 32 bit version 2012 on a 64-bit Windows 7 computer.

Thanks in advance for any help!

You should read the documentation on LoadLibrary() and understand. Essentially if you provide a full path to LoadLibrary() the DLL MUST be present at this place so that LoadLibrary() will succeed. If you pass only the name Windows DLL will ONLY search in these places:

(1) if the module (the DLL) is already loaded it will return a handle to the loaded module and increment its reference count

(2) if the referencing module contains a manifest (either incorporated into the image module or in a separate manifest file in the same directory as the executablemodule) specyfying a version number for this DLL will load this DLL with this version of the SxS (side by side) location and failure if it is not present

(3) if the executable load contains a manifest (either incorporated in the executable file or in a separate manifest file in the same directory as the executable file) number specyfying a version for this DLL, it will load this DLL with this version of the location of SxS (side by side) and fail if it is not present

(4) it will search for the DLL in the same directory as the directory where the current image of the process is loaded. It is NOT the directory of the DLL loading the DLL, BUT the directory where the EXE file from which the process was created.

(5) in the system directory

(6) in the Windows directory

(7) any directory in the PATH environment variable

(8) the path of current directory which is a location managed by windows by process and changed the two explicitedly when the application calls the API SetCurrentDirectory() but also implicitedly by things like the file selection dialog whenever it is rejected by other means than the undo operation.

Essentially putting your dependend DLL in the same directory as the wrapper DLL does NOT work when you use the name of the DLL only UNLESS you place the two DLLs in the same directory as your executable file. If you don't want this restriction and want to be able to move these modules together in different directories, you don't have to create the correct path in your wrapper to LoadLibrary(). Basically, you must have the code to determine the location of your DLL wrapper path and then strip her own name and add the DLL name wrapped in it and then move to the LoadLibrary().

There are several ways to determine the path of the current module. The simplest if you don't mind having the name hard-coded in your code DLL would be to ask GetModuleFileName (GetModuleHandle ("yourDLLname"), buffer, size).

Tags: NI Software

Similar Questions

  • Get the following error when trying to install adobe reader in Windows 10... "the file 'C:\ProgramData\Adobe\Setup\{AC76BA86-7AD7-1033-7B44-AC0F074E4100}\AcroRead.msi' is not a valid package for the Adobe Reader XI product... How can I fix it

    Get the following error when trying to install adobe reader in Windows 10... "the file 'C:\ProgramData\Adobe\Setup\{AC76BA86-7AD7-1033-7B44-AC0F074E4100}\AcroRead.msi' is not a valid package for the Adobe Reader XI product... How can I solve this problem? Thank you.

    Hi JFO58,

    I recommend you to run on your system cleaning tool:Download Adobe Reader and Acrobat tool - Adobe Labs

    Later, try to install reader again by using the following link: Adobe Acrobat Reader DC install for all versions

    Kind regards
    Rahul

  • Get the 8008 error when trying to watch Netflix and you are prompted to install Silverlight

    Hey everybody,

    Whenever I try to watch netflix error n8008 arises, which is related to silverlight. It is not a specific problem of the browser, I uninstalled silverlight and now whenever I try to watch a video I am prompted to install silverlight again and always, the installation fails. Any help would be greatly appreciated.

    Thank you!

    Hello

    1 did you changes to the computer before the show?

    2. When was the last time it worked?

    3. what version of IE are you using?

    I suggest you follow these methods and check.

    Method 1: Run the Silverlight uninstall program to remove settings from registry of Windows Installer and then reinstall Silverlight.

    To do this, please visit this link:

    How to clean a facility damaged Silverlight and then reinstall Silverlight?

    http://support.Microsoft.com/kb/2608523

    Registry warning: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see this link: http://windows.microsoft.com/en-US/windows7/Back-up-the-registry

    See if that helps you to uninstall Silverlight on the computer. If you have managed to uninstall Silverlight, see the Web page below, and download the latest version, play Netflix and check if you receive the error message.
    http://Silverlight.net/GetStarted

    Method 2: Check the suggestions from the link next and if they help.

    http://support.Netflix.com/en/node/69

    I hope this helps!

  • I get the folling error when trying to install Illustrator;

    Exit Code: 6 Please see specific errors below for troubleshooting. For example,  ERROR:   -------------------------------------- Summary --------------------------------------  - 0 fatal error(s), 2 error(s)    ----------- Payload: Microsoft Visual C++ 2012 Redistributable Package (x64) 11.0.61030.0 {3E272A93-C06B-4206-AD02-0EBE02535E20} -----------  ERROR: Third party payload installer vcredist_x64.exe failed with exit code: -2147024546  ERROR: Failed to install Microsoft Visual C++ 2012 Redistributable Package (x64). Please try installing it by double clicking on the executable at "C:\Users\alex\AppData\Local\Temp\{F986ADC4-976D-4AF0-9824-04813BD31AEF}\Illustrator_18_LS20_win64\Adobe Illustrator CC 2014\payloads\Microsoft VC 2012 Redist (x64)\vcredist_x64.exe", or download and install the latest Microsoft Visual C++ 2012 Redistributable Package (x64) from Microsoft website - www.microsoft.com  ------------------------------------------------------------------------------------- 

    Exit code: 6, Exit Code: 7 Installation error - http://helpx.adobe.com/creative-suite/kb/errors-exit-code-6-exit.html

    The problems with the Setup logs. CS5, CS5.5, CS6 - http://helpx.adobe.com/creative-suite/kb/troubleshoot-install-logs-cs5-cs5.html for more information on how to review your Setup logs

  • Get the network error when trying to install quick time

    Try to install Quck time for i - pod and receiver: network erro whi. e try to read C:\WINDOWS\Installer\QuickTime.msi

    Hello

    Try the steps listed in the link below: trouble installing iTunes or QuickTime for Windows: http://support.apple.com/kb/ht1926

    QuickTime: Windows troubleshooting tips: http://support.apple.com/kb/TA44469?viewlocale=en_US

    For more assistance, you can post your request in the Apple forum: http://www.apple.com/support/quicktime/

  • error 14001 itunes not installed correctly, get the Assembly error when you try to reinstall

    installation iTune error

    I tried to install iTunes for the past few days, I have an old one that I have to adjust that give me and error when you try to open "itunes is not installed correctly. "Please re install itunes error 7 (windows error 14001)" so I try to install the new I adjust 10.5 and I get this message

    "a mistake occrred in the installation of the Assembly microsoft.vc80.crt, type is"win32", version +"8.0.50727.6195".publickeytoken ="1fc8b3b9a1e18e3b".
    processorArchitecture = "x 86". See Help and support for more information. HERSULT:0X800736FD ".
    I get very frustrated because I need I tunes to get into my new i pod. I looked for solutions on apple, but nothing came.
    also, I get this error when I try to install the new QuickTime 7.7.1, tried to uninstall itune and whatever it takes like I said here: http://support.apple.com/kb/ht1925, but still, I get the same error when trying to install everything back. I read, you can resolve this error by installing each update Windows but my windows updates also give me an error when I check updates saying ' an error occurred while searching for new updates for your computer or errors found: update code 80080005 windows has encountered an unknown error. " Can someone help me please. I get very frustrated by that. Thanks in advance

    Hello

    I suggest you to return these KB articles and check if it helps.

    http://support.Apple.com/kb/TS3074

    http://support.Apple.com/kb/TS3074

  • I get the following error when I am trying to connect to a network by using different credentials. 1219 system error has occurred.

    Multiple connections to a server or resource shared by the same user

    I get the following error when I am trying to connect to a network by using different credentials.

    1219 system error has occurred.

    Multiple connections to a server or a shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again...

    I don't want to use the IP address. and I don't want to delete all connections using the net use * / delete command.

    Kindly give me the solution as I am now frustrated with this issue.

    Kind regards

    Sajid

    Hello

    ·         Have you tried to access the files that were on Skydrive?

    ·         Did someone else uses your computer?

    From now on, I suggest you try the steps mentioned in the article below.

    Error message when you use user credentials to connect to a network from a Windows computer: "the specified network folder is currently mapped using a different username and password.

    http://support.Microsoft.com/kb/938120

    You can also ask your question in the forum of the Tech Net Windows Server using best.

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer

    Hope this information is helpful and let me know if you need additional assistance.

  • I get a "server error" when trying to submit a form.

    Hello

    I get a "server error" when trying to submit a form. I used this email address on other forms on this site before with no problems, and double checked the PHP status using ' /scripts/form_check.php and everything checked ok. The site is www.putnewaonthemap.com. I recently made changes on the site and the information on the form changed, and I don't know what I did or did not. Sending the form works fine when using Business Catalyst to test, but now that I have downloaded to the fhp, I get the error. Any help would be appreciated.

    Thank you!

    Shelly

    I checked the submission of the form and it works, I think that the problem is solved.

    Thank you

    Sanjit

  • I get the following error when I turn on my computer ' C:\Program data\f10a0075-c31f-4c3d - 9 c 66 - 6aa39dd52db1.dat.

    Original title: rundll error

    I get the following error when I turn on my computer.  I am running VISTA with service pack 2.

    C:\Program data\f10a0075-c31f-4c3d - 9 c 66 - 6aa39dd52db1.dat
    Thanks for the help.

    Hello

    To remove the error message if still there after the controls above to malware.

    How to troubleshoot a problem by performing a clean boot in Windows Vista
    http://support.Microsoft.com/kb/929135
    How to check and change Vista startup programs
    http://www.Vistax64.com/tutorials/79612-startup-programs-enable-disable.html

    Autoruns - free - see what programs are configured so that it starts automatically when
    your system boots and you connect. Autoruns also shows you the complete list of the registry
    and where applications can configure Auto-start for the files settings.
    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • get the fatal error when you try to start Windows 7 Easy Transfer...

    get the fatal error when you try to start Windows 7 Easy Transfer... what should I do?

    Hello Jo,.

    Thanks for posting your question on the Microsoft community.

    We need more information about the issue so that we can help you better.

    What is the full error message or code when you say, ""getting fatal error when you try to start Windows 7 Easy Transfer? '"

    Thank you for details on the issue.

    This problem may occur because of damaged or missing Windows files.

    I suggest you run the system file checker (SFC) and see if it helps.
    Reference:
    Use the System File Checker tool to repair missing or corrupted system files
    https://support.Microsoft.com/en-us/KB/929833

    System File Checker is a Windows utility that allows users to find corruptions in Windows system files and restore the damaged files.

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

  • I get the A12E5 error when I try to install Lightroom 6. What is the cause?

    I get the A12E5 error when I try to install Lightroom 6. What is the cause?

    Mac or Windows and EXACTLY what version of the operating system?

    Recent Mac AND Windows operating systems have been known to cause problems "weird."

    A12... Download & install error http://forums.adobe.com/thread/1289484

    -A12... discussion http://forums.adobe.com/thread/1045283?tstart=0

  • I get the following error when I try to log in to photoshop: error: 150:30

    I get the following error when I try to log in to photoshop: Error: 150:30, please advise on how to correct this problem.

    Thank you!

    Kel

    Hi Kelly,

    Please follow error "Licensing has stopped working". Mac OS

    Kind regards

    Sheena

  • Get the 101 error when I try to download the trial version

    Hello

    Get the 101 error when I try to download the trial version

    Thank you Kris

    Adobe Download Troubleshooting Wizard

    Direct download links for Adobe software

    Mylenium

  • Get the 43 error when you try to update creative cloud.

    Whenever I try to update the creative cloud application, it sticks to 71% and it shows an error reading "Installer could not access a critical file. Please try to reinstall. (Error code: 43). "I tried several times and even after a system restart and a permissions repair, I get the same error. Any suggestions?

    I went through the towers with chat support on this issue. I'll list the steps and also the chat session, we had here:

    Steps to follow:

    1. Open the activity monitor and close Adobe all related applications
    2. Navigate to: / Library/Application support/Adobe
    3. In this directory, you will see a folder named OOBE - rename this folder in OOBEold
    4. Navigate to: MAC HD/Applications/Utilities directory
    5. There, you will see a folder named "Adobe Application Manager" - remove
    6. Download Adobe here cleaning tool: http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems/_jcr_conte nt/main-pars/accordion_container_1/accordion-par/accordion-item-1/accordion-item-par/proce dure/proc_par/step_3/step_par/download/file.res/AdobeCreativeCloudCleanerTool.zip
    7. Open the cleaning tool and choose to clean 'Creative cloud' only.
    8. Download and install Creative new Cloud - https://ccmdls.adobe.com/AdobeProducts/KCCC/1/osx10/CreativeCloudInstaller.dmg

    Support Chat session:

    Please contact Adobe.
    A representative will be with you shortly.

    You are chatting with "Amel" now

    Amel: Hello. Welcome to Adobe Technical Support.

    Amel: Hi Josiah.

    Josiah Wallingford: Hello

    Amel: I received your request. Allow me a moment to check your account and review the details of your request.

    Amel: Thank you for your stay online.

    Amel: I understand that you can not update the creative Cloud desktop application you receive error code 43. Is this correct?

    Josiah Wallingford: that's right

    Amel: Thanks for the confirmation of the issue. I'll be happy to check and help you with that.

    Amel: Can I know the exact error message you are getting when trying to update the product?

    Amel: I know the exact error message full you get while trying to update the product? *

    Josiah Wallingford: I'll have to run a second time to get the error. One moment

    Amel: sure.

    Josiah Wallingford: Installing update... 71% Installer could not access a critical file. Please try to reinstall. (Error code: 43) Contact Customer Support

    Amel: Thanks for the information.

    Amel: Josiah, let's try doing some troubleshooting steps. Lets work together to solve the problem.

    Josiah Wallingford: sounds good amel

    Amel: Leave the desktop application CC, close all Adobe activity monitor process, he raises and try to update.

    Josiah Wallingford: I already did with the latest technology... Gave us the same error

    Amel: Please open Finder > go > utilities > Activity Monitor.

    Amel: Okay.

    Josiah Wallingford: after we tried we were disconnected

    Amel: Thanks for the information, Josiah

    Amel: Again please close all Adobe applications, including desktop application Cloud creative of the activity monitor.

    Josiah Wallingford: OK

    Josiah Wallingford: OK done

    Amel: Rename then Adobe Application Manager, OOBE folder.

    Amel: Open Finder > go > go to folder > / type library > Application support > Adobe folder.

    Josiah Wallingford: OK

    Amel: Please let me know if you have trouble locating the records.

    Josiah Wallingford: I found it

    Amel: great.

    Josiah Wallingford: now what?

    Amel: Rename another OOBE folder

    Amel: Go to Finder > go > go to folder > Type ~/Library > Application support > Adobe folder.

    Josiah Wallingford: I'm in this folder. I see a folder called "OOBE". What you want that I rename it to?

    Amel: OOBE and rename it OOBEold.

    Amel: Yes, you are right.

    Josiah Wallingford: done

    Amel: After that, delete the application Adobe, creative MAC HD cloud file manager > Application > utilities.

    Josiah Wallingford: done

    Amel: Now let's start cleaning tool. I'll give you the link to download the cleanup tool...

    Amel: Please click here.

    Amel: Double-click AdobeCreativeCloudCleanerTool.zip to extract the

    Amel: AdobeCreativeCloudCleanerTool.dmg.

    Josiah Wallingford: Ok it's open... should I choose "Clean All"?

    Amel: Please choose only creative cloud.

    Amel: If please remove creative Cloud desktop application and try to install the desktop CC application.

    Josiah Wallingford: OK done

    Amel: Now, try to install the desktop CC application.

    Josiah Wallingford: Install it from where?

    Amel: I'll give you the link to direct download for desktop CC applications.

    Amel: Please click here to download desktop cc. applications

    Josiah Wallingford: Is the installation

    Amel: Okay.

    Josiah Wallingford: Ok it's installed... which is the latest version?

    Josiah Wallingford: its not asking me to update any longer

    Amel: Please launch CC desktop applications and see if you are able to see CC 2014.

    Josiah Wallingford: I see them. They are eager to be updated.

    Amel: Please click Refresh.

    Josiah Wallingford: Ok it is updated... looks like it will take some time

    Amel: Okay.

    Josiah Wallingford: I'll get back in touch if I have other questions.

    Amel: of course, I'll keep the case open for your convenience so that you can contact us if you still have the same problem.

    Josiah Wallingford: great. Thank you

    Amel: Your file number is *.

    Amel: You can see the file number to contact again us.

    Josiah Wallingford: Got it. good day.

  • Get the 1077 error when you ask the 8 rows of control Tree with 17 rows

    Is attached a screenshot of part of my app where I asked a tree for the NumRows control and that feed into a loop For and the ActiveItemRowNumber of the same control equal to i. You can see from the probe indicating the tree control has 17 rows, it gave me an error 1077 when I asked for line 8.

    I'm going through all the lines in the tree, looking for a column (column 9) of a matching strings so that I can change the value in another column (7) on the same line.

    Why I get a 1077 error when I put ActiveItemRowNumber to 8 in a tree control where NumRows = 17?

    How to iterate in a column of a tree to the search control in a column of a matching strings?

    Now I understand what you want. Use the tags all property and function of size of table on it.

Maybe you are looking for

  • LaserJet P1102w: HP LaserJet P1102w prints EXTREMELY slow by Wi - Fi

    I was struggling with this problem for a long time, but today it completely freaked me. I was ready to throw this piece of... printer! Problem is simple. When I try to print something wireless with graphics (jpeg or pictures images) to my iPhone, the

  • Driver chipset for A60-122 and Windows XP Pro

    Hi all.I'm trying to upgrade my Satatellite A60 - 122 win XP Home Edition to Win XP Pro.I downloaded the new version of the drivers that I need after the installation of operating system directly from the site, I also download and print the order to

  • I want to turn 'Awesome Bar' Off permenatly

    I followed all the advice in the support forums, but nothing helped. I want to permanently disable, where therwise close feature that remembers web sites.Whenever I have go to tools > Options > privacy and make changes (as never remember history and

  • my not showing the necessity of full length to restore the full length of the flat screen monitor

    I have samsung SyncMaster2032bw monitor on window vista Office ADVENT sunddenly my monitor screen not showing the full lenth on about 2 "screen of short tips on everything to please the application? thanking you Charles

  • DEP on Telechareger Vista installation I Tunes

    When tried to connect I pod touch and I pod computer no longer recognizes the. I tried to uninstall itues, repair of the air etc. with no luck. so now, try to DOWNLOAD i tunes DEP protection comes up.never had a problem before. The last version of i