Hello colleagues, good morning.
I'm here today to ask for your help with a small translation of a C header, an interface for the JAWS screen reader.
there are two or three functions, one to pass it a string to make it talk, and the other to make it crash.
I was reading the wiki on how to translate C headers, but I really don't know if I did it right, because I add it to my application, but three or four times of calling the same function, the program crashes, I don't understand why.
I also passed the exe through the GDB but it only tells me that the program is closed normally, when none of that happens in the c++ compilations.
Could you please look at the .bi I wrote and the .h and tell me where I went wrong?
because I'm pretty sure the problem is there.
Here I uploaded the file with the dll and the .bi, the .h, the .lib and the c++ sample that came with what I downloaded.
https://www.mediafire.com/file/oj07wh6e ... i.zip/file
From already thank you very much,
Greetings.
headers in C and freebasic?
-
- Posts: 30
- Joined: Mar 21, 2021 18:22
-
- Posts: 862
- Joined: May 05, 2015 5:35
- Location: Germany
Re: headers in C and freebasic?
Without having tested it, translated to the best of my knowledge:
Code: Select all
#Inclib "jfwapi"
#Ifndef JFWAPI_H_INCLUDED
#define JFWAPI_H_INCLUDED
#Ifndef JFWAPI
#define JFWAPI __declspec(dllimport)
#EndIf
Extern "c"
Declare Sub JFWRunScript (ByVal lpszScriptName As ZString Ptr)
Declare Function JFWSayString(ByVal cadena As ZString Ptr, ByVal bInterrupt As boolean) As boolean
Declare Function JFWStopSpeech() As boolean
End Extern
#EndIf
-
- Posts: 30
- Joined: Mar 21, 2021 18:22
Re: headers in C and freebasic?
Thank you very much mate for your answer, but the same thing keeps happening to me, after calling the function to speak about three or four times, my program crashes.grindstone wrote: ↑Aug 08, 2022 10:56 Without having tested it, translated to the best of my knowledge:Code: Select all
#Inclib "jfwapi" #Ifndef JFWAPI_H_INCLUDED #define JFWAPI_H_INCLUDED #Ifndef JFWAPI #define JFWAPI __declspec(dllimport) #EndIf Extern "c" Declare Sub JFWRunScript (ByVal lpszScriptName As ZString Ptr) Declare Function JFWSayString(ByVal cadena As ZString Ptr, ByVal bInterrupt As boolean) As boolean Declare Function JFWStopSpeech() As boolean End Extern #EndIf