From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

General Protection Fault at 0x0000000 when function from DLL calls a separate function in a static library

Hello,

 

I'm a first time poster, and progarmming novice, so go easy on me.

 

I get the fault mentioned above whenever my function running from a DLL I created makes a call to another function in a static library (that I also created).

 

Everything compiles and links just fine with no warnings.

 

Also, thinking that maybe the function from the static library might be buggy, I confirmed that I can call it up directly from my executable with no problems.

 

I can't for the life of me figure out what is going wrong.

 

Background info: LabWindows CVI 2009, version 9.1.0, running in Windows 7.

0 Kudos
Message 1 of 3
(4,249 Views)

Well, after a log of tinkering by way of commenting in/out code, I figured out that it is because the DLL function apparently doesn't like to pass the new line character to the static library function as "\n".  I didn't have any problems with this when calling the function from my exe.  Any thoughts as to why?

0 Kudos
Message 2 of 3
(4,246 Views)
Are you sure that calling function and the function it calls both compiled with the same "compiler compatibility" and "calling convention" settings?

It will also help people if you can send the lines of code that cause the problem.
S. Eren BALCI
IMESTEK
0 Kudos
Message 3 of 3
(4,237 Views)