www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DLL Formats?

reply Trevor Parscal <trevorparscal hotmail.com> writes:
OK, I know nothing of the internals of a DLL file.

I get the idea there are different "calling conventions" in them? I need 
to get this FreeType DLL to not give me errors when i try to link it 
(using a derelict style loading process that uses the win32 LoadLibrary 
and GetProc functions)

Windows linkage? C Linkage? Something I don't know I can modify, 
specify.. Anything. I got FreeType compiling to a DLL in MSVC.NET with 
no ZLib, just like I want, I got the import modules, the loader.. I just 
need this last bit, and D will finally get to use FreeType. :)

I hope someone knows more about DLL's than I do. :) I hoped that someone 
would have had a FreeType binding already, but in this stage of this 
language I think that D = Do it youself...

Thanks in advance...

-- 
Thanks,
Trevor Parscal
www.trevorparscal.com
trevorparscal hotmail.com
Jun 04 2005
parent reply Kyle Furlong <ky220 umail.ucsb.edu> writes:
Trevor Parscal wrote:
 OK, I know nothing of the internals of a DLL file.
 
 I get the idea there are different "calling conventions" in them? I need 
 to get this FreeType DLL to not give me errors when i try to link it 
 (using a derelict style loading process that uses the win32 LoadLibrary 
 and GetProc functions)
 
 Windows linkage? C Linkage? Something I don't know I can modify, 
 specify.. Anything. I got FreeType compiling to a DLL in MSVC.NET with 
 no ZLib, just like I want, I got the import modules, the loader.. I just 
 need this last bit, and D will finally get to use FreeType. :)
 
 I hope someone knows more about DLL's than I do. :) I hoped that someone 
 would have had a FreeType binding already, but in this stage of this 
 language I think that D = Do it youself...
 
 Thanks in advance...
 

I was just wondering... why arent you using the Derelict version of this library? From derelict/sdl/ttf.d: /* This library is a wrapper around the excellent FreeType 2.0 library, available at: http://www.freetype.org/ */ Seems like a duplication of effort.
Jun 04 2005
parent reply Trevor Parscal <trevorparscal hotmail.com> writes:
OK, So I got the DLL compiled, got an import module for it, and I am 
loading it dynamicly..

I can call

FT_Init_Library(&library);

and it is sucessfull (well, the function doesn't return non zero wich 
means success) but now I am running into another problem, which I am 
pretty sure has NOTHING to do with D at all...

When I call

FT_New_Face(library, toStringz(path), 0, &font);

That function does fail.

Just thought I would put that out there, but I am going to send this 
problem over to the FreeType newsgroup where they might have a more 
complete knoweldge of these functions..

ALMOST DONE!

Thoughts are welcome. I am posting code tonight

www.dsource.org/projects/terra

Please feel free to download and play with it.

-- 
Thanks,
Trevor Parscal
www.trevorparscal.com
trevorparscal hotmail.com
Jun 04 2005
parent reply Kyle Furlong <ky220 umail.ucsb.edu> writes:
Trevor Parscal wrote:
 OK, So I got the DLL compiled, got an import module for it, and I am 
 loading it dynamicly..
 
 I can call
 
 FT_Init_Library(&library);
 
 and it is sucessfull (well, the function doesn't return non zero wich 
 means success) but now I am running into another problem, which I am 
 pretty sure has NOTHING to do with D at all...
 
 When I call
 
 FT_New_Face(library, toStringz(path), 0, &font);
 
 That function does fail.
 
 Just thought I would put that out there, but I am going to send this 
 problem over to the FreeType newsgroup where they might have a more 
 complete knoweldge of these functions..
 
 ALMOST DONE!
 
 Thoughts are welcome. I am posting code tonight
 
 www.dsource.org/projects/terra
 
 Please feel free to download and play with it.
 

When I try to run the Test.exe, I get a message saying that it cant find MSVCR71D.dll. Why in the world does a D application need this runtime?
Jun 04 2005
parent reply Trevor Parscal <trevorparscal hotmail.com> writes:
Kyle Furlong wrote:
 Trevor Parscal wrote:
 
 OK, So I got the DLL compiled, got an import module for it, and I am 
 loading it dynamicly..

 I can call

 FT_Init_Library(&library);

 and it is sucessfull (well, the function doesn't return non zero wich 
 means success) but now I am running into another problem, which I am 
 pretty sure has NOTHING to do with D at all...

 When I call

 FT_New_Face(library, toStringz(path), 0, &font);

 That function does fail.

 Just thought I would put that out there, but I am going to send this 
 problem over to the FreeType newsgroup where they might have a more 
 complete knoweldge of these functions..

 ALMOST DONE!

 Thoughts are welcome. I am posting code tonight

 www.dsource.org/projects/terra

 Please feel free to download and play with it.

When I try to run the Test.exe, I get a message saying that it cant find MSVCR71D.dll. Why in the world does a D application need this runtime?

library to be included... Maybe it's because I compiled FreeType with MSVC... Those sneaky bastards! I'm gonna get to the bottom of that! In the mean time, See what can be done for exisiting bugs if you will, or find others... -- Thanks, Trevor Parscal www.trevorparscal.com trevorparscal hotmail.com
Jun 04 2005
parent Kyle Furlong <ky220 umail.ucsb.edu> writes:
Trevor Parscal wrote:
 Kyle Furlong wrote:
 
 Trevor Parscal wrote:

 OK, So I got the DLL compiled, got an import module for it, and I am 
 loading it dynamicly..

 I can call

 FT_Init_Library(&library);

 and it is sucessfull (well, the function doesn't return non zero wich 
 means success) but now I am running into another problem, which I am 
 pretty sure has NOTHING to do with D at all...

 When I call

 FT_New_Face(library, toStringz(path), 0, &font);

 That function does fail.

 Just thought I would put that out there, but I am going to send this 
 problem over to the FreeType newsgroup where they might have a more 
 complete knoweldge of these functions..

 ALMOST DONE!

 Thoughts are welcome. I am posting code tonight

 www.dsource.org/projects/terra

 Please feel free to download and play with it.

When I try to run the Test.exe, I get a message saying that it cant find MSVCR71D.dll. Why in the world does a D application need this runtime?

Thats a great question. I don't have any code that specifies that library to be included... Maybe it's because I compiled FreeType with MSVC... Those sneaky bastards! I'm gonna get to the bottom of that! In the mean time, See what can be done for exisiting bugs if you will, or find others...

I probably wont be helping out in the next week, its finals time here.
Jun 04 2005