The functions do not start with underscore or any other common prefix when
viewed in Depends, so I'll presume stdcall.
Thanks for the tip.
-Mont
On 4/30/07, Stoyan Damov <[EMAIL PROTECTED]> wrote:
open the dll in dependency walker (part of sysinternals suite) - if
your functions start with u
open the dll in dependency walker (part of sysinternals suite) - if
your functions start with underscore (_) they're almost certain cdecl,
otherwise probably stdcall.
On 4/30/07, Mont Rothstein <[EMAIL PROTECTED]> wrote:
Thanks for all of the information. I'll have to dig into this more.
The m
Thanks for all of the information. I'll have to dig into this more.
The make file doesn't have a /Gd or a /Gz flag. I suspect I am going to
have to contact the vendor about this (though I don't hold out much hope for
an answer).
I have C code that calls the same functions and works fine, so I
I believe the calling convention has to be __cdecl for the PInvoke to work,
but I may be wrong about that.
yup, wrong about that - all (except a few) Win32 API functions use
stdcall - because stdcall functions clean up the stack after
themselves, your code gets (a bit) smaller (and that's the r
I have a strong recollection that when I did my P/Invoke work a few months
ago, I ran into a problem where I had to look at the calling convention.
So as I recall I think it does matter; it would stand to reason that you
would have to P/Invoke the API using the same calling convention that the
API
Thanks for the additional info.
I am compiling this DLL with VS 05 form the command line. It uses a
manually created make file and not a project.
I didn't create the DLL, it is part of a package, which is why I am unclear
on some of this.
I searched the directory where all of the source is kep
The "calling convention" they are asking for can be a build setting or
specified in the source code. You don't seem to specify yours in the
source code, so it is probably in the build settings. Common calling
conventions are __stdcall and __cdecl. If you are using Visual Studio to
build the C co
The code I am trying to essentially re-implement in C# is:
FlxActErrorerror;
if(flxActAppActivationSend(client, &error))
{
DEBUG("ACTIVATION REQUEST SUCCESSFULLY PROCESSED\n");
}
else
{
flxActComm
Mont,
Good to know that out goes with **. I'll switch back to using ref and
allocing the struct while I continue to look for the source of the problem.
It doesn't. There's no difference in the indirection level between ref and
out, they only differ in the direction data is being copied. So if
I actually tried the ref and alloc route, but that didn't work.
Good to know that out goes with **. I'll switch back to using ref and
allocing the struct while I continue to look for the source of the problem.
Any other thoughts?
Thanks,
-Mont
On 4/24/07, Stoyan Damov <[EMAIL PROTECTED]> wro
Actually it is just an entry in a def file to a C function.
So, no DLL error.
-Mont
On 4/24/07, Steve Johnson <[EMAIL PROTECTED]> wrote:
On 4/24/07, Mont Rothstein <[EMAIL PROTECTED]> wrote:
>
> I am trying to get a struct from a function in a DLL, but I always get
> zero.
>
There's nothin
void flxActCommonHandleGetError(FlxActHandle handle, FlxActError *err);
private static extern void flxActCommonHandleGetError(handle, out
ActivationError error);
It could have been an out param if err was FlxActError** but since
it's not you probably have to allocate the structure an
On 4/24/07, Mont Rothstein <[EMAIL PROTECTED]> wrote:
I am trying to get a struct from a function in a DLL, but I always get
zero.
There's nothing wrong with your declarations. My guess would be that the
function is failing inside the dll. Is the dll logging any sort of error?
What is the
I am trying to get a struct from a function in a DLL, but I always get zero.
The below code always leaves the struct with 0 as the value for each
parameter in the struct though the equivalent C code populates the values.
Does anyone see what I am missing?
Thanks,
-Mont
Here is what I have:
C
14 matches
Mail list logo