|
FUT lugnet.cad.dev.
In lugnet.cad, Carsten Schmitz writes:
> Hello!
>
> To be honest: I can't ;-).
>
> But i think that you can translate the dll-headers to C++ without problem.
> If they would be in C++ I would be able to translate them to Delphi ;). The
> dll funcs are very plain and should be easy to call. They only tricky part
> is the call-back funtion to LDDP but with a little Google Groups help I
> think a C++ programmer can do it without problems.
>
> Play well Carsten
>
> > I know this might be a streach, but is there any way you could provide a C++
> > code sample? It's no big deal if you can't but I think I know C++ better
> > than Delphi(Pascal).
I haven't personally looked at it, but the thing to remember when writing
C++ that is going to be accessed from another language is that you usually
have to write C functions, and declare them as being WINAPI. You also have
to export them from your DLL. So a C function exported from a DLL for use
by another language might have the following prototype:
int WINAPI __declspec(dllexport) myExportedFunction(int param1, int param2);
I can't remember if the WINAPI is supposed to go before or after the
__declspec(dllexport), but if the above produces a compile error, you can
switch. Note that if you actually plan to do this yourself and link against
it, the dllexport has to be changed to dllimport when compiling the program
that links against the DLL, but since you're not going to do that, you can
just put dllexport in the code directly.
--Travis Cobbs (tcobbs@REMOVE.halibut.com)
|
|
Message is in Reply To:
| | Re: * LDrawDesignPad LDDP 1.1 released *
|
| Hello! To be honest: I can't ;-). But i think that you can translate the dll-headers to C++ without problem. If they would be in C++ I would be able to translate them to Delphi ;). The dll funcs are very plain and should be easy to call. They only (...) (22 years ago, 4-Aug-02, to lugnet.cad)
|
14 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|