Creating A D DLL For Use By VB

James Dunne james.jdunne at gmail.com
Mon Mar 20 07:28:25 PST 2006


starkweatherr at mchsi.com wrote:
> It doesn't appear that the zip file is accessible. A working sample is just what
> I need. Can you post the code un-zipped?
> 
> The reason why I a using implib is that is the way the demo app does it. The
> code I am using came with the DMD package, and works as long as I run it from
> test.exe. If there is a better way, that is exactly what I am looking for.
> 
> The reason why I am not using EXPORTS in the .def files is the error messages
> that produces. There is something wrong there also, and I have no idea what that
> problem is either.
> 
> I'm not worried about the VB side. Maybe I should explain the project.
> 
> I've been writing bare frameworks for using DLLs generated by various C/C++
> compilers from VB for upload to PSC. So far I have finished VC++ 6 and BCB 5.5.
> Someone who saw the code suggested that I write one for DMC, which I had never
> heard of before. That effort is still awaiting a response to questions in the
> Command Line forum on the DMC side. Similar problems, different language.
> 
> I noticed 'D' while I was trying to get DMC to work and decided to give that a
> try. It has been really frustrating to try to put together what is in the
> documentation with the demo app that comes with DMD, especially since that has a
> typo in it.
> 
> I would appreciate any help that I can get, but this is a one time thing for me.
> Once I get a working framework, I'll never look back.
> 
> Thanks for your help.
> 
> 

The ZIP is accessible, just not through the crappy web interface 
provided at digitalmars.com.  Read with a real newsgroup reader, like 
Thunderbird and you should be fine.  I'll attach the extracted code here.

Derek Parnell's response's code is extremely similar to mine.  Both 
approaches seem to work.

BTW, what is PSC?  ... and why are you using that abortion of a language 
called VB? =P

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/MU/S d-pu s:+ a-->? C++++$ UL+++ P--- L+++ !E W-- N++ o? K? w--- O 
M--@ V? PS PE Y+ PGP- t+ 5 X+ !R tv-->!tv b- DI++(+) D++ G e++>e 
h>--->++ r+++ y+++
------END GEEK CODE BLOCK------

James Dunne
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: compile.bat
Url: http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20060320/d95695fe/attachment.diff 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dll.d
Url: http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20060320/d95695fe/attachment-0001.diff 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mylib.d
Url: http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20060320/d95695fe/attachment-0002.diff 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mylib.def
Url: http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20060320/d95695fe/attachment-0003.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestMylib.xls
Type: application/vnd.ms-excel
Size: 23552 bytes
Desc: not available
Url : http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20060320/d95695fe/attachment.xls 


More information about the Digitalmars-d-learn mailing list