| 
 PureBytes Links 
Trading Reference Links 
 | 
Hi,
Can someone tell me what I'm doing wrong here.  I have a DLL created in C
and when I call it I get the following error.  This is a simple dll I'm
using as a test case that calls the arcsine function from the C library
(also listed below). I'm using TS2000i...
Thanks,
Dewey
***************begin error message********************
Exception code: C0000005 ACCESS_VIOLATION
Fault address:  607CE9BD C0100:62AA4167
Registers:
EAX:04302CEC
EBX:00000000
ECX:00657CBC
EDX:00000000
ESI:006505A4
EDI:00000000
CS:EIP:016F:607CE9BD
SS:ESP:0177:009FE8BC  EBP:04302CD0
DS:0177  ES:0177  FS:46D7  GS:0000
Flags:00010206
Call stack:
Address   Frame     Logical addr  Module
607CE9BD  04302CD0  0000:00000000 
***************end error message********************
*************Easy Language Calling function***************
Input: x(Numeric);
DefineDLLFunc: "TSMATHLIB.DLL", float, "ASIN", float;
IF x >= -1 and x <= 1 Then Arcsine = ASIN(x)
	Else ArcSine = -2;
*************End Easy Language Calling function***************
***************Begin C code******************
//DEF File
LIBRARY    TSMATHLIB
DESCRIPTION "Contains math fucntions for Trade Station"
EXPORTS
	ASIN		@1
	ACOS		@2
//header file
float __stdcall ASIN(float x);
float __stdcall ACOS(float x);
//cpp file
	
float ACOS(float x) {
	
	return (float)acos(x);
}
	
float ASIN(float x) {
	
	return 1.0; //(float)asin(x);
}
***************end C code******************
 |