ptr question

Anfängerfragen zum Programmieren mit PureBasic.
burnix
Beiträge: 4
Registriert: 16.01.2007 18:30

ptr question

Beitrag von burnix »

Hello. Sorry for the english but i dont have response for this question :

http://www.purebasic.fr/english/viewtopic.php?t=25336

I thank you all for your help.
Benutzeravatar
edel
Beiträge: 3667
Registriert: 28.07.2005 12:39
Computerausstattung: GameBoy
Kontaktdaten:

Beitrag von edel »

srod hat geschrieben: ii) Check the calling convention of the library. Your code above is assumning the STDCALL convention, which is fine for Windows system dll's etc. If the library "toto.dll" is a typical 'c' library then you'll probably need to use the CDECL convention. For this use CallCFunction() in place of CallFunction() etc.
burnix
Beiträge: 4
Registriert: 16.01.2007 18:30

thanks, but

Beitrag von burnix »

Thanks, but this is not the solution. The problem was that all the operation executed on the procedure works : i can see the data returned by the dll. But i have error on the end of the procedure.

Do i have to release the handle ????
burnix
Beiträge: 4
Registriert: 16.01.2007 18:30

solution

Beitrag von burnix »

I have found that i i dont use the delete and close function of the dll it works.

Very strange. I think that the datas are store in memory and so are not destructed.

Bizarre.
Kaeru Gaman
Beiträge: 17389
Registriert: 10.11.2004 03:22

Beitrag von Kaeru Gaman »

did you see DeDe's answer?
seems you misspelled the close-call...
Der Narr denkt er sei ein weiser Mann.
Der Weise weiß, dass er ein Narr ist.
burnix
Beiträge: 4
Registriert: 16.01.2007 18:30

solution

Beitrag von burnix »

In fact there is a bug on my use of the dll (because of poor dll doc)

i have to write this

CallFunction( 0, "dll_Close",Handle)

in place of

CallFunction( 0, "dll_Close")

thanks to you (and to a delphi forum were the dll was implemented)
Antworten