gkimsey

Members
  • Content Count

    25
  • Joined

  • Last visited

Community Reputation

0 Neutral

About gkimsey

  • Rank
    Member

Profile Information

  • Gender
    Male
  1. gkimsey

    Unable To Load Dll (Custom Dll)

    Absolutely correct -- thanks! C++ runtimes weren't my only problem, but they were the biggest one. For the next person with this problem: I got a bit of a red herring from the Dependency Walker because it complained of mismatched CPU types on modules. Apparently you should use the x86 version of Dependency Walker when looking at a 32-bit DLL (even when on a 64-bit system), or this type of thing happens. Thanks again for getting me out of DLL hell!
  2. I'm trying to load a DLL using extern(). This is a known good DLL as I have this same project running on 3 systems (one Win7, two Win8) without issue. For some reason I get the "Unable to load DLL" error on this 4th system. At first I thought I might have some permissions / UAC issue, as that's bit me before on a new PC, but I disabled UAC, installed as administrator, ran as administrator, and even tried the XP compatibility mode to no avail. The file path is OK, because I can copy and paste the path it says it couldn't load ("C:\Users\..\..\myDll.dll") into a Run... dialog such as "notepad [path]" and it'll pull it up. Any ideas? Clearly this has to do with file paths or permissions somehow but without more information than "unable to load" I'm having a hard time narrowing it down. My next step is to dig up the Visual C++ solution for the DLL and run it in debug mode, but that's a lot of installation and setup that has a decent chance of ending in VC++ never getting called at all, which won't tell me much. I'm also going to try a simple version of the load in a different project with an easy file path and see what that gets me. Taking all suggestions here. Thanks.
  3. I'm using the tree list component extensively in my project. I have just discovered that if the list is long enough to make a vertical scroll bar, that scroll bar behaves strangely towards the bottom of the list. I've attached a sample project which sort of replicates my main problem. The tree is filled by the auto-start sequence. Scroll down so that item 16 is the one shown at the bottom of the list. Then try to scroll further down with the down arrow. It doesn't work and stays in the middle. In this sample, you can sort of get past it by dragging the scroll bar, but in my project I run into cases where that's not a possible workaround. While I'm on the tree list, is there any chance of getting a single click event or a function that allows me to programmatically set the selected item (and highlight accordingly)? Or a function that will retrieve the item handle from an index? (As it stands, for instance, I have no way to reorganize the default tree elements because I can't get their handles, so I'm forced to clear the tree every time unless I saved everything off from InsertItem calls) tree-list-problem.ctl
  4. I'm having trouble in my project when reading some channels in a sequence at load time. The Channels are set up, but none of the A to D channels are set to read automatically (I just want to read at specific times). Basically when my init sequence runs I get an error such as "Request made on pin not properly configured for analog/digital". The sequence contains about half a dozen Read() commands on various inputs and an assortment of digital output settings. Now, since the initialization sequence failed I'll restart it manually, and get similar results but it gets a few commands further before giving an error. I'll do it again, and everything seems to go fine but one of my digital outputs is in the wrong state (always the same one). Then, running it a 4th or 5th time, everything goes fine. This only happens when the LabJack hasn't been used since being plugged in (i.e. I can restart the whole project after it works and it'll work the first time). The biggest problem I have is that I can't even catch all of these issues with OnAlert (to fully automate the retry process). On the last time through an output is in the wrong state so I get no alert. Why does it take so many attempts to get this working? I have a debug/testing project I set up with the same Channel list as my main project. This other one DOES automatically poll certain channels. When I plug in the LabJack while it's running I get the similar "Request made on pin not properly configured for analog/digital" errors for several reads before they go away. The issue seems to be based on the number of attempted reads rather than real time. I.e. in the first example if I wait a full minute between retries it still takes 4 or 5 times through my init sequence. If the failed reads aren't something I can fix altogether, I need some way to programmatically get to the point where all my I/Os operate as expected, and to know for sure that I'm there.
  5. Sure enough, that was it. Thanks. Not sure why I would name it that way -- just confusing myself.
  6. While trying to recover from the issue in this thread: http://www.azeotech.com/board/index.php?/topic/4886-channels-were-deleted-after-open-in-trial-mode/page__hl__+trial%20+version#entry17127 I exported (working) LabJack channels from a backup project and imported them into the main one. The list gets populated correctly and everything looks fine, but when read the A to D channels show an integer value. Looks like the automatic conversion to floating point volts isn't happening. If I add the channels one at a time manually they behave normally, so that will work for the time being. Attached is the channel export and a screenshot of the table. (renamed the channels to .txt to allow upload) lt-channels.txt
  7. I just had a similar issue. I was editing sequences on my main project, and unknowingly didn't have the hard key installed, but I didn't get the message to re-insert it. Obviously I was saving the project occasionally as I made edits. When I reloaded the project, all but 10 of my channel definitions were gone. There wasn't any warning about the license. I only noticed it because when I finished my sequence edits I saw a bunch of disabled UI elements on one of my pages. Luckily I have a backup file with the channel list so I'll export/import that, but I'm worried I lost something else or something I changed since making the backup. v5.87a Build 1972
  8. Okay, sounds good. I'm actively working on it right now and can't merge changes easily so I'll send it along as soon as I can. Thanks!
  9. Okay, found the problem. Short answer: You were right, permissions issue. Background for the next person who runs into this: I discovered that DAQFactory was writing the registry variables to a virtualized registry location, but Windows apparently wasn't redirecting it there for the subsequent "read" (because it failed to read it back). Turns out it was doing this because I didn't properly install DAQFactory as an administrator. This is one of those Windows Vista-and-later gotchas related to User Account Control (UAC). Even if you're an admin, if you don't right-click and use "Run as Administrator" AND you still have UAC enabled, you're not "really" running as an administrator. This results in DAQFactory.exe being installed with reduced permissions, which subsequently means it doesn't access the registry the same way. So the solution is easy: Reinstall with admin privileges. Two suggestions for DAQFactory updates: 1) This can't be an unusual problem. I didn't have the issue on my Windows 7 machine because I had UAC turned off before I installed DAQFactory, but this probably can't be relied upon. Maybe the installer can verify full admin permissions before allowing the install to go forward. It does say "must be installed by an administrator," but that was technically true when I encountered the problem. 2) In order for the "virtualized registry" to have worked for writing the registry entry but NOT for reading it, it seems like there may be some discrepancy between them internally. Maybe some older/newer APIs being mixed or something.
  10. OK, so there's not a way to flush it out of the project file? When it's just me using the project I can easily enough ignore the error, but other users will be confused by it and think something is genuinely wrong. Can I catch or hide it some way?
  11. See the attached test project. By running the RegistryWrite sequence and then the RegistryRead sequence, "Registry Test" should appear in the Alert window. Works for me on Windows 7 but not on Windows 8. I'm running as administrator on both. Can you guys replicate this? regtest.ctl
  12. gkimsey

    Help! Strange Bug With Export + Dll File Write

    More updates: It occurred to me after typing up the last bit that on my Windows 7 machine I have the CTL file's directory added to the system PATH (which I'm convinced shouldn't be necessary, but apparently I'm wrong), and on the Windows 8 machine I didn't. Adding it fixed the crash with delayed load. Hope this helps somebody. I don't consider it a great solution but it's a way to force Windows to use its full search path.
  13. gkimsey

    Help! Strange Bug With Export + Dll File Write

    Update on this: The DELAYLOAD linker option is still working around the problem on Windows 7, but after moving to Windows 8 it causes a crash. I've verified that the error is that it can't find the module, and I'm fairly certain at this point that it's the delayed load causing a more catastrophic error (instead of DAQFactory catching the problem). Not sure how I'm going to get around this yet, but it all still goes back to DLLs not being found despite being in the same directory as the CTL file, so any ideas are welcome.
  14. I get the error: "Unable to initialize Com9: Can't access port, probably in use by another app" But I'm no longer trying to use a serial port (I was a long time ago when working on this project). I'm not sure where the error is coming from (or rather, why DAQFactory is trying ot initialize Com9 at all). Under "Device Configuration..." I don't see any custom device I created. When in safe mode if I do "Delete Comm Device..." there's nothing in the list. Where else should I look? Typically in these situations I would crack open a project's XML or configuration file and search for "com9" but it doesn't looke like I can do that with .CTL files. Another topic sort of talks about this here, but it's regarding how to keep the error message from showing up when legitimately using a COM port, which I'm not (or don't want to be). http://www.azeotech.com/board/index.php?/topic/4366-how-to-avoid-error-message/page__hl__%2Bcan%26%2339%3Bt+%2Baccess+%2Bport
  15. I have a pretty straightforward File Save Dialog in a quick sequence. Code looks like this: private string fileName = file.FileSaveDialog(g_log_filename,"","*.csv","CSV Files")[/CODE] where g_log_filename is an existing global string containing the full path to a CSV file. But when the dialog comes up I don't see existing files with the CSV extension in the directories I'm working through. I thought the filter might be wrong, but "*.csv" is exactly what tooltip example has in it. How do I fix this? Also, at the bottom of the dialog where you can choose "Save as type..." from a dropdown, there is usually some random text from one of my scripts stuck in there somehow. I'm guessing the FileSaveDialog doesn't actually use the Save As Type, but it'd be better if it only showed *.csv. See attached screenshot. OS is Windows 7.