Search the Community

Showing results for tags 'dll'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • DAQFactory
    • Alarming
    • Channels, Conversions and general data acquisition
    • Graphing
    • Logging
    • Modbus
    • Networking: web, email, FTP etc.
    • PID
    • Screen Components and User Interface
    • Sequences and scripting
    • Serial Communications
    • General DAQFactory
    • DAQFactory and the LabJack
    • DAQFactory Express
    • DAQConnect
    • DAQFactory New Feature Requests
    • The DAQFactory Guru's Articles
    • DAQFactory Newletters

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 3 results

  1. Hi, i have a problem with struct and dll file. I was loaded successfully when calling a function in dll file. But when i define another struct to use as a prototype for extern dll, and i faild. what wrong with me??? Here is spec of this function in dll:Long BS_ReadLog( int handle, int startTime, int endTime, int* numOfLog, BSLogRecord* logRecord ) with BSLogRecord: typedef struct { unsigned char event; unsigned char subEvent; unsigned short tnaEvent; time_t eventTime; // 32 bits type unsigned userID; unsigned reserved2; } BSLogRecord; Here's my code in DAQ:class BSLogRecord local Event local SubEvent local tnaEvent local EventTime local UserID local Reserved endclass // Read log extern("BS_SDK.dll","long BS_ReadLog(long, long, long, long[1], BSLogRecord[1])", "BSReadLog", "stdcall") Error return: Invalid argument specified.: load Line 27 - Uncaught error in sequence load Please hepl me, many thanks.
  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've run into a problem related to export sets and DLLs. Basically, if I export a certain way after opening a project, then try to call a DLL which writes to a (different) file, the DLL write doesn't work. In fact, lots of other problems arise in DLLs because of this, not just the file writes, but that's the easiest thing to verify. If, however, I simply call the DLL function, it runs and creates the file fine. Only if I export BEFORE calling the function does the problem arise. Again, the files are unrelated. The DLL is not writing to the same file that the export set is writing to. I've attached a very small project which shows this, including a tiny DLL with one function that just writes some text to a file. The project automatically loads the DLL. To see the problem, manually type the following two commands into the Command / Alert window: beginexport(DebugExportSet) fnSimpleDLL() [/CODE] This has to be done RIGHT AFTER OPENING THE CTL. If fnSimpleDLL() was run successfully already, the export doesn't seem to cause a problem for subsequent calls. I included a sequence that shows this, but don't run it directly because somehow the timing of it means it doesn't always show the behavior. To test that fnSimpleDLL() actually does something, [b]close and reopen[/b] the project and just type: [CODE] fnSimpleDLL() [/CODE] You should see "simpledll.txt" show up in the project directory (assuming you double clicked it from explorer. Side note: It's weird that DAQFactory's working directory is different depending on how you open a file. Tough to work around). By the way the DebugExportSet exports to C:\debug.csv, and the specific settings of the export set MAY MATTER. I hope the procedure to reproduce the bug makes sense. I've verified this with two projects, different DLLs, different export sets, and different PCs. It's also holding me up on a much larger project so I'm hoping to get some feedback ASAP. In the meantime I'm trying to work around it by making sure I never export before running my DLL functions. Here's the code for the DLL's function: [CODE] extern "C" SIMPLEDLL_API int fnSimpleDLL(void) { FILE * outfile = fopen("simpledll.txt", "a"); fprintf(outfile, "Hello\n"); fclose(outfile); return 42; } [/CODE] DLLProblem.zip