Re: JAWIN Digest - 15 Jun 2004 to 16 Jun 2004 (#2004-37)
Ivan <[email protected]>
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <[email protected]> |
Hi, Thanks for your reppy. I really happy to receive this email. Thanks a lot :-) Anyway.... look like this is a problem to me.... yeah, I just wanted to access the Windows registry... at this moment... hmm, one question, it is possible that Jawin can some how provide another methods just for Win98 or WinME when Unicode not presented ? Thanks again... really~ thanks alot... ohhh yeah! sorry bout the bug list~ yeah, it is mine.... coz I saw it transfer back to sourceforge, so a... I though it might be good if I open a bug list at there... sorry bout that :-P Thanks again Automatic digest processor wrote: There are 2 messages totalling 141 lines in this issue. Topics of the day: 1. Branched 1.x and checked in a lot of refactoring 2. Windows Registry Problem in Win98 ---------------------------------------------------------------------- Date: Wed, 16 Jun 2004 09:26:36 -0400 From: Roger I Martin PhD <[email protected]> Subject: Re: Branched 1.x and checked in a lot of refactoring Hi Morten, It will be this weekend before I can try anything out and help. Thanks for all you are doing. --Roger ----- Original Message ----- From: "Morten Andersen" <[email protected]> To: <[email protected]> Sent: Tuesday, June 15, 2004 2:53 AM Subject: Re: [JAWIN] Branched 1.x and checked in a lot of refactoring Hi Josh Josh Passenger wrote: Additionally, I am very busy with 3 other projects and can't really contribute to jawin immediately. Thats understandable, after all community-driven projects should (mostly) be fun working on, they shouldn't get one overworked. I really appreciate that you are progressing these, I was hoping that someone with real jawin expertise would fill these out one day :op Well I don't think I have reached that stage yet, but it was my hope to extend the unittest-dll (CallCOMUnitTestD.dll) so that it could be used for kind of testing the JTB stylesheets to. By running the JTB on the type information in the DLL, and then use the generated code in the unit-tests - actually the test/org/jawin/IDualTestItf.java is a slightly modified version of a generated file - so it already works pretty well, but we need more native test-cases. Best Regards Morten ------------------------------ Date: Wed, 16 Jun 2004 20:02:50 +0200 From: Morten Andersen <[email protected]> Subject: Re: Windows Registry Problem in Win98 Hi Ivan First sorry for the slow answering-rate. And then to your problem. I just looked in the source for the Registry-class you are using, and Jawin is using the following native Win32 API functions when your code is executed: RegOpenKeyW and RegQueryValueExW These are documented in the MSDN here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/regopenkey.asp and here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/regqueryvalueex.asp The versions Jawin is using are the so called Unicode versions (can be seen by the prefix "W"). Unfortunately these functions are only supported on Windows ME/95/98 in special cases: "Windows Me/98/95: RegQueryValueExW is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows Me/98/95 Systems." (quote from one of the links above). As far as I know Jawin does not pt. support Ansi-strings (the opposite to Unicode strings in the Win32 API) as required by Win98. So even if you would write the Jawin marshalling code yourself (instead of using the Registry class), I don't think it is possible to get it to run on all Windows98 machines. I don't know what your usage of Jawin are beside accessing the Windows registry? But if you only need to access the registry, you could try to look into the ice.jni.registry package: http://www.trustice.com/java/jnireg/ although you should note that the license is GPL, so if you are planning to use the software in a closed-source commercial project you may have problems? I assume that this bug: http://sourceforge.net/tracker/index.php?func=detail&aid=972585&group_id=66397&atid=514369 has been opened by you, and is related to this mail? Hope this helps you a little bit further Best Regards Morten Andersen Ivan wrote: Hi all, I got no problem runing the following script in WinXP but it trown exception in Win98. Any ideas ? Thanks int li_index = 0; String ls_install_path = ""; try{ li_index = Registry.OpenKey( RegistryConstants.HKEY_CURRENT_USER, "CONTROL PANEL\\INTERNATIONAL"); ls_install_path = Registry.QueryStringValue( li_index, "SSHORTDATE" ); }catch( IOException e ){ System.out.println("Java - Registry IOException" + e.toString()); }catch( COMException e ){ System.out.println("Java - Registry COMException" + e.toString()); }catch(Exception e){ System.out.println("Java - Registry Exception" + e.toString()); } Exception trown in Win98 :- java.lang.NullPointerException ---------------------------------------------------------------- This e-mail has been sent via JARING webmail at http://www.jaring.my ------------------------------ End of JAWIN Digest - 15 Jun 2004 to 16 Jun 2004 (#2004-37) *********************************************************** ---------------------------------------------------------------- This e-mail has been sent via JARING webmail at http://www.jaring.my