--Re: [JAWIN] Help with org.jawin.COMException please!
Darrin Smith <[email protected]>
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <060420041410.17332.40C082E70007FF9B000043B421602807419CA19FA102079D9D0E0B@att.net> |
I think I just misunderstood what the DIID GUID really was.
I did a search in the registry for the name of the DLL I built against and found
out its class name. I plugged that in like this:
GUID loginGUID = new GUID("{ new value went here}");
Thanks.
-------------- Original message from Darrin Smith : --------------
> I'm having trouble working with a simple COM DLL. I ran it through the
> Jawin Type Browser and generated the classes (IValidateLogin and
> VAlidateLogin) I needed but when I try to create an instance of the
> interface I get:
>
> org.jawin.COMException: 80040154: Class not registered
> at org.jawin.marshal.GenericStub.win32Invoke0(Native Method)
> at org.jawin.marshal.GenericStub.win32Invoke(GenericStub.java:66)
> at org.jawin.win32.Ole32.CoCreateInstance(Ole32.java:109)
> at org.jawin.DispatchPtr.(DispatchPtr.java:63)
> at com.orametrix.suresmile.scoring.IValidateLogin.
> (IValidateLogin.java:36)
> at com.orametrix.suresmile.scoring.ScoringApp.
> (ScoringApp.java:68)
> at com.orametrix.suresmile.scoring.ScoringApp.main
> (ScoringApp.java:98)
>
>
> I registered the DLL by double clicking on it before I ran the JTB. I also
> made sure that the java.library.path was set correctly.
>
> Here is the code I tried:
>
> try
> {
> User32.MessageBoxW("Test", "Jawin");
>
> Ole32.CoInitialize();
>
> IValidateLogin iLogin = new IValidateLogin(IValidateLogin.DIID);
>
> String[] retArray = new String[20];
>
> iLogin.ValidateLogin("User","Pass","Domain","Server",retArray);
>
> System.out.println("Made the call OK...time to inspect the array...");
>
> Ole32.CoUninitialize();
>
> }
> catch (Exception e)
> {
> e.printStackTrace();
> }
>
>
> The messagebox comes up just fine, but the application crashes when the
> constructor for IValidateLogin(IValidateLogin.DIID) gets called.
>
> The JTB created the DIID value, so I would think this is correct.
>
> What is it that I am doing wrong?
>
> Obviously I'm new to Jawin, so please don't assume I've done anything
> correctly other than install Jawin (the samples work just fine).