First... It's better to put your code between [ CODE ] or [ PASCAL ] tags. It makes your post more readable.

Secondly.. why do you call your thread "I have a problem". I think that violates the "Help me" forum rules. You better use a name like "Cannot transfer a string to a C++ DLL" or something like that.

Okay... your problem:

I'm not a C++ hero, but i think Char* is the not a widechar pointer. You should try to define your function like this:

[pascal]
function GetTexture(const name: pChar):texture; cdecl; external dllname;
[/pascal]

Sometimes.. DLL's use STDCALL instead of CDECL but you should try CDECL first.

Hope that helps