Re: Passing byte arrays into C functions
Morten Andersen <[email protected]>
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Organization | Arosii Information Systems A/S |
| Message-ID | <[email protected]> |
Hi Alex A couple of quick notes, I will probably return with more later, when I find better time. Alex Kotchnev wrote: > >>Some of the things your are talking about are of interest. If you have >>a sourceforge account I would be happy to turn it on for Jawin and work >>with you on your projects. > > > My sourceforge username is polrtex. First, of course, welcome on board :-). Please let me know if you get any problems setting up your build environment for Jawin (it should be pretty straightforward as described in the docs/jawindeveloper.html document, but there could be some special issues that we have overlooked). > > I was initially under the impression that the Jawin type browser was able > to generate code from dll-s (I think that the documentation had something > mentioning it). If it is a DLL containing any of the COM structures mentioned on the jawintypebrowser.html page, we are able to generate code for some/most structures. But if you are thinking of an "old" DLL with published "DLL Entry Points" (such as the Win32 API), we are not able to do it. I think this is what the documentation in the jawintypebrowser.html page says, but if you find the exact location where we have written it incorrectly, please feel free to correct it. (you would probably also want to consult the new jawinuserguide_dll.html file, with information about calling DLL entry points). > > I will collect examples as I work through my Win32 programming book. I > will have to write-up my summary understanding of the marshalling in > layman's terms the way I understand it(for me, it was quite a steep curve > to figure out how the marshalling works and what it is all about - I am > not all that good with C and I am not all that familiar with what goes > into the stack, how big it has to be, etc). I have constructed in my head > an explanation of the whole marshalling business, I will do a write up and > send for review to see if I understand things correctly. Sounds great, I assume you are still talking about the marshalling when calling DLL entry points? - Your writing could probably finish section 3.2 in the jawinuserguide_dll.html document, where i newer got finished on explaining the instruction string and stacksize (please feel free to ask on everything, no matter how trivial and simple the question feels, one could still waste _hours_ tumbling around in the marshalling code - and there is a big chance that either Roger, Robert or myself can answer the question quickly). > > I am not very certain what you are referring to here. The examples & > documentation will be an ongoing thing (no timeline). Currently, I have > all the structs and constants for win32 generated (from VJ++) and they > compile. The only thing that I might have to do is remove some of the MS > generated @dll.import javadoc tags, and I can send them in. The generated > functions signatures don't compile yet. Sounds great. You should also check the content of the org.jawin.donated.win32 package (in the stubs/src folder) and the org.jawin.win32 package in the main src folder. The org.jawin.win32 package contains some Win32 API structures used internally in Jawin. The org.jawin.donated.win32 package contains some stubs I think Stuart wrote once, for manipulating with some of the Win32 API's (eg. there is code for manipulating the registry). > > I also have stubs generated for MS Word and Excel that compile and work - > as I had mentioned before, I am not sure how much value that has, since > anyone who can run the Jawin browser can generate them on their own (with > a few minor fixes). The value that I see in them is breaking them up in a > separate project, that will come compiled & bundled with the Jawin .dll, > so that Java developers that don't know anything about Jawin (and don't > need to know anything about Jawin), can just drop the jar in their > classpath and have full access to the MS Office APIs. This is just what the donated packages are for. They are build into the jawin-stubs.jar file (this was not in the last binary release, so you will have to build "ant deploy" from the CVS-head yourself to get this file). Best Regards Morten