Fórum Problema ao usar DLL #336704
24/01/2007
0
Bom indo diréto ao assunto Estou desenvolvendo um sistema, e algumas functions estou colocando em dll´s para ficar mais facil de aproveitar o codigo então coloquei a seguinte function em uma dll
library FiltCaracter;
uses
SysUtils, Classes;
Type
TCharSet = set of char;
{$R *.res}
function FiltrarCaract(Source :String; Filter :TCharSet) :String; stdcall;
var
Idx :Integer;
begin
for Idx := Length(Source) downto 1 do
if (Source[Idx] in Filter) then
Delete(Source, Idx, 1);
Result := Source;
end;
exports FiltrarCaract;
end.Éssa é uma função para Filtrar Caracter
Bom eu acho que o erro deve ser algo com o [b:b16daf3381]type[/b:b16daf3381] que eu tive que declarar tanto na dll como no sistema
Eu chamo a dll no systema da seguinte maneira
{$R *.dfm}
function FiltrarCaract(Source :String; Filter :TCharSet) :String; External ´DLL\FiltCaracter.dll´;O erro que está dando é o seguinte
[b:b16daf3381]Access Violation at address 003A3E16 in module ´FiltCaracter.dll´. write of address 005CAC0E.[/b:b16daf3381]
Será que alguem tem como me dar uma Luz? :roll:
Valeu :wink:
Alecsandro Moura
Curtir tópico
+ 0Posts
24/01/2007
Massuda
Gostei + 0
26/01/2007
Alecsandro Moura
Valeu cara :wink:
Gostei + 0
26/01/2007
Massuda
Gostei + 0
26/01/2007
Nightshade
Gostei + 0
29/01/2007
Alecsandro Moura
Como eu faço para instalar essa DLL?
Valeu :wink:
Gostei + 0
29/01/2007
Massuda
Gostei + 0
29/01/2007
Alecsandro Moura
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)