Re: JaWin and retrieving data from COM objects

Morten Andersen <[email protected]>
Newsgroups gmane.comp.windows.devel.jawin
Message-ID <[email protected]>
Hi Tate

Tate Austin wrote:
> hey, I am new to JaWin and think it looks to be very impressive, but I have
> a question.  I am attempting to pull a string out of a dll function call, my
> code invokes FuncPtr which seems to only return integers?  I assume this
> isn't a limitation of JaWin because the documentation claims it can call any
> COM functions/objects.

Just to get the terms correct (and hopefully get a bigger understanding
of what Jawin can do for you): You are not really using COM if you are
just calling a traditional function exposed in a DLL (for more info on
this see below).

A lot of changes have happened to the Jawin source and documentation in
the summer 2004. Unfortunately we haven't gotten around to releasing
this binary yet. So I will suggest you check out the newest source and
documentation from SourceForge.net and build it
yourself, as described here:
http://jawinproject.sourceforge.net/jawindeveloper.html (you don't need
to build the native C++ part).

After that you should consult the "docs/jawinuserguide_dll.html"
document for the basic terms for DLL entry points. And how to call them.

>   My code looks like:
>        FuncPtr webencrypt = new FuncPtr("MYDLLNAME.DLL",
> "FunctionThatReturnsString");
>        webencrypt.invoke(querystring, ReturnFlags.FAIL_ON_FALSE);
>
> How would I retrieve a string in JaWin, because it isn't going to happen
> through the FuncPtr class?  I need to be pulling a string out of the
> ".invoke" part of that code.
>

Could you please post the exact signature of the DLL entry point you are
trying to call. There may be a "shortcut"-invoke method for it, although
I think you are correct that you will probably have to use the "generic"
invoke, where you handle the marshalling yourself.

Best Regards
Morten
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.