Seite 1 von 1

ProcedureDLL.s sehr Speicherhungrig ? PB 4.20B6

Verfasst: 20.05.2008 17:17
von SoS
Erstellt eine test.dll

Code: Alles auswählen

Global Antwort.s=Space(256)

ProcedureDLL.s hello(Frage.s)
	Antwort.s="Ich bin hier"
ProcedureReturn Antwort
EndProcedure

ProcedureDLL.l hello2(Frage.s)
	Antwort.s="Ich bin hier"
ProcedureReturn @Antwort
EndProcedure
und benutzt folgendes Programm zum testen und schaut in den Taskmanager wie das Programm wächst und gedeiht.

Code: Alles auswählen

Antwort.s=Space(256)
dll.l = OpenLibrary(#PB_Any,"test.dll")
If dll
	If GetFunction(dll, "hello")
		Frage.l=GetFunction(dll, "hello")
	EndIf
	If GetFunction(dll, "hello2")
		Frage2.l=GetFunction(dll, "hello2")
	EndIf
EndIf

Repeat
Delay(1)
Antwort.s=PeekS(CallFunctionFast(Frage,"?"))
; Antwort.s=PeekS(CallFunctionFast(Frage2,"?"))

ForEver