dll's

lee llee at goucher.edu
Sun Jan 14 10:40:46 PST 2007


I'm trying to write a short dll that exports a single function. I used
followed the instructions given in the manual, and produced both a dll file
and a lib file. When I try to import the library into an application I get an
error, however: "The application failed to initialize properly...". I tried
copying the example given in the manual, and I still got the same error. I
then tried executing the dll example application provided in the sample
folder. This also produced the same error.
Attached are copies of the dll source code I'm using. If anyone has any advice
concerning the creation and use of dll's I'd appreciate it.
begin 644 dll_main_function.d
M+R\@=&AE(&9O;&QO=VEN9R!I<R!A;B!E>&%M<&QE(&EM<&QE;65N=&%T:6]N
M(&]F($1,3"=S(&EN($0Z#0H-"FEM<&]R="!S=&0N8RYW:6YD;W=S+G=I;F1O
M=W,[#0I(24Y35$%.0T4@:%]G;&]B86Q?:6YS=&%N8V4[#0H-"F5X=&5R;B`H
M0RD-"GL-"@EV;VED(&=C7VEN:70@*"D[#0H)=F]I9"!G8U]T97)M("@I.PT*
M#0H)=F]I9"!?;6EN:70@*"D[#0H)=F]I9"!?;6]D=6QE0W1O<B`H*3L-"@EV
M;VED(%]M;V1U;&55;FET5&5S=',@*"D[#0I]#0H-"F5X=&5R;B`H5VEN9&]W
M<RD-"D)/3TP at 1&QL36%I;B`H2$E.4U1!3D-%(&A?:6YS=&%N8V4L(%5,3TY'
M(')E87-O;BP at 3%!63TE$(')E<V5R=F5D*0T*>PT*"7-W:71C:"`H<F5A<V]N
M*0T*"7L-"@D)8V%S92!$3$Q?4%)/0T534U]!5%1!0T at Z#0H)"7L-"@D)"6=C
M7VEN:70@*"D["0DO+R!I;FET:6%L:7IE(&=A<F)A9V4 at 8V]L;&5C=&]R. at T*
M"0D)7VUI;FET("@I.PD)+R\@:6YI=&EA;&EZ92!M;V1U;&4@;&ES=#H-"@D)
M"5]M;V1U;&5#=&]R("@I.PDO+R!R=6X@;6]D=6QE(&-O;G-T<G5C=&]R<SH-
M"@D)"5]M;V1U;&55;FET5&5S=',@*"D["2\O(')U;B!M;V1U;&4@=6YI="!T
M97-T<SH-"@D)"6)R96%K.PT*"0E]#0H-"@D)8V%S92!$3$Q?4%)/0T534U]$
M151!0T at Z#0H)"7L-"@D)"6=C7W1E<FT@*"D["0DO+R!S:'5T(&1O=VX at 9V%R
M8F%G92!C;VQL96-T;W(Z#0H)"0EB<F5A:SL-"@D)?0T*#0H)"6-A<V4 at 1$Q,
M7U1(4D5!1%]!5%1!0T at Z"2\O(&UU;'1I<&QE('1H<F5A9', at 87)E(&YO="!S
M=7!P;W)T960Z#0H)"6-A<V4 at 1$Q,7U1(4D5!1%]$151!0T at Z#0H)"7L-"@D)
M"7)E='5R;B!F86QS93L-"@D)?0T*#0H)"6A?9VQO8F%L7VEN<W1A;F-E(#T@
M:%]I;G-T86YC93L-"@D)<F5T=7)N('1R=64[#0H)?0T*?0T*#0H-"@T*#0H-
="@T*#0H-"@T*#0H-"@T*#0H-"@T*#0H-"@T*#0H`
`
end
begin 644 dll_exported_functions.d
M;6]D=6QE(&5X86UP;&5?9&QL.PT*#0IE>'!O<G0@=F]I9"!E>'!O<G1E9%]F
M=6YC=&EO;B`H*0T*>PT*"7!R:6YT9B`H(F1L;"!F=6YC=&EO;B!C86QL960N
M(%QN(BD[#0I]#0H-"@T*#0H-"@T*#0H-"@T*#0H-"@T*#0H-"@T*#0H-"@``
`
end


More information about the Digitalmars-d-learn mailing list