[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trying again to write dll for ts6



PureBytes Links

Trading Reference Links


>
>
>All good suggestions. I think I'm closer. On one of my prints
>from the function I get a wierd number first, then the next
>two are numbers I expect.


If that's the case, you are almost there. You've got the DLL name exported properly. The problem will lie in the size of the arguments you are passing or returning. For example, you are passing a long where the fprintf expects an int or something like that.

Try it first by just passing one int in as an argument, and instead of using the void return type, try returning an int as well. Once you've got that working, then try adding more inputs, and changing the return type to void.

I do recall using the pascal calling convention.

I'm pretty sure if you keep at it one step at a time, you'll solve it.

Mike G.


>I think that for calling the external
>dll that TS6 wants the function to be declared with the pascal
>calling convention. This seems to be using the __stdcall in
>VC5. But when I turn on __stdcall for all functions, it then
>mangles the name of the function such that TS6 cannot find
>the function.  I'm trying to find what is causing the extra
>mangling of names in VC5.
>
>Mike