>>Thanks, it works. However, is there some book,document or whatever that explains all this. I mean, it looks like you are declaring a function that is going to receive 2 string parameters and then it is called with 1 numeric and 1 string. This is not intuitively obvious. In Delphi, I call the same function with 2 pChar parameters. I didn't think C was this forgiving. Again, Thanks :)
>
>Hi Calvin,
>
>PMFJI, but there are a couple of things I want to touch on. First, the declaration should (according to the SDK) pass the strings by reference not value. However, in many cases I've found it doesn't matter. However, because it sometimes does, I try to stick to the method shown in the SDK all the time. Now when you pass a 0 when passing by reference, you're actually passing a null pointer. I think what happens here is that it's assumed to be a null string by VFP, but this is a guess.
>
George,
All STRING declarations are ByRefs; what is passed to the API call is the same regardless of whether your DECLARE...DLL has a
STRING cSomeValue or a
STRING @ cSomeValue. I don't know why this occurs, and it doesn't make sense, but it does appear to be the behavior.
>As for information on the API, I wrote an FAQ for the UT Knowledge Base (under Win32) you might want to take a look.
>
>hth,